2
Usage
Jens Tirsvad Nielsen edited this page 2026-10-14 23:59:14 +08:00

Usage

🌐 English · Dansk · Bahasa Malaysia

Study the cards

  1. Start the program with python -m flash_card.
  2. Choose a level: 100 words, 1000 words or All words. The word list is ordered from the most to the least frequent word, so level 100 is the 100 most frequent words.
  3. A card shows a Malay word. Try to remember its Danish translation.
  4. After three seconds the card turns over and shows the translation.
  5. Press the green tick when you knew the word, or the red cross when you did not.
  6. A new random word of the level appears. Repeat.

A word you marked as known is removed and does not come up again. When no word of the level is left, the card says "Nothing left to learn"; restart the program and choose a higher level.

Your progress

  • The first time you press the green tick, the program writes data/words_to_learn.csv with the words you do not know yet.
  • The next start uses that file. If it does not exist, the program uses the full word list data/ms-da.csv.
  • To start again, delete data/words_to_learn.csv.
  • The red cross never changes the file.
  • Known words stay known at every level. The level only limits which of the words you do not know yet come up, and the file always keeps every word you do not know, also those outside the level.
  • This list has 1000 words, so "1000 words" and "All words" give the same cards.

File format

Both files are UTF-8 text with one card per line and the cells separated by a semicolon. The first line holds the two language codes.

ms;da
aku;mig
yang;hvilke

Options

Option Meaning
--data-dir <folder> Folder that holds ms-da.csv and words_to_learn.csv (default: data/ of the repository)
--level {100,1000,all} Start at that level and skip the level screen
--no-speech Do not speak the Malay word, even when the speech extra is installed

Use another language pair

Put a file with the same format in the data folder and name it ms-da.csv, or change VOCABULARY_FILE_NAME and LANGUAGE_NAMES in src/flash_card/constants.py. The header codes are shown as language names from LANGUAGE_NAMES; unknown codes are shown in upper case.

Troubleshooting

Problem What to do
No module named tkinter Install Tkinter (python3-tk on Debian and Ubuntu)
No sound Install the speech extra and check the network; the program logs a warning when speaking fails
The program stops with a message about the file The CSV file is malformed; the message names the file and the line. The file is not overwritten