[open-literature] Word of the day!

Rufus Pollock rufus.pollock at okfn.org
Sun Feb 28 20:34:23 UTC 2010

Dear Open Shakepearers,

Just to let you know that, after slightly more herculean efforts than
expected, the word of the day feature is now live and operational!

You can see it in action on the home page (and everywhere else ...):

Which links through to:
<http://www.openshakespeare.org/word/read/baker> (will get rid of
annoying "read" part of that shortly)

I've set it up so that when a new word is added it will automatically
become the new word of the day (upon syncing). Once we have enough
words, we will be able to automatically select a random word from the
list every day.

Until then, this setup is an encouragement to write up new words!



PS: For those who want the technical background here's how it works:

1. We automatically pull content from the wordpress (our CMS) via the
atom feed for the "word of the day" category and after various
cleaning up we cache it in our db using a new arbitrary KeyValue
table. There's a Word domain object which then pulls together this
information with other attributes such as links to stats etc. This
process has to be fairly robust (e.g. to pulling the same data again).
 (BTW all credit to Nick for this excellent idea of pulling from atom
feeds -- something we can extend to the introductions I think)

2. On pull we also automatically store a config item in our DB
pointing to the current word of the day.

3. The web app looks this up and loads the word and puts it in the
sidebar template with a nice new word of the day logo! We also have a
new "word" controller to handle displaying the word of the day
information (this will also be a nice thing to link back into from the
search results, annotations and elsewhere ...)

4. All important aspects of wotd are configurable from the ini file
and of the word of the day stuff can be disabled for installations
(such as openmilton) that do not need it.

More information about the open-literature mailing list