blob: ef47c739a5483c0d02383ba4d536c9ff5f800493 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
mod db;
mod deck;
mod gui;
mod model;
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 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)
}
|