Tag Archives: Python

Auto-publishing posts from Python

As I work on my latest program, Markov Comic Generator, I find myself increasingly wishing that it had the ability to automatically post the generated comics to this site. The way I’m currently handling auto-posting of Mimi and Markov works but is not optimal: I wrote a shell script which, after running MCG, scp‘s two copies of each comic to a certain directory on the server. One of the copies is named with the current date, the other is always given the name “current.png”. On this site I have a static page which always shows “current.png”. I also have a WordPress plugin called FileAway which is responsible for generating the RSS feed and the file list displayed on the past comics page.

This is undesirable because it relies on extra software being installed on both the blog server (FileAway) and the computer running MCG (scp).

I’ve found out that both WordPress and Python support this protocol called XML-RPC. All I have to do now is figure out how to get them to play nice together…