poemify
v1.1.1
Published
Arbitrarily generate poetry w/ a body of text
Readme
poemify
generate a
poem at random
with
a corpus
of; provided text. newlines
and
indentations? and
punctuation
are- addedusage
npm install poemifyadd -g flag if you want to use globally
var Poem = require('poemify');
var p = new Poem(fs.readFileSync('masterpiece.txt').toString());
console.log(p.generate());options
poemify takes in an object of options:
coinflip(function) - callback to determine random functions (must return boolean)indent(string) - characters to use as indentationmax_line_length(number) - number of words in a linemax_stanza_length(number) - number of lines in a stanzanew_line(string) - character to use for new linenew_stanza(string) - character(s) to block into new stanzapunctuation(boolean) - insert randomized punctuation?variable_length(boolean) - should lines + stanzas have differing word/line lengths?
(cli)
- use
-por--punctuationflag to include random punctuation - use
-sor--stanza-lengthto set stanza length - use
-lor--line-lengthto set line length - use
-vor--variable-lengthto switch variable stanza + line length - use
-Vor--versionto get the version number
poemify masterpiece.txt
>> masterpiece poem
>> echo'd out
>> in the command
>> lineor pipe text in
pbpaste | poemifylicense
MIT
