Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 2.32 KB

README.md

File metadata and controls

61 lines (46 loc) · 2.32 KB

French Gen Python

Description

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

This produces a flashcard similar to this:

image

Requirements

Installation

  1. Clone this repo
git clone https://github.com/cmbak/French-Anki.git
  1. Navigate to the French-Anki folder and install the required packages using pip
cd French-Anki
python -m pip install -r requirements.txt

Usage

  1. 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.

  1. Delete the newly created folder PY_TTS_AUDIO/ if it was not deleted by the program.

  2. Import the generated Anki deck (french_gen_py.apkg) by opening Anki and going to File>Import and then choose the new deck. image

  3. Start revising :)

IMPORTANT USAGE NOTES:

  • 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

Example:

Using the sample text as an example:

py main.py "C:\Users\user\Desktop\Language Learning\sample_texts\art_de_la_traduction.txt"

License

MIT