A minimalistic memory card app written in Python 3.12
- Language pairs: select at launch (default
german-english). - Input: use
dictionary.json(list of {"german","english"} objects). - Controls:
Arrow Left= not remembered,Arrow Right= remembered. Alternate single-key substitutes can be set in.env(e.g.LEFT_KEY=a). - Stats (
stats.jsonl): every hit appends a JSON line. Each line records eitherleft_hitsorright_hitsas 1 (the other is 0). - Summary (
stats_summary.json): written on a graceful exit (Ctrl+C or termination signals). On startup the app will use a validstats_summary.jsonif present; otherwise it scansstats.jsonlto rebuild stats. - Daily counts: the app tracks daily swipe counts and stores them in the summary under
daily. When the configured daily goal is reached the app prints a short notification. - Prioritization: unseen pairs are presented first. Left-swiped pairs are prioritized using
LEFT_PRIORITY_FACTOR; remembered pairs are deprioritized according toREFRESH_FREQUENCY(all set in.env). - Configuration (
.env): supported keys includeREFRESH_FREQUENCY,RIGHT_HITS_THRESHOLD,DAILY_GOAL_SWIPES,LEFT_PRIORITY_FACTOR,LEFT_KEY, andRIGHT_KEY. - Exit: press Ctrl+C to exit; the app saves
stats_summary.jsonon exit. - Display: text-only UI.
python memory_cards.py [language_pair]Note: default language pair is german-english.
Create dictionary.json and .env from the provided samples, or supply your own. Example:
cp dictionary_sample.json dictionary.json
cp .env_sample .env
cp stats_sample.jsonl stats.jsonldictionary.json is required.
- The app displays one side of a random pair.
- Recall the translation in your head.
- Press
Right Arrowif you remembered it,Left Arrowotherwise (substitute keys accepted). - The app reveals the answer.
- Press an arrow again to confirm and continue.
- Default configuration values:
REFRESH_FREQUENCY=30,RIGHT_HITS_THRESHOLD=30,DAILY_GOAL_SWIPES=100,LEFT_PRIORITY_FACTOR=1.5. dictionary.jsonaccepts keysgerman/englishorde/en.- Each round records the initial swipe and the confirmation swipe (two appended lines in
stats.jsonl). - Each
stats.jsonlline includeslanguage_pairandlast_seentimestamp.
Marchello aka frz