Working with the Anki database on mac OS using Python

Not long ago I ran across this post detailing a method for opening and inspecting the Anki database using Python outside the Anki application environment. However, the approach requires linking to the Anki code base which is inaccessible on mac OS since the Python code is packaged into a Mac app on this platform. The solution I’ve found is inelegant; but just involves downloading the Anki code base to a location on your file system where you can link to it in your code.

Process automation in building Anki vocabulary cards

For the last two years, I’ve been working through a 10,000 word Russian vocabulary ordered by frequency. I have a goal of finishing the list before the end of 2019. This requires not only stubborn persistence but an efficient process of collecting the information that goes onto my Anki flash cards. My manual process has been to work from a Numbers spreadsheet. As I collect information about each word from several websites, I log it in this table.

More Javascript with Anki

I wrote a piece previously about using JavaScript in Anki cards. Although I haven’t found many uses for employing this idea, it does come up from time-to-time including a recent use-case I’m writing about now. After downloading a popular French frequency list deck for my daughter to use, I noticed that it omits the gender of nouns in the French prompt. In school, I was always taught to memorize the gender along with the noun.

Serious audio processing on the command line

I’ve written previously about extracting and processing mp3 files from web pages. The use case that I described, obtaining Russian word pronunciations for Anki cards is basically the same although I’m now obtaining many of my words from Forvo. However, Forvo doesn’t seem to apply any audio dynamic range processing or normalization to the audio files. While many of the pronunciation mp3’s are excellent as-is, some need post-processing chiefly because the amplitude is too low.

Using macOS NSSpeechSynthesizer to generate audio content for Anki cards

As I’ve written before, I use Anki for Russian language learning. One of the skills to master in learning a foreign language is to quickly speak and recognize numbers. With a little help from macOS, I’ve developed a way of rapidly creating audible content of spoken numbers for my Anki cards. That’s the good news. The bad news is that as of right now, you’ll have to have Xcode and build the app yourself.

Introducing AnkiStats & AnkiStatsServer

The spaced repetition software system Anki is the de facto standard for foreign language vocabulary learning. Its algorithm requires lots of performance data to schedule flashcards in the most efficient way. Anki displays these statistics in a group of thorough and informative statistical graphs and descriptive text. However, they aren’t easily available for the end-user to export. Thus, the reason behind the companion projects AnkiStats and AnkiStatsServer. The premise is that you can run your own more extensive experiments and statistical tests on the data once you have it in hand.

An easier way to automate synchronization of Anki profiles with AppleScript

After waking up this morning with my mouse locked onto the Anki icon in the dock and trying to figure out how to get Activity Monitor up and running so I could force quite my Automator application that I described yesterday I figured it was back-to-the-drawing board. I’d like to have used the Accessibility Inspector to manipulate the PyQt objects in Anki’s windows, they aren’t exposed in a may that you can script them.

Scheduling synchronization of Anki databases on OS X

While working on a project to automatically collect statistics on my Anki databases (stay tuned…) I worked out a system for scheduling synchronization from my desktop OS X machine. Prerequisites LaunchControl is a GUI application that lets you create and manage user services on OS X Anki is a spaced repetition memorization software system The solution relies on Automator. Normally, I don’t care much for Automator. It has too many limits on what tasks I can accomplish and workflows created with it are often fragile.

Resizing of images for Anki with Hazel and ImageMagick

I use Anki to study foreign language vocabulary. It’s the de facto spaced repetition software for memorization.^[Yes, I’m aware that others exist. I’ve tried many but always have come back to Anki.] When making flashcards for language learnings, I try to use imagery as much as possible. So a card may have a Russian word on one side and just an image on the opposite side. (Since I already know the English word that the image represents, why not try to engage a different part of the brain to help with memorization?

anki_tool: low level manipulation of Anki databases

Speaking of Anki, here’s a Swiss Army knife of database utilities that provides searching, moving and renaming functions from the command line. On GitHub. You can do things like this to rename and collect tags: $ anki_tool mv_tags '(dinosaur|mammal)' animal Looks cool.