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.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/gui/src/main.rs b/gui/src/main.rs
new file mode 100644
index 0000000..486f007
--- /dev/null
+++ b/gui/src/main.rs
@@ -0,0 +1,25 @@
+use anyhow::Result;
+
+mod app;
+mod cli;
+mod timeline;
+mod post;
+mod gossip;
+
+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(())
+ },
+ }
+}
+
+