/MMM-VocabularyTrainer

Vocabulary Trainer Module for MagicMirror²

Primary LanguageJavaScriptMIT LicenseMIT

GitHub license Build Status Code Climate Known Vulnerabilities API Doc

MMM-VocabularyTrainer

Vocabulary Trainer Module for MagicMirror²

Examples

Dependencies

Installation

  1. Clone this repo into ~/MagicMirror/modules directory.

  2. Configure your ~/MagicMirror/config/config.js:

    {
        module: "MMM-VocabularyTrainer",
        position: "top_right",
        config: {
            ...
        }
    }
    
  3. Run command npm install --productive in ~/MagicMirror/modules/MMM-VocabularyTrainer directory.

Config Options

Option Default Description
provider 'custom' API provider (See full list below).
nativeTimeout 10 * 1000 (10secs) Display time of native word.
foreignTimeout 20 * 1000 (20secs) Display time of foreign word.
showTimeLeft true Display countdown bar.
revert false Revert display order of native and foreign words.
color false Use color for the countdown bar.
width '100%' Width of the countdown bar.

Provider

custom (ALL <-> ALL)

Loads dictionairy from MagicMirror/modules/MMM-VocabularyTrainer/public/MMM-VocabularyTrainer.json. There is a sample file provided in this directory as well, to use it you have to do:

  1. Change directory cd ~/MagicMirror/modules/MMM-VocabularyTrainer/public directory.
  2. Copy file cp MMM-VocabularyTrainer.json.sample MMM-VocabularyTrainer.json.

geschichtsvereinkoengen (LATIN <-> GERMAN)

Shows latin sayings and their german translations from Geschichts- und Kulturverein Köngen e.V..

To use this API you have to set the provider in config as provider: 'geschichtsvereinkoengen'. To revert the displaying order from latin -> german to german -> latin you have to add revert: true to your config.

Developer

  • npm run lint - Lints JS and CSS files.
  • npm run docs - Generates documentation.

Documentation

The documentation can be found here.

API Provider Development

If you want to add another API provider checkout this Guide.