diff options
Diffstat (limited to 'src/args.rs')
| -rw-r--r-- | src/args.rs | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/args.rs b/src/args.rs index 415d816..6998e15 100644 --- a/src/args.rs +++ b/src/args.rs @@ -1,4 +1,4 @@ -use clap::{Parser, Subcommand}; +use clap::{Args, Parser, Subcommand}; /// Simple bookmarks manager written in Rust #[derive(Debug, Parser)] @@ -12,5 +12,24 @@ pub struct Cli { pub enum Command { /// Start the web server to serve the bookmarks page #[command(name = "serv")] - Serv, + Serv(ServArgs), +} + +#[derive(Debug, Args)] +pub struct ServArgs { + // Port to listen to + #[arg(long = "port", short)] + pub port: Option<String>, + + // Path to theme file + #[arg(long = "style", short)] + pub style_file: Option<String>, + + // Path to bookmarks file + #[arg(long = "bookmarks", short)] + pub bookmarks_file: Option<String>, + + // Path to favicon file + #[arg(long = "favicon", short)] + pub favicon_file: Option<String>, } |
