Python

Recently, I had become aware that Anki 2.0 was in beta through my friend Tom, who is working on making some changes to the MCD Support plugin so that it supports languages like Spanish as well as it does Japanese. Despite this awareness, it never crossed my mind that I might need to update the Esperanto Support addon that I wrote a couple years ago until I received an email from Damien Elmes, the author of Anki, that it was time to look at doing so.

This post is a result of many attempts at trying to find an existing solution, deciding that nothing did what I needed, and writing the code myself. Specifically, I wanted to be able to verify whether or not that a file is a valid MP3 file from Python. I did not want any dependency on non-Python code (for cross-platform reasons), nor did I need to encode, decode, play, record, or any other such operations to the file. I just needed to know if it was an MP3 or not, and that is all. Oh yeah, and the file will probably have a random file name without the .mp3 extension.

So I decided to learn Esperanto, which as an avid user of the SRS application Anki, meant I needed to either enter Esperanto’s special characters (ĉ, ĝ, ĥ, ĵ, ŝ, ŭ­) into my flash cards, which can’t easily be typed with the US International keyboard layout, or I could deal with the ugly “x method” workaround (cx, gx, hx, jx, sx, ux). At first, I was only creating Esperanto cards from my Linux computers at home, which let me use an Esperanto keyboard layout to type in the special characters. Pretty soon though, I found myself creating cards from my Windows machine at work during breaks. There is no Esperanto keyboard layout in Windows by default, so I tried to install some third party keyboard layouts without success. I eventually came across a program called Ek, which seemed to do the job of letting me type special characters, except in Anki where it would only type “ĉ”. So I just dealt with the “x method” and was typing words like vojagxas instead of vojaĝas. I don’t know why, but after a while all the x’s began to really bother me. I didn’t want to see mangxi in my flash cards, it just doesn’t seem as natural as manĝi does. So I did what any other software developer would do….

This is the third post in the BibleFeed Project. If you haven’t already, read the first and second posts.

In my last post I stated the difficulty I was having finding a python library to handle the SOAP web service which I’ll be using to get the data for this project. I gave up on using a library for SOAP and decided to use urllib2 to send the SOAP request and retrieve the response, and ElementTree to parse the response. Both of these are standard libraries in Python 2.5 and higher, so you should not need to install anything extra to use these libraries.

This post is not part of my Biblefeed series of posts, but it is very much related. For the Biblefeed project, I was hoping to consume this web service in order to get the data I need to make the project work. The web service appears to be a SOAP web service written in .Net.

This is the second post relating to the BibleFeed Project. If you haven’t yet, you may want to read the first post.

I’m definitely a creature of habit. I often tell myself I need to read the bible more, so I could actually know something about my faith. I haven’t been doing this because it has been difficult I never bothered to put it into my routine. I figure if I can integrate the bible with something I read everyday, like Google Reader, I may actually accomplish something instead of just setting up yet another abstract desire in my mind without a plan of action.