blob: f9d22887faec897538172e92e346d2cdabfc7c29 (
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
25
26
27
|
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(long, default_value = "database.db")]
database: String,
#[structopt(long, default_value = "deck.deck")]
deck: String,
}
fn main() -> Result<()> {
let opt = Opt::from_args();
let conn = db::db::init(opt.database)?;
let entries = deck::read(opt.deck)?;
db::db::synchronize(&conn, entries)?;
gui::gui::start(&conn)
}
|