Skip to content

Latest commit

 

History

History
81 lines (63 loc) · 4.04 KB

README.md

File metadata and controls

81 lines (63 loc) · 4.04 KB

MMM-COVID19

A MagicMirror² helper module to track reported cases of COVID-19.

license

Example

German translation

Example

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/bibaldo/MMM-COVID19.git

Add the module to the modules array in the config/config.js file:

  {
    module: "MMM-COVID19"
  },

Configuration options

The following properties can be configured:

Option Description
header The header text

Default value: 'COVID-19'
worldStats Worldwide stats

OPTIONAL
Possible values: false or true
Default value: false
countries The countries that we want to get live COVID-19 stats

Possible values: [ "Argentina, "USA" ]
Default value: [ "Argentina", "Italy", "Spain", "Germany" ]
orderCountriesByName Order results by country name (true) or total number of confirmed cases (false)

OPTIONAL
Possible values: false or true
Default value: false
orderAscending Sort order for orderCountriesByName

OPTIONAL
Possible values: false (descending) or true (ascending)
Default value: false
lastUpdateInfo Last update info in UTC Time

OPTIONAL
Possible values: false or true
Default value: false
delta Show 2 more columns (New Cases and New Deaths)

OPTIONAL
Possible values: false or true
Default value: false
showExtraInfo Show Cases per Million and Serious Cases

OPTIONAL
Possible values: false or true
Default value: false
highlightCountry Enhances background for one country to improve visibility

OPTIONAL
Possible values: "country name" (i.e. "France")
Default value: none
rapidapiKey rapidApi.com api key

MANDATORY
Check Notes
headerRowClass The font size of the row headers

Possible values: 'small', 'medium', 'big'
Default value: 'small'
infoRowClass The font size of data

Possible values: 'small', 'medium', 'big'
Default value: 'big'
updateInterval How often does the content needs to be fetched? (Milliseconds)

Possible values: 1000 - 86400000
Default value: 300000 (5 minutes)
timeFormat Formatting date and time for lastUpdateInfo

OPTIONAL
Posible values: check https://momentjs.com/docs/#/displaying/format/
Default value: "MMMM Do YYYY, h:mm:ss a" // April 7th 2020, 03:08:10 pm

Config Example

  {
    module: "MMM-COVID19",
    position: "top_left",
    config: {
      updateInterval: 300000,
      worldStats: true,
      delta: true,
      lastUpdateInfo: true,
      countries: [ "Argentina", "China", "Italy", "Spain" ],
      headerRowClass: "small",
      rapidapiKey : "01d6665ba777fdb4117cdmshc742d5373fae8f1cp148639jsn1" // this is an example, do not try to use it for real
    }
  },

Notes

Updating

To update the module to the latest version, use your terminal to go to your MMM-COVID19 module folder and type the following command:

git pull

Feel free to open any Issue 😃