I am lucky enough to have a job where the web developers are given a day to work on a project of their choosing, with the end goal of growing skills and sharing the results with their fellow developers. A week ago I got my shot at creating something.
I decided to create an RSS reader with the main function of sending webcomics to a Kindle ereader. The web service (found here) takes an RSS feed, a Kindle email address, and a Kindle-approved email address from a user. Once a day, the site checks the input feeds for new content, and finding any, turns that content into a PDF and emails it directly to the users Kindle email address. Amazon’s Kindle service receives that email, processes it, and delivers the document to the Kindle.
To create the site, I used ColdFusion’s built in cffeed, cfmail, and cfdocument elements, which made the project a cinch to work on. When researching, I found that Raymond Camden had written about cffeed on his blog several times, and these posts were a major help to me throughout the process.
The biggest challenge while creating the service was creating a PDF that played nice with Amazon’s service. When using cfdocument, you are able to pass the resulting document as a variable, which was my initial method when emailing the document. Unfortunately, for whatever reason (I never figured out why, perhaps mimetype issues), Amazon would not process a document sent in this way. What I did instead was save the created PDF from cfdocument to the directory, then attach it to an email using cfmailparam. The great thing about cfmailparam is that it has a handy “remove” attribute, which deletes a document after the email has been sent.
On the front end, I used CSS as much as possible to give the site its look, using only two images and building the logo from text and CSS.