in_the_wee_small_hours is a simple Sinatra app to log thoughts, rants or ideas—basically, anything that can be expressed with words—one might have “In the Wee Small Hours of the Morning” (a track on Frank Sinatra’s album, In the Wee Small Hours).
In other words, a digital notebook of sorts.
In addition to Ruby, you’ll need the following gems:
You can install them using Bundler:
$ bundle install
Next, run the following in your console:
$ ruby in_the_wee_small_hours.rb
You will then be able to access http://localhost:4567/.
Entries are Textile files in the /entries/
directory, which will be converted to HTML for display using the RedCloth gem.
The files need to be named with the following convention: YYYYMMDD_HHMMSS.textile
. This is your entry’s timestamp.
There is a built-in script that you can use to create a new entry with the current timestamp: ruby script/new
.
All such files will be picked up by the app and listed in reverse chronological order when you load the index page in your browser.