diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 4761366..ef47c73 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,9 +6,18 @@ mod space_repetition; mod util; use anyhow::Result; +use structopt::StructOpt; + +#[derive(StructOpt)] +#[structopt()] +struct Opt { + #[structopt(short, long, default_value = "database.db")] + database: String, +} fn main() -> Result<()> { - let conn = db::db::init()?; + let opt = Opt::from_args(); + let conn = db::db::init(opt.database)?; let entries = deck::read()?; db::db::add_missing_deck_entries(&conn, entries)?; gui::gui::start(&conn) |