Siddharth’s Blog

Python hack (PyFlickring?)

Posted on: March 7, 2007

Today I have added a new ‘photos page‘ to this blog for linking to my individual flickr photosets from here. But I do not want to keep updating this page manually every time I add a new set on flickr. Several developers have already written WordPress plugins to handle this issue so as to dynamically generate the flickr content on the server after querying the user’s flickr page. However, these solutions are not applicable to users of wordpress.com since we cannot run arbitrary plugins on the wordpress.com server with a free blog account.

In the absence of the server side solutions being applicable, I wondered if it would be possible to write a script to download flickr information using the flickr API and then update the blog page that I just set up using the WordPress API. If this worked out then I could potentially set up this script to run in a cron job and forget about updating this page manually. Turns out this is indeed possible using python and the associated API wrappers for Flickr and WordPress. The whole hack took me a couple of hours to get it working once I had located the API keys and appropriate python API wrappers. Its a bit rudimentary right now, but I plan to polish it a bit further to get better output and then I’ll post the script out here for others to refer, comment or use πŸ™‚

Meanwhile if you just can’t wait, please drop me a note and I’ll send you a beta copy πŸ˜‰

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Posts by date

March 2007
M T W T F S S
« Feb   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031  

Earlier posts

My tweets

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: