A nifty Javascript module for exploring Stanley Chapman's English translation of Raymond Queneau's famous set of poems entitled Cent mille milliards de poèmes.
This module is written in Javascript, you may load index.js
into a browser or into some Javascript engine.
You can require
the explorer in your own project, like so:
var book = require('./[YOUR PATH HERE]/a_hundred_thousand_billion_poems')
Return one of the "original" sonnets as an array of strings. Index starts at 1, "the first sonnet".
Return all of the lines that appear on the given line_number
as an array of strings. Index starts at 1, "the first line".
Input is an array containing Integers that indicate which page to take a line from. The position of the Integer in the array is the line number to take from the specified page. Index starts at 1 for the sonnet numbers.
Returns an Object
whose key/value pairs are the number of the line and the line itself, e.g.
{
'1': 'Don Pedro from his shirt has washed the fleas',
...
}
Usage would look like
book.withLineNumbers(book.getSonnet(1))
Input an assembled sonnet or array of lines and receive the last word of each line.