Olympic Medals Module for MagicMirror2
{
module: 'MMM-OLYMPIC-MEDALS',
position: 'top_left',
config:{
season: 'winter',
year: 2022,
useAbbreviations: false,
}
}
{
module: 'MMM-OLYMPIC-MEDALS',
position: 'top_left',
config:{
season: 'winter',
year: 2022,
useAbbreviations: true,
}
}
{
module: 'MMM-OLYMPIC-MEDALS',
position: 'top_left',
config:{
season: 'winter',
year: 2024,
}
}
{
module: 'MMM-OLYMPIC-MEDALS',
position: 'top_left',
config:{
season: 'summer',
year: 2024,
}
}
- An installation of MagicMirror2
- npm
- cheerio
-
Clone this repo into
~/MagicMirror/modules
directory. -
Configure your
~/MagicMirror/config/config.js
:{ module: 'MMM-OLYMPIC-MEDALS', position: 'top_right', config: { // all your config options, which are different than their default values } }
-
Run command
npm install
in~/MagicMirror/modules/MMM-OLYMPIC-MEDALS
directory.
Option | Default | Description |
---|---|---|
season |
'summer' |
'summer' or 'winter' |
year |
2024 |
Year to get medais for. Invalid year will throw an error on start. |
reloadInterval |
3600000 (1 hour) |
How often should the data be fetched. |
tableSize |
'xsmall' |
Font size of table. Possible values: 'xsmall' , 'small' , 'medium' , 'large' and 'xlarge' |
numOfRows |
10 |
Max number of countries to show in table. |
useAbbreviations |
false |
Whether to use full country name or 3 character abbreviation. |
This module screen scapes the ESPN page for medals. If ESPN changes their format of how they display their medal count, this module will need updates.
Currently, only summer and winter olympics are supported with the ESPN url.