Add initial main() code
This commit is contained in:
parent
05f9243164
commit
f5b046181d
1 changed files with 39 additions and 2 deletions
|
@ -7,11 +7,48 @@ extern crate libimagentrylink;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate libimagutil;
|
extern crate libimagutil;
|
||||||
|
|
||||||
|
use libimagentrytag::ui::{get_add_tags, get_remove_tags};
|
||||||
|
use libimagentrylink::internal::Link;
|
||||||
|
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use ui:build_ui;
|
use ui::build_ui;
|
||||||
|
|
||||||
fn main() {
|
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!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue