summaryrefslogtreecommitdiffstats
path: root/gui/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/main.rs')
-rw-r--r--gui/src/main.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/gui/src/main.rs b/gui/src/main.rs
new file mode 100644
index 0000000..32d6d61
--- /dev/null
+++ b/gui/src/main.rs
@@ -0,0 +1,22 @@
+use anyhow::Result;
+
+mod app;
+mod cli;
+
+fn main() -> Result<()> {
+ let _ = env_logger::try_init()?;
+ let matches = crate::cli::app().get_matches();
+
+ match matches.subcommand() {
+ None => {
+ let name = matches.value_of("name").map(String::from).unwrap(); // safe by clap
+ crate::app::run(name)
+ },
+ Some((other, _)) => {
+ log::error!("No subcommand {} implemented", other);
+ Ok(())
+ },
+ }
+}
+
+