Skip to content

Easily generate Anki vocabulary decks from text files

Notifications You must be signed in to change notification settings

dxvsh/AnkiVocabDeckBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

This is a simple Python script that takes a text file containing English words (one on each line) and generates an Anki vocabulary deck out of it such that the front of the card contains the given word and the back contains the meanings/definitions for that word. That's pretty much it!

Usage

  • First, install the required dependencies:

     $ pip install genanki requests
    
  • Run the script:

     $ python ankify.py words.txt
    

    Just replace words.txt with the name of your own text file and the script will start working on building your deck. When it's done you should see a vocabulary_deck.apkg file in your directory. You can now import your deck into Anki and start improving your vocab!

Example output card images:

Below are some cards from my vocabulary deck (imported in AnkiDroid) just to demonstrate how the generated cards look like in action:

example-card-1 example-card-2

Sidenotes:

The script uses the Datamuse API for fetching the word meanings mainly because its freely available to use by anyone without requiring you to register an account unlike most other dictionary APIs which need you to sign up on their platform just to get their API keys (which are rather rate-limited as well). Also the genanki library came in very handy for programatically generating Anki decks/cards.

About

Easily generate Anki vocabulary decks from text files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages