Guillaume is a generative poetry creation tool.
Add this line to your application's Gemfile:
gem "guillaume"
And then execute:
$ bundle install
Or install it yourself as:
$ gem install guillaume
Guillaume requires a database to work. In order to know what to connect to, you must place a .guillaume_dbs.yml file in your home directory. The config/.guillaume_dbs.yml.example file shows a generic setup for this. You must have development and test environments, but what you do with each is up to you.
Currently, guillaume cannot create a user or db by itself, so you'll have to do that once. The following example is for postgres, assuming a guillaume user and db:
$ createuser -EdP guillaume
$ createdb -U guillaume guillaume
You must then run $ guillaume init
once to run migrations.
See indiviudal commands for specifics on usage (e.g. $ guillaume help read
)
NAME
guillaume - A generative poetry bot
SYNOPSIS
guillaume [global options] command [command options] [arguments...]
VERSION
0.0.2
GLOBAL OPTIONS
--help - Show this message
--version - Display the program version
COMMANDS
forget - Forget a particular source text
help - Shows a list of commands or help for one command
init - Migrate the DB
list - List all known source texts
read - Read, parse, and store a source text in the DB
write - Write a poem
require "guillaume"
source_text = Guillaume::SourceText.new
source_text.file_name = "/path/to/text_source.txt"
source_text.title = "Whatever you want to call it"
source_text.save
source_text.record_ngrams
poem = Guillaume::Poem.new(source_text, max_stanzas: 5)
puts poem.formatted
- Arbitrarily combine source texts into corporas and choose corpora to write from
- Fork it
- 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