Using Google Blogger Data Api to implement auto-post

I have a php program running on Dreamhost daily to rip and convert the audio file from another website, which is used by itunes only. I want to make it blogger friendly so auto-post is a must-have feature. It turns out Google Api is the best solution. (wordpress seems don’t have this yet?)

Currently, gdata api only support Java, dotNet, php and Python. (Shocked! No Ruby!) My php version on DH is 4XX but gdata needs 5XX. dotNet is impossible on Linux and I don’t want waste time on Java, I had to study a little bit Python. After half-hour learning, I regret I should know Python earlier. It’s so powerful and easy to configure, except it’s stupid force-indent coding style.

Anyway, I made it working on my DH now. The trick is to add a line to import my local python library provided by Gdata.

import sys
sys.path.append('/usr/lib/python/')

New update: It seems google has a spam control for this auto-post api,
you can not create more than 50 post within 24 hours.
So please keep patient when you are moving blog into google. It takes days.

Advertisements