Mercurial > core / rust/bin/mailman/main.rs
1 use clap::{Parser, Subcommand}; 2 use logger::{trace, Logger}; 4 use std::path::PathBuf; 5 use util::{cli::log_level_str_from_cli, Result}; 6 // use jmap_client::{client::Client, core::query::Filter, email, mailbox}; 8 #[derive(Debug, Parser)] 9 #[command(name="mailman",author, version, about, long_about = None)] 12 #[command(subcommand)] 14 /// Set the default config file 15 #[arg(short, long, env = "MAILMAN_CONFIG_FILE")] 17 /// Set a user for this command 18 #[arg(short, long, env = "USER")] 21 #[arg(short, long, action = clap::ArgAction::Count)] 25 #[derive(Subcommand, Debug)] 38 async fn main() -> Result<()> { 40 let args = Cli::parse(); 42 Logger::try_with_str(log_level_str_from_cli(args.level))?.start()?; 46 let args = Cli::parse(); 47 println!("{:?}", args.cmd);