Skip to content

This is a module for the MagicMirror². It displays historical events from Wikipedia based on the current date using the free Wikimedia API.

License

Notifications You must be signed in to change notification settings

slugmuffin/MMM-OnThisDayWikiApi

Repository files navigation

MMM-OnThisDayWikiApi

License

This is a module for the MagicMirror². It displays historical events from Wikipedia based on the current date using the free Wikimedia API. The event items will scroll through with the time-based (updateInterval).

Screenshots

Default Configuration

Screenshot

Configured to show as list

Screenshot

Install the module

Go to modules folder

cd modules

Clone this module from Github

git clone https://github.com/slugmuffin/MMM-OnThisDayWikiApi

After adding this module to your config (see below) restart your MagicMirror².

Update the module

Go to modules folder

cd modules/MMM-OnThisDayWikiApi

Pull changes from Github

git pull

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

let config = {
    modules: [
        {
            module: "MMM-OnThisDayWikiApi",
            position: "bottom_bar", // All available positions
            config: {
                // See below for configurable options, this is optional
            },
        },
    ]
};

Configuration options

All configuration options are optional so the module works out of the box.

Option Description
language Language code.

Possible values:
NOTE: See below. Language
Default value: en
type Possible values:
all: Returns all types
selected: Curated set of events that occurred on the given date
births: Notable people born on the given date
deaths: Notable people who died on the given date
holidays: Fixed holidays celebrated on the given date
events: Events that occurred on the given date that are not included in another type
Default value: selected
showAsList Display the event items as a list.

Possible values: true or false
Default value: false
maxDisplayList Total amount of items to display at once while cycling through (when shown as a list).

Possible values:1 - ...
Default value: 4
title The title to display (when shown as a list), enabled/disabled with showTitle.

Possible values: string
Default value: "On This Day:"
showTitle Display the configured title (when shown as a list).

Possible values: true or false
Default value: true
maxWidth Max width of the displayed events content (when shown as a list).
Possible values:0 - 5000
Default value: 400px
wrapTitle Wrap the title of the item to multiple lines.

Possible values: true or false
Default value: true
hideLoading Hide module instead of showing LOADING status.

Possible values: true or false
Default value: false
reloadInterval How often does the content needs to be fetched? (Milliseconds)

Possible values: 1000 - 86400000
Default value: 3600000 (1 hour)
updateInterval How often do you want to display a new event? (Milliseconds)

Possible values:1000 - 60000
Default value: 10000 (10 seconds)
animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 1000 (1 seconds)
sortItems Whether or not to sort the items by year recent->past.

Possible values:true - false
Default value: true
maxItems Limits the total amount of items stored (after sort). (0 for unlimited)

Possible values:0 - ...
Default value: 0
prohibitedWords Remove item if one of these words is found anywhere in the title (case insensitive and greedy matching)

Possible values: ['word'] or ['word1','word2',...]

Language

Supports the same languages as the Wikimedia API. To translate/customize the title, use the config.

Defaults to english.

Currently supported languages:

Language Language code
English English en
Deutsch German de
Français French fr
Svenska Swedish sv
Português Portuguese pt
Русский Russian ru
Español Spanish es
العربية Arabic ar
Bosanski Bosnian bs

Problems

If you have any problems or questions, feel free to open an issue. There are many possible improvements for this module so please let me know if you miss something.

License: MIT

See LICENSE

Thanks

Thank you to:

About

This is a module for the MagicMirror². It displays historical events from Wikipedia based on the current date using the free Wikimedia API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published