AJAX Bible App Update

I updated the Bible App. It now shows verse numbers. The Bible Parsing Javascript Object has also been updated. It will now accept references that are fully spelled out or abbreviated. You can enter just the verse, or just the chapter. And it is case insensitive. So the following types of refs will work:

  • Matthew 3:9
  • Mat 3
  • 1jn 2:11-12
  • 1 john 3:1
  • genesis 4
  • john 3:16

and so on. You can find the entry to the bible app on the Projects page. I will soon zip everything up for download, though you could get all the files you needed now. 

Update:
There seems to be a bug in the reference parsing object. For some reason 1jn or 1john brings up references from revelation. The issue lies in my regex expressions. I’d be grateful if someone were to point out where the problem is. ;)

Update 2:
I found the error in the parsing object. It now works just fine.

Javascript Bible Reference Parsing Object

In an effort to encourage the coding of a bible reference object (see previous post on my bible app), I though I would post some specifications in a clearer format than I had previously, along with some example inputs and outputs. Feel free to comment in the comments section, and if you build one, let me know, I would be more than happy to host it here with proper attribution of course. If we used a GPL type system, the library could become very robust. Thanks!

Bible Parsing Object Definition:

Input: String
Output: Object with attributes (book, bookname, chapter, startverse, endverse, [error])

Notes:

Reference: "Matthew"
Returns: error="Invalid Reference. Please include a chapter and/or verse range"

Reference: "Matthew 1"
Returns: book=’matthew’, bookname=’40′, chapter=’1′, startverse=’1′, endverse=’25′

Reference: "Matthew 1:1"
Returns: book=’matthew’, bookname=’40′, chapter=’1′, startverse=’1′, endverse=’1′

Reference: "Matthew 1:1-5"
Returns: book=’matthew’, bookname=’40′, chapter=’1′, startverse=’1′, endverse=’5′

Common Abbreviations should work, but the book should always return the full name.

Example Object:


function Reference(bibleRef) {

var book;
var bookname;
var chapter;
var startverse;
var endverse;

// A lot of parsing and stuff happend here. ;)

this.book=book;
this.bookname=bookname;
this.chapter=chapter;
this.startverse=startverse;
this.endverse=endverse;

}

Photoshop Blogging Plugin

Isn’t it about time some smart photoshop/programmer/photoblogger used the Photoshop SDK to build a Blog This! plugin that used the Atom API (or any number of the other blogging APIs). That way I could post photos straight from photoshop. And if the plugin would let you opt to have the Title, Description and other stuff pulled straight from the EXIF metadata, all the better. Heck, I would pay for something like that. Oh, and one more thing, if the plugin would also, when it grabbed stuff from metadata, allow me to specify a post date, that would be like icing on the cake. I could automatically post using the batch function! Ok lazyweb, do your stuff!