Skip to content

Magic Mirror Module for displaying the poem of the day using poemist API (https://magicmirror.builders/)

Notifications You must be signed in to change notification settings

Steven-Gassert/MMM-PoemOfTheDay

Repository files navigation

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

About

Magic Mirror Module for displaying the poem of the day using poemist API (https://magicmirror.builders/)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published