mirror of
https://codeberg.org/postscriptum/snac2nex.git
synced 2026-03-31 21:25:28 +00:00
initial commit
This commit is contained in:
commit
63f53528dc
10 changed files with 443 additions and 0 deletions
37
src/config.rs
Normal file
37
src/config.rs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
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 to export
|
||||
#[arg(short, long)]
|
||||
pub user: Vec<String>,
|
||||
|
||||
/// Keep running as the daemon, renew every `n` seconds
|
||||
#[arg(short, long)]
|
||||
pub rotate: Option<u64>,
|
||||
|
||||
/// 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.txt"))]
|
||||
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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue