use clap::Parser; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] pub struct Config { /// Path to the Snac2 profile directory #[arg(short, long)] pub source: String, /// Target directory for public data export #[arg(short, long)] pub target: String, /// Username(s) to export #[arg(short, long)] pub user: Vec, /// Include attachment files export /// /// Supported values: /// /// * `c` (`copy`) - copy files /// * `h` (`hard`) - create hard links /// * `s` (`soft`) - create soft links (macos, linux, windows only) #[arg(short, long)] pub attachment: Option, /// Keep running as the daemon, renew every `n` seconds #[arg(short, long)] pub rotate: Option, /// Post template pattern #[arg(short, long, default_value_t = String::from("{content}{attachments}{link}{tags}{updated}"))] pub format_content: String, /// Post filenames format /// /// * escaped with `%%` #[arg(long, default_value_t = String::from("%H:%M:%S"))] pub format_filename: String, /// Post `{updated}` time format /// /// * escaped with `%%` #[arg(long, default_value_t = String::from("%Y/%m/%d %H:%M:%S"))] pub format_updated: String, /// Keep Nex entry on Snac post was removed #[arg(short, long, default_value_t = false)] pub keep: bool, /// Disables some debug output #[arg(short, long, default_value_t = false)] pub daemon: bool, }