use clap::{Args, Parser, Subcommand}; /// Simple bookmarks manager written in Rust #[derive(Debug, Parser)] #[command(version, about, long_about = None)] pub struct Cli { #[command(subcommand)] pub command: Command, } #[derive(Debug, Subcommand)] pub enum Command { /// Start the web server to serve the bookmarks page #[command(name = "serv")] Serv(ServArgs), } #[derive(Debug, Args)] pub struct ServArgs { // Port to listen to #[arg(long = "port", short)] pub port: Option, // Path to theme file #[arg(long = "style", short)] pub style_file: Option, // Path to bookmarks file #[arg(long = "bookmarks", short)] pub bookmarks_file: Option, // Path to favicon file #[arg(long = "favicon", short)] pub favicon_file: Option, }