Add initial main() code

This commit is contained in:
Matthias Beyer 2016-05-18 22:25:20 +02:00
parent 05f9243164
commit f5b046181d

View file

@ -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!()
}