Skip to content
Magic Mirror Module for displaying the poem of the day using poemist API (https://magicmirror.builders/)
JavaScript
Branch: master
Clone or download
Steven-Gassert Merge pull request #5 from Steven-Gassert/bug/update-interval
fix: change updateInterval default so we dont go over api limits
Latest commit ed94a10 Dec 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__mocks__
__test__ bug: fix updateInterval Dec 20, 2019
docs/images docs(README): update Dec 8, 2019
.gitignore chore(config): use MMM config syntax Dec 8, 2019
MMM-PoemOfTheDay.js
README.md fix: change updateInterval default so we dont go over api limits Dec 20, 2019
node_helper.js
package-lock.json
package.json chore(config): use MMM config syntax Dec 8, 2019

README.md

MMM-PoemOfTheDay

Magic Mirror Module for displaying a poem of the day using poemist API. Optionally utilize detect language API to filter poems by language

Screenshot

MMM-PoemOfTheDay screenshot

Usage

  1. Install Magic Mirror
  2. Change into the modules directory and clone MMM-PoemOfTheDay
cd modules
git clone https://github.com/Steven-Gassert/MMM-PoemOfTheDay.git
  1. 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
    }
  }
]
  1. optional: to enable langague filtering, you must include a detectLanguageApiKey as well as languageSet. See Configuration options below to find out where to retrieve these values

Configuration options

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
You can’t perform that action at this time.