This is a re-published (& slightly updated) article, orginaly published on my first blog The Journal (now offline, redirecting here)

The webmaster of Good News Publishers, the publishers of the ESV Bible, emailed me on Saturday to let me know that GNP now have an RSS feed for the ESV bible. There are two feeds. One is a ‘Verse of the day’ Feed and the other is a lookup feed. I have taken the Verse of the Day feed and modified Dean Peter’s versescrape script. It’s much simpler and doesn’t rely on a regular expression that can be broken any time that the Bible Society changes it’s text file.

So in short, I am impressed. The lookup feed is very good too. It takes a query string variable ‘passage’ that is the verse reference (eg John 3:16) and returns the verse. The feed is in RSS 2.0 and it can return multiple verses.

The semantics of the feed are:

  • Each <item> of the RSS feed is a different verse
  • The <title> is the reference
  • The <description> is the verse text
  • The <link> is the link back to the verse on the ESV bible.

OK, this is the code for the script to make the Verse of the Day RSS Feed into the HTML seen on this site: http://resources.slaven.net.au/code/versefromrss.pl, remember to change the $versefile variable to wherever you put your include files. Stick the file in your cgi-bin, chmod to 755 (execute all), then put the script in your crontab file and set it to run once a day. I’ve got mine running at 1:00 AM (0 1 * * * /path/to/versefromrss.pl)

This is a great service that the people at GNP have provided. It is really good to see a Christian organisation providing content on the web to further the cause of the kingdom.

UPDATE: Dean Peters has written a script for this that has a few other funky features, like trying the feed 10 times before giving up. He also says lots of nice things about me!

[?]