Metadata-Version: 2.4
Name: fr-anki
Version: 0.1.0
Summary: Provide a list of French infinitive verbs and specify desired tense, the tool automatically generates Anki deck for all person-specific conjugations
Project-URL: Homepage, https://github.com/yenyen1/generate-anki-deck
Project-URL: Issues, https://github.com/yenyen1/generate-anki-deck/issues
Author-email: Yenyen Wang <wangyenyen.st00g@g2.nctu.edu.tw>
License-Expression: LGPL-3.0-or-later
License-File: LICENSE
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: fr-audio>=0.3.0
Requires-Dist: genanki>=0.13.0
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# Generate French learning Anki Deck

A CLI tool that creates French verb conjugation typing decks for Anki. Simply input a list of infinitives and choose which tenses to practice. The tool generates an APKG file ready to be imported into Anki. Currently supported common tenses include: indicatif présent, indicatif futur simple, indicatif passé composé, indicatif passé simple, conditionnel présent, and impératif présent.

## Installation

### From PyPI
```
pip install fr-anki
```

### From Git
```
git clone https://github.com/yenyen1/generate-anki-deck.git 
cd generate-anki-deck 
pip install .
```

### Print help
```
fr-anki --help
```

**NOTE**: The first run may take about a minute to download the model.

## Usage: Generate French verb conjugation typing deck

### Input verbs list by `--infinitives`
Use comma-separated infinitive verbs to input verbs list by `--infinitives` option.

```
fr-anki verb --tense present --infinitives "avoir,prendre,aller"
```

### Input verbs list by `--infinitive-file`
Use a TXT file containing one infinitive verb per line to input verbs list.

```
fr-anki verb --tense present --infinitive-file verbs.txt
```

### Example of verb list `verbs.txt`

```
avoir
prendre
aller
```
### Import new cards into an existing Anki deck

Specify `--deck-id` (the ID of the existing Anki deck you want to import into) and `--start-pid` (the next consecutive primary ID after your existing cards) if you want to import new cards into an existing Anki deck.

```
fr-anki verb --tense present --infinitive-file verbs.txt --deck-id 132526148 --start-pid 52
```

### Example of output Anki Deck `output.apkg`

- **Front**

    It shows the infinitive form with audio. You can type the conjugations separated by `/` in the input box.

    <img src="images/verb_front.png" width="80%">

- **Back**

    It displays all conjugation forms with audio and highlights your typing errors in different colors.

    <img src="images/verb_back.png" width="80%">



## Credits
This tool uses the following Python libraries:
- [genanki](https://github.com/kerrickstaley/genanki/tree/main): A Python 3 library for generating Anki decks
- [fr-audio](https://github.com/yenyen1/french-conjugation-verb-audio): A tool for downloading MP3 audio of French verb conjugations that leveraging [verbecc](https://github.com/bretttolbert/verbecc?tab=readme-ov-file) (for verb conjugation enhanced with machine learning techniques) and [edge-tts](https://github.com/rany2/edge-tts?tab=readme-ov-file) (for accessing to Microsoft Edge’s online text-to-speech service from Python).