yepzon-locationer/src/main.rs

24 lines
474 B
Rust
Raw Normal View History

2020-08-29 01:27:23 +02:00
#![windows_subsystem = "windows"]
mod args;
mod cmd;
2020-08-23 02:08:05 +02:00
mod errors;
2020-08-24 22:24:26 +02:00
mod gpx;
2020-08-23 00:53:49 +02:00
use args::*;
2020-08-29 01:27:23 +02:00
use errors::GenericError;
use thingy_lib::api::{LocationModel, TagModel};
use thingy_lib::Config;
2020-08-23 00:53:49 +02:00
fn main() {
2020-08-23 01:18:31 +02:00
let env: EnvOpt = argh::from_env();
2020-08-29 01:58:17 +02:00
if env.subcommand.is_some() {
if let Err(e) = cmd::from_env(env) {
eprintln!("Critical Error: {}", e);
std::process::exit(1);
}
} else {
println!("Open nwg UI instead");
2020-08-23 02:08:05 +02:00
}
}