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 8999a52..956e930 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,9 +3,18 @@ mod gui; mod model; use anyhow::Result; +use structopt::StructOpt; + +#[derive(StructOpt)] +#[structopt()] +struct Opt { + #[structopt(long, default_value = "database.db")] + database: String, +} fn main() -> Result<()> { - let conn = db::init()?; + let db_path = Opt::from_args().database; + let conn = db::init(&db_path)?; gui::run(conn); Ok(()) } |