Wednesday, 23 November 2011

RSS to XML and FTP Update

Wow!  I actually did some coding in Lotusscript yesterday.  It was actually a pleasure, but not something I would like to do on a daily basis going forward.  It is always nice to dust off some old skills and prove that you can still achieve something worth while and in a timely manner.

Here is the new website.  PMBlogs

My tasks was to simulate Planet Lotus.  As far as I know, there is not a "Planet Project Management" and I would like to collect all of my PM blogs into a single webpage, updated hourly to see the latest blog entries.  I know I can use Google Reader, but there is something useful about having all of the blogs in a single list on a single page.
My first task was to find a simple RSS feed capture database.  I had used one previously and so I dusted off the nsf and created a new copy.  

The second task was to create a simple "proof of concept" HTML page that would read XML entries, created from a view within the RSS database.  I used a W3Schools article to help me.  I had to change the tag references and the file name to point to the web address of my web, but that was easy enough.

Then came the problems....

The first problem was that by using ?readviewentries functionality, the XML input did not work.  I played around with the tags, but could not get this code to work.  So, I thought about using JSON and so trawled the web for some help to get me started, but ended up back with the xml code.

I had some code to export a view using LotusScript to an XML file.  So, I updated the code to work with my view and it produced a nicely formatted XML file.  I could then FTP this to my webhost and the html page would read the file and produce the required formatted page.  The problem was this was a manual task and so was not fully automated and therefore would not keep my new website updated.

So.... I found the following script library in the Sandbox (Link).  Along with my code above, I was able to create an updated feed every 30 minutes and automatically FTP this file to my website and then display this online.

Here is the new website.  PMBlogs

If you would like a demo of the code, I will get  the script library and an example nsf file uploaded. 

1 comment:

  1. I'd love to see a the code. Or even better yet turn this into an openNTF project if you are so inclined. That would be awesome!