yepzon-locationer/src/cmd.rs

33 lines
712 B
Rust
Raw Normal View History

2020-08-23 01:18:31 +02:00
use argh::FromArgs;
2020-08-24 01:51:59 +02:00
use std::path::PathBuf;
2020-08-23 01:18:31 +02:00
#[derive(FromArgs)]
#[argh(description = "Tool for gathering location data from Yepzon servers.")]
pub struct EnvOpt {
#[argh(subcommand)]
pub subcommand: Subcommand,
}
#[derive(FromArgs)]
#[argh(subcommand)]
pub enum Subcommand {
Run(RunOpt),
Init(InitOpt),
}
#[derive(FromArgs)]
2020-08-24 01:51:59 +02:00
#[argh(subcommand, name = "run", description = "Run the tool")]
pub struct RunOpt {
#[argh(
option,
short = 'c',
description = "otus",
default = "PathBuf::from(\"config.toml\")"
)]
pub config: PathBuf,
}
2020-08-23 01:18:31 +02:00
#[derive(FromArgs)]
2020-08-24 01:51:59 +02:00
#[argh(subcommand, name = "init", description = "Initialize a config file")]
2020-08-23 01:18:31 +02:00
pub struct InitOpt {}