Skip to content

pete-may/AnkiVocabBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnkiVocabBuilder

AnkiVocabBuilder is a language learning tool that helps you generate a deck of Anki flashcards to learn vocab words in your target language.

Submit a word and and it provides a simple interface that lets you select image and audio files to add to your flashcards.

When your finished, click Add to Anki, and the card will be inserted into your language deck.

Demo

AnkiVocabBuilder Demo

Media Sources

Prerequisites

3. Download the template deck

I've provided a template deck that you can use to get started.

Go to https://ankiweb.net/shared/info/1737709539 and click "Download" to download the deck. Then import it into Anki.

This deck contains a note type that AnkiVocabBuilder uses to create new cards. You can customize this note type to your liking.

Note: I've added a short script to the Back Template of my Anki cards that dynamically adds Spanish definite articles to gendered nouns. For example, entering 'm' in the gender field for "gato" renders the word as "el gato" during study. Feel free to change this to your target language's definite articles or to not use the feature at all.

4. Create a SerpAPI account

This app uses SerpAPI to get images from Google Images. You'll need to create an account to use this app. There's a free tier that allows you to make 100 searches per month.

Go to https://serpapi.com/ and create an account. You will need to add your SerpAPI secret key to the config file.

Installing

1. Clone this repository and change into the directory

git clone https://github.com/pete-may/AnkiVocabBuilder.git
cd AnkiVocabBuilder

2. Create a virtual environment and install all of the dependencies

python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt

3. Add your SerpAPI secret key to the config file

    SERP_API_KEY = <YOUR_KEY_HERE>

4. Install Redis to cache SerpAPI search ids (optional)

The free version of SerpAPI limits the number of searches you can do per month. To help avoid hitting this limit on repeat searches, AnkiVocabBuilder caches SerpAPI search ids in a locally running Redis database. If you don't want to use Redis, simply don't install it.

macOS:

brew install redis

Usage

1. Make sure Anki is running

2. Start Redis server (optional):

brew services start redis

3. Run:

flask run

4. Go to http://localhost:5000/ in your browser.

Misc.

Adding a language

To add a new language, add the language name and its lanuage code to the config file:

    LANGUAGES = {"Spanish": "es", "French": "fr", "Russian": "ru"}

Acknowledgements

About

Language learning tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published