aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index e221ed5..f3f77e7 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,9 @@ This is a C port of [SD](https://git.exozy.me/a/SD), a very efficient (and a tin
## Usage
-Flash cards are stored in the `cards` table of a SQLite database. There are four columns: `idx INTEGER PRIMARY KEY, weight INTEGER, key STRING, val STRING`. The `idx` is a unique index for each card, starting at 0. The weight is how often the card should come up. The key and value are the front and reverse sides of the card. You can use the `sqlite3` CLI to create a card deck. You may be able to get twice as fast performance by enabling WAL with `PRAGMA journal_mode=WAL` because WAL only writes the content once instead of twice.
+Flash cards are stored in the `cards` table of a SQLite database. There are four columns: `idx INTEGER PRIMARY KEY, weight INTEGER, key STRING, val STRING`. The `idx` is a unique index for each card, starting at 0. The weight is how often the card should come up. The key and value are the front and reverse sides of the card.
+
+To create a card deck, use `sqlite3 cards "CREATE TABLE cards (idx INTEGER PRIMARY KEY, weight INTEGER, key STRING, val STRING)`. You may be able to get twice as fast performance by enabling WAL with `PRAGMA journal_mode=WAL` because WAL only writes the content once instead of twice.
Now build this project with `gcc sd.c segmenttree.c -o sd -lsqlite3 -O2 -march=native` and run `./sd` to enjoy a fast flash cards experience! The program will display the `key` of a randomly selected card. Press any key to show the `val` of the card. Now press either `y` or `n` depending on whether you got the card correct, and the program adjusts that card's weight.