Magic Mirror Module for displaying a poem of the day using poemist API. Optionally utilize detect language API to filter poems by language
- Install Magic Mirror
- Change into the
modules
directory and cloneMMM-PoemOfTheDay
cd modules
git clone https://github.com/Steven-Gassert/MMM-PoemOfTheDay.git
- Add this to the MagicMirror modules array in
config/config.js
ex.
modules: [
{
module: "MMM-PoemOfTheDay",
position: "lower_third",
config: {
textLimit: 1000,
lineLimit: 10,
detectLanguageApiKey: "{API_KEY}",
languageSet: ["en", "es"],
updateInterval: 120000
}
}
]
- optional: to enable langague filtering, you must include a
detectLanguageApiKey
as well aslanguageSet
. See Configuration options below to find out where to retrieve these values
Name | description | default |
---|---|---|
textLimit | the max number of characters allowed in a poem | 1000 |
lineLimit | the max number of lines allowed in a poem (determined by number of new lines /n) | 10 |
detectLanguageApiKey | api key used to make detect language calls, see Get API key at https://detectlanguage.com/ |
undefined |
languageSet | an array of language options that the poem should be written in, for a complete list of language options see https://ws.detectlanguage.com/0.2/languages | ["en", "es"] |
updateInterval | interval at which the poems will update in milliseconds, minmum 120000 | 300000 |