reorder CLI args, update README
This commit is contained in:
parent
85b3954c35
commit
8590b38d0f
3 changed files with 27 additions and 15 deletions
26
src/cli.rs
26
src/cli.rs
|
@ -8,12 +8,6 @@ pub struct Cli {
|
|||
help = "address and port to bind to"
|
||||
)]
|
||||
pub bind: String,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "Set default log level lower. You can also change this via the RUST_LOG environment variable."
|
||||
)]
|
||||
pub debug: bool,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
|
@ -22,10 +16,23 @@ pub struct Cli {
|
|||
pub font: Option<String>,
|
||||
#[clap(flatten)]
|
||||
pub gui: GuiOptions,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "Set default log level lower. You can also change this via the RUST_LOG environment variable."
|
||||
)]
|
||||
pub verbose: bool,
|
||||
}
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct GuiOptions {
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
default_value_t = false,
|
||||
help = "add spacers between tile rows to simulate gaps in real display"
|
||||
)]
|
||||
pub spacers: bool,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
|
@ -47,11 +54,4 @@ pub struct GuiOptions {
|
|||
help = "Use the blue color channel"
|
||||
)]
|
||||
pub blue: bool,
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
default_value_t = false,
|
||||
help = "add spacers between tile rows to simulate gaps in real display"
|
||||
)]
|
||||
pub spacers: bool,
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ fn main() {
|
|||
cli.gui.green = true;
|
||||
}
|
||||
|
||||
init_logging(cli.debug);
|
||||
init_logging(cli.verbose);
|
||||
info!("starting with args: {:?}", &cli);
|
||||
|
||||
let socket = UdpSocket::bind(&cli.bind).expect("could not bind socket");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue