ankidb

Crates.ioankidb
lib.rsankidb
version0.4.1
sourcesrc
created_at2023-09-15 16:50:34.676444
updated_at2024-07-25 21:12:08.335412
descriptionOpinionated library for interacting with Anki's database
homepage
repositoryhttps://github.com/sartak/ankidb
max_upload_size
id973809
size28,247
Shawn M Moore (sartak)

documentation

README

ankidb

ankidb gives you an opinionated API to Anki's database.

use ankidb::{Database, query::{self, AnkiExt}};

let db = Database::open(&"/path/to/collection.anki2")?;
let (mut stmt, bind) = db.prepare(query::revlog().count_star())?;
let res: i64 = stmt.query_row(&*bind.as_params(), |row| row.get(0))?;
assert!(res > 100);
Commit count: 32

cargo fmt