Generate random haikus!
Uses an algorithm, a custom dictionary, some grammar rules, and a team of hamsters running in wheels.
Play with it at haikugadget.com
A short poem consisting of three lines:
five syllables here
then seven syllables here
then five syllables
Add this line to your application's Gemfile:
gem 'haiku_gadget'
And then execute:
$ bundle
Or install it yourself as:
$ gem install haiku_gadget
First, turn on the gadget:
require 'haiku_gadget'
Get a random haiku as an array of three lines:
HaikuGadget.haiku
Or pass in a delimiter, which will return the haiku as a single string:
HaikuGadget.haiku ' / '
To get a single random line, try one of these methods:
HaikuGadget.top_line
HaikuGadget.middle_line
HaikuGadget.bottom_line
Or specify the line you want by an index:
HaikuGadget.random_line 0
HaikuGadget.random_line 1
HaikuGadget.random_line 2
- Fork it ( http://github.com/zenblender/haiku_gadget/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request