summaryrefslogtreecommitdiffstats
path: root/imag-bookmark
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-05-18 22:25:20 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-07-14 21:08:46 +0200
commitf5b046181d44b66b187f1743e1e622a1f0cf9a1e (patch)
tree9478e20782e449e007ceaddeaa4b85b5eba0348f /imag-bookmark
parent05f9243164ad7cb802cc62deb9a8ca3b360ff8d1 (diff)
Add initial main() code
Diffstat (limited to 'imag-bookmark')
-rw-r--r--imag-bookmark/src/main.rs41
1 files changed, 39 insertions, 2 deletions
diff --git a/imag-bookmark/src/main.rs b/imag-bookmark/src/main.rs
index 8dfa94c0..55b0e8fa 100644
--- a/imag-bookmark/src/main.rs
+++ b/imag-bookmark/src/main.rs
@@ -7,11 +7,48 @@ extern crate libimagentrylink;
extern crate libimagrt;
extern crate libimagutil;
+use libimagentrytag::ui::{get_add_tags, get_remove_tags};
+use libimagentrylink::internal::Link;
+
mod ui;
-use ui:build_ui;
+use ui::build_ui;
fn main() {
- println!("Hello, world!");
+ let rt = generate_runtime_setup("imag-bookmark",
+ &version!()[..],
+ "Bookmark collection tool",
+ build_ui);
+
+ rt.cli()
+ .subcommand_name()
+ .map(|name| {
+ debug!("Call {}", name);
+ match name {
+ "add" => add(&rt),
+ "collection" => collection(&rt),
+ "list" => list(&rt),
+ "remove" => remove(&rt),
+ _ => {
+ debug!("Unknown command"); // More error handling
+ },
+ }
+ });
+}
+
+fn add(rt: &Runtime) {
+ unimplemented!()
+}
+
+fn collection(rt: &Runtime) {
+ unimplemented!()
+}
+
+fn list(rt: &Runtime) {
+ unimplemented!()
+}
+
+fn remove(rt: &Runtime) {
+ unimplemented!()
}