As I’ve mentioned before I use Anki extensively to memorize and practice Russian vocabulary. With language learning in particular, adding spoken pronunciations to the cards makes an enormous difference. Since I use Open Russian extensively to provide information to built my Anki cards, it’s a natural source of audio data, too. To optimize my learning time, I built two small scripts to grab and rename the audio files from the Open Russian site. First, I’ll describe my workflow.
My vocabulary workflow
Each morning, I pull 6 words from the a Russian word frequency list to add to my Anki deck. With each word, I use Open Russian to look up the complete definition, example sentences, syllabic stress, and other pieces of information that go on the flashcard. To facilitate OpenRussian.org opening in its own dedicate browser window, I built a Fluid application out of it. Having common workflow-related sites like this in their own dedication applications makes a lot of sense for task isolation.
Finally, for many words, I like to extract the audio from the site and add it to the card that I’m building. It turns out to be a cumbersome step because the audio doesn’t play in a QuickTime or other player that allows me to save the file. The source sound files can be downloaded from Shtooka but this is yet another step. This is where my enhanced workflow comes in.
What should the enhanced workflow do?
Optimally, I should be able to grab the URL that is displayed in the Open Russian Fluid application. Using the content of that page, I should be able to obtain the URL of the mp3 file for that word and save it to the desktop using the Russian word as the filename.
First is a Python application that grabs the URL from the Fluid app, extracts the audio file URL, and downloads it to the desktop.
To make this even faster, I assigned the script to a Quicksilver keystroke trigger. It’s that simple. Once little twist that I discovered was that difficulty in launching a Python application from a Quicksilver trigger. Although there must be an easier way, I haven’t found it. Instead, I just wrote an AppleScript that runs the application in question and I used that as the triggered script in Quicksilver:
There may be a way to finish the process and add this to the Anki card in one step. I’ll have to work on that.