33 lines
712 B
Rust
33 lines
712 B
Rust
use argh::FromArgs;
|
|
use std::path::PathBuf;
|
|
|
|
#[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)]
|
|
#[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,
|
|
}
|
|
|
|
#[derive(FromArgs)]
|
|
#[argh(subcommand, name = "init", description = "Initialize a config file")]
|
|
pub struct InitOpt {}
|