Bushel_configBushel configuration management with XDG paths
Configuration is loaded from ~/.config/bushel/config.toml by default, with support for environment variable overrides via XDG_CONFIG_HOME.
[data] local_dir = "/path/to/bushel/data" [images] images_dir = "/path/to/images" images_output_dir = "/path/to/images-web" paper_thumbs = "papers" contact_faces = "faces" video_thumbs = "videos" [papers] pdfs_dir = "/path/to/paper-pdfs" [peertube] [[peertube.servers]] name = "crank" endpoint = "https://crank.recoil.org" [[peertube.servers]] name = "talks" endpoint = "https://talks.example.com" [zotero] translation_server = "http://localhost:1969" [sync] remote = "ssh://server/path/to/bushel.git" branch = "main" auto_commit = true commit_message = "sync" [images_sync] remote = "ssh://server/path/to/images.git" branch = "main" auto_commit = true commit_message = "images sync"
type t = {data_dir : string;images_dir : string;images_output_dir : string;paper_thumbs_subdir : string;contact_faces_subdir : string;video_thumbs_subdir : string;paper_pdfs_dir : string;peertube_servers : peertube_server list;zotero_translation_server : string;sync : Gitops.Sync.Config.t;images_sync : Gitops.Sync.Config.t;}Complete bushel configuration.
val default : unit -> tReturn the default configuration.
Load configuration from the default config file. Returns default config if file doesn't exist.
val paper_thumbs_dir : t -> stringFull path to paper thumbnails directory.
val contact_faces_dir : t -> stringFull path to contact faces directory.
val video_thumbs_dir : t -> stringFull path to video thumbnails directory.
val read_api_key : string -> (string, string) resultRead an API key from a file.
val write_default_config : ?force:bool -> unit -> (string, string) resultWrite a default config file to the config directory. Returns Ok path on success, or Error msg if the file exists and force is not set, or if writing fails.