I thought it might be fun to get my Backpack Reminders syndicated as an RSS feed, for easy sharing outside of a calendar. So, I whipped up a little Rails app to do just that.
How can I use this for myself?
This requires that you have a web hosting account with a provider that supports Ruby on Rails. If you’re in the market for one, I’ve been really happy with my experience at Joyent.
The other thing to watch out for here is security. You don’t want anyone who can guess the URL to be able to read the feed. So, I embedded a security token in the URL that is “unguessable” for all intents and purposes. Also, I avoid storing that token in the source code in clear text by using a standard encryption algorithm.
To use this, the steps are more or less as follows:
- Download the Rails app.
- Edit the file
app/controllers/feed_controller.rbto include your Backpack username and API key.
- Choose a security token to be embedded in your feed’s URL. In this example, let’s pretend it’s
- Generate the SHA-1 hash of your security token. On a Mac, this can be done in Terminal with
echo -n mytoken | openssl dgst -sha1. Put this value in the appropriate spot on line 6 of
- Change the text blurbs in
app/views/feed/rss.rxmlto pretty-up the display of the feed.
- Upload the Rails app to your web host and test the URL. It should be something like
How does this work?
The Backpack API makes it a breeze to access your reminders in Ruby, and Rails makes it easy to serve an RSS feed. This is basically the minimum amount of glue need to connect the two. If you’d like more details, the files of interest are
If you look at
rss.rxml, you’ll notice that I ran into a time zone gotcha because my web host is in a different time zone then my Backpack. If anyone has suggestions on how to improve this, please leave a comment and get in touch.