WordRefAnkiNoteCreate - a python command line utility to automate Anki Note creation
GitHub Repo for WordRefAnkiNoteCreate:
https://github.com/jglotzer/WordRefAnkiNoteCreate
As a committed user of both Anki as well as wordreference.com I've always wanted to have an easy way to create new Anki Cards. Creating Anki Cards (or more accurately, Anki Notes, as a Note consists of two sides while a Card is only one side.) can be a laborious, manual process, depending on how complicated or aesthetic you want the card to be. Most of the information one might want can be found at wordreference.com, it's just not organized and/or formatted in a way that makes sense for the way I happen to use Anki. This is because, quite commonly, words have multiple meanings and I want each meaning to be listed once on each side of the created Note. Also, having appealing fonts and colors is a plus. Anything you can do to make the information "stick" in your brain is going to be helpful with this sort of memorization.
Here's an example of what the wordreference.com site shows its users for an example word:
The first step I made in addressing this goal was to find a nice tool called wordreference.py, This is a python code that uses the python package BeautifulSoup to scrape the web content for a given word one might want to learn. This was already a game changer, but given my preferred workflow, it was not presenting the information in the order that I wanted/needed and even there it was only printing the information to the Linux console, and not inputting it into the Anki software.
Here's an example of the unmodified output from wordreference.py after it scrapes the above page :
While this is very visually appealing, for my particular workflow, I wanted the French word and the French examples on one side of the Anki Card (or Note), and I wanted each definition (both English and French) on the other side of the Anki Note. Oh and by the way, I didn't want the English examples at all.
The next step was to use the python dictionary provided by wordreference.py and sort the output so that the information was presented in an order that I could leverage.
The result of this effort was this:
Comments