diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 9720370..32d0be5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,8 @@ mod space_repetition; mod util; use anyhow::Result; -use structopt::StructOpt; use std::path::PathBuf; +use structopt::StructOpt; #[derive(StructOpt)] #[structopt()] @@ -19,9 +19,10 @@ struct Opt { fn main() -> Result<()> { let deck = Opt::from_args().deck; let conn = db::db::init(db_path(&deck))?; - let entries = deck::read(deck)?; + let entries = deck::read(&deck)?; db::db::synchronize(&conn, entries)?; - gui::gui::start(&conn) + let deck_name = deck::pp_from_path(&deck).unwrap_or("Deck".to_string()); + gui::gui::start(&conn, &deck_name) } fn db_path(deck_path: &String) -> String { |