Quantcast
Channel: Tzetze Fly » xmlrpc
Viewing all articles
Browse latest Browse all 2

Automatic blog posts from your del.icio.us bookmarks

$
0
0

Similar to the way I wanted to share my Google Reader Shared items on my blog (that post is here), I also decided I wanted to share some of my del.icio.us bookmarks. If you aren’t familiar with del.icio.us (read previous coverage here), it allows you to bookmark sites in the internet “cloud”, then easily access those links by searching, by tags, or through an RSS feed.

Del.icio.us offers a tool, currently in beta, to do just this, but it offers very little in the way of customization. To get to it, log into del.icio.us, choose ‘settings’, then ‘daily blog posting’. This tool didn’t work for me – I wanted a way to specify that only certain tags get posted to my blog, I wanted control over the look of the post, and I wanted the option of posting a draft so that I could examine it before it goes live.

Below is a Ruby script I wrote that accomplishes all these things. It consumes an RSS feed of your recent del.icio.us bookmarks, optionally only those tagged with a specified tag, formats them, and automatically posts them to your WordPress blog using their XML-RPC interface. I really don’t want every bookmark I make to appear in my blog – neither do you – so I have set up my script to only include bookmarks I tag “post:tzetzefly”. As I create bookmarks throughout the day, I simply add this tag, along with any other descriptive tags, and I know that this item will appear on my blog later that day.

You can run this manually, or schedule it to run at a specific time as a cron job. Note that this does not rely on inserting the post directly into the WordPress SQL tables as I’ve seen other WP plug-ins do – that requires you to have access to the WP database, which you don’t if (like me) your blog is hosted at wordpress.com.

Again, what this shows is how easy it is to “glue” together different web services to accomplish a useful goal when all the players use well documented web standards. The script can be found here. Read the comments at the very top for examples of how to run it. Make sure you edit your personal settings in the “Stuff you should change” section.



Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images