diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-16 18:15:47 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-16 18:15:47 +0200 |
commit | ddf52f02d66abfee17a4105503220a9a34064f29 (patch) | |
tree | bb01d20ef9daea32730b98af8b159e87eea15704 /tool/src/cli.rs | |
parent | 783198703569dd1d1c17f2b3a40a62f20a6f8a44 (diff) | |
download | jellything-ddf52f02d66abfee17a4105503220a9a34064f29.tar jellything-ddf52f02d66abfee17a4105503220a9a34064f29.tar.bz2 jellything-ddf52f02d66abfee17a4105503220a9a34064f29.tar.zst |
jellytool completion generator
Diffstat (limited to 'tool/src/cli.rs')
-rw-r--r-- | tool/src/cli.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tool/src/cli.rs b/tool/src/cli.rs new file mode 100644 index 0000000..d13d575 --- /dev/null +++ b/tool/src/cli.rs @@ -0,0 +1,39 @@ +use clap::{arg, Parser, Subcommand, ValueEnum}; +use std::path::PathBuf; + +#[derive(Parser)] +pub struct Args { + #[clap(subcommand)] + pub action: Action, +} + +#[derive(Subcommand)] +pub enum Action { + Add { + #[arg(short, long)] + id: Option<String>, + #[arg(short, long)] + media: Option<PathBuf>, + #[arg(short, long)] + library_path: Option<PathBuf>, + }, + Migrate { + database: PathBuf, + mode: MigrateMode, + save_location: PathBuf, + }, + Reimport { + /// Custom hostname, the config's is used by default + #[arg(long)] + hostname: Option<String>, + /// Disable TLS. Dont use this. + #[arg(long)] + no_tls: bool, + }, +} + +#[derive(Debug, Clone, Copy, PartialEq, ValueEnum)] +pub enum MigrateMode { + Import, + Export, +} |