Instant search for Shakespeare’s sonnets

Reputedly William Shakespeare, but who knows?

Some bloke with a moustache

I’ve written an application to search Shakespeare’s sonnets, which links to Quarto 1 facsimiles of each of the poems at the the University of Victora Internet Shakespeare Editions website.

You can access it as a plain old web page in Chrome, Safari or Opera, or install the free web app at the Chrome Web Store.

The app doesn’t do much — it’s just very fast, and works locally and offline.

I’m working on a Firefox version using the Indexed Database API. Not sure where Internet Explorer is headed in terms of local database storage.


How to use it

Enter text in the input box at the top of the page to display lines from sonnets containing the text.

Search is not case sensitive. Note that a minimum of two characters must be entered. Line numbers are shown to the right of each line.

Click any line to display the whole sonnet from which it is taken.

Click on a sonnet to display a Quarto 1 facsimiles of it at the the University of Victora Internet Shakespeare Editions website.


How does it work?

The sonnets are stored in JSON format in json/sonnets.js.

The first time the app is first opened, the JSON is parsed and the sonnets are stored locally in a Web SQL database. (I’m working on an IndexedDB version for Firefox and future versions of Chrome and other browsers.)

Whenever query text is entered or altered, the database is queried and any results are formatted and displayed.


Feedback

Please send bug reports, comments or feature requests to samdutton@gmail.com.

Advertisements

About Sam Dutton

I am a Developer Advocate for Google Chrome. I grew up in rural South Australia, went to university in Sydney, and have lived since 1986 in London, England. Twitter: @SW12
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s