Thursday, July 17, 2008

Feed2JS: Convert RSS to JavaScript

Shame on me: here I've had this blog for weeks now, and I haven't posted anything yet about Feed2JS.org, the "Feed 2 JavaScript" service that I use all the time. So, let me take care of that right now! (In a later post, I'll explain how to use Feedburner to accomplish something similar, converting RSS to a javascript you can use in a blog, wiki or website - very handy if you are laready using Feedburner to manage your feeds.)

Feed2JS is a web-based utility which will take an RSS feed (from a blog, from a wiki, an RSS feed of your del.icio.us tags), and turn that feed into a javascript so that you can insert it into a webpage environment. You cannot display RSS directly in a webpage environment because RSS is pretty scary-looking computer gobbledy-gook, but the Feed2JS services takes the gobbledy-gook (also known as XML) and turns it into something humans can read (in other words, HTML).

You can configure just what part of the RSS feed you want displayed - the name of the source (or not), the dates of the posts (or not), the number of posts, and so on. For serious web folks, you can also play around with CSS in order to create a particular style for the way the content will be displayed. The only caveat is that the javascript sits on the Feed2JS.org server; if it goes down for maintenance or some other reason, your script will come up blank. So, you might want to talk to the IT guys in your school or company about running your own copy of Feed2JS locally; you can get information about how to do that at the Feed2JS.org website.

Meanwhile, here's how you can use the standard Feed2JS service in just a few easy steps:

Step 1: Generate Preview. Get the RSS feed address you want to use, and go to the Build page at the Feed2JS.org website. Paste in the URL of the feed, and choose any of the options shown there. Then click on the Preview Feed button to make sure the results are what you wanted.


Just as a sample, here are the latest three items from the feed for our student newspaper at OU, the OU Daily:

Step 2: Get Code. If the results look good to you, click on the Close Window button. Then, click on the Generate Javascript button, and get the code from the box on the screen. You need to highlight all the code that is in the box, and copy it:


Step 3: Insert Code. You are now ready to insert the javascript code into a web environment that allows javascript (I've posted previously in this blog about how to insert javascripts into Blogger.com blogs, Desire2Learn, and PBWiki, among others).

So - presto! - here are the latest headlines from our student newspaper:




Some dynamic content may not display if you are reading this blog via RSS or through an email subscription. You can always visit the How-To Tech Tips blog to see the full content, and to find out how to subscribe to the latest posts.

2 comments:

kef said...

FBI reports that online crime is at an all time high. So why are we hearing so little about it? Cyber crime has been estimated by the US Treasury to be more valuable than the illegal drugs trade - worth more than $100 billion a year (http://technology.timesonline.co.uk/tol/news/tech_and_web/the_web/article2844031.ece). What you don't see talked about much is that most large internet corporations are Mafia owned, and when a new successful company rises up, they buy it. Almost all online pornography is owned by mafia, usualy made from captive women & children in Russia or Eastern Europe. Large amounts of free spyware/antivirus software is created by mafia (http://www.timesonline.co.uk/tol/news/uk/article882386.ece), household names, & unsafe against their manufacturer, who create the kind of viruses etc. which you are trying to clean from your computer to begin with. About the only serious online non Mafia corporation is Microsoft, which is under continual attack from them, the reason you need continual security updates. You can read about how I came to know these things here: http://endmafia.com/

Zane Waltz said...

Nice article on coverting rss feeds to javasript. You can see some examples of mine at http://www.zanestop10.com