French Gen Python (name is a wip!) is a Python program which allows you to turn a piece of French text into Anki flashcards.
- The specified text is filtered out to remove punctuation or words which may not be useful to turn into flashcards
- For example, 'stopwords' such as 'la', 'ci' or 'de' may not be made into flashcards
- Anki flashcards are then made for all of the remaining words
- On the front of each flashcard there is the the word, the TTS audio of word and the sentence in which the word was originally in
- On the back of each flashcard there is the translation of the word and the gender of the word if the word is a noun
- Clone this repo
git clone https://github.com/cmbak/French-Anki.git
- Navigate to the French-Anki folder and install the required packages using pip
cd French-Anki
python -m pip install -r requirements.txt
- Follow the installation instructions then run the command:
python main.py [path]
Where path is the FULL path to the .txt file containing the french text.
-
Delete the newly created folder
PY_TTS_AUDIO/
if it was not deleted by the program. -
Import the generated Anki deck (
french_gen_py.apkg
) by opening Anki and going to File>Import and then choose the new deck. -
Start revising :)
- Enter the full path to the file e.g.
C:\Users\user\Desktop\french_recipe.txt
, not./french_recipe.txt
- Wrap the path in double quotes if there is a space in the path e.g.
"C:\Users\user\Desktop\Language Learning\some_french_text.txt"
- The specified file must be a text file (.txt) encoded using UTF-8
Using the sample text as an example:
py main.py "C:\Users\user\Desktop\Language Learning\sample_texts\art_de_la_traduction.txt"