Coder Social home page Coder Social logo

jshaheen3 / mmm-formula1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ianperrin/mmm-formula1

0.0 0.0 0.0 612 KB

A MagicMirror Module for displaying Formula 1 driver and constructor standings.

License: MIT License

JavaScript 46.31% CSS 45.55% Nunjucks 8.14%

mmm-formula1's Introduction

MagicMirror Module: MMM-Formula1

A MagicMirror Module for displaying Formula 1 standings and race schedule.

Platform License Test Status Code Climate Known Vulnerabilities

Example

Example screenshot

The module displays the current Formula 1 standings table from the selected season with the following information

  • The flag for the driver or constructor.
  • The drivers name (when the drivers standings are displayed).
  • The constructor name.
  • The current points total.
  • The current number of wins.

In addition you can configure the following options

  • Which season to display the standings for season
  • Whether to show the drivers or constructors standings type
  • How many drivers/constructors to display in the standings table maxRows
  • Display the upcoming race schedule using the standard calendar module

Installation

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

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/ianperrin/MMM-Formula1.git

Configure the module in your config/config.js file.

Updating

If you want to update your MMM-Formula1 module to the latest version, use your terminal to go to your MMM-Formula1 module folder and type the following command:

git pull

If using the Race Schedule, (re)install ical-generator.

npm install ical-generator

If you haven't changed the modules, this should work without any problems. Type git status to see your changes, if there are any, you can reset them with git reset --hard. After that, git pull should be possible.

Using the module

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

modules: [
  {
    module: "MMM-Formula1",
    position: "top_right",
    header: "F1 Standings",
    config: {
      // Optional configuration options - see https://github.com/ianperrin/MMM-Formula1#configuration-options
    }
  }
];

Configuration options

The following properties can be configured:

Option Default Description Possible Values
season current Optional - The season to display. current = Standings for the current season, or a year (greater than or equal to 1950) = Standings for a specific season.
type DRIVER Optional - The type of standings to display. DRIVER or CONSTRUCTOR
maxRows false Optional - The maximum number of drivers/constructors to show in the standings table. false or a number.
calendar false Optional - Whether the module should publish the upcoming Race Schedule as an ical. true or false.
fade true Optional - Whether to fade the activities to black (Gradient). true or false
fadePoint 0.4 Optional - Where to start fade? 0 (top of the list) - 1 (bottom of list)
reloadInterval 1800000 (30 minutes) Optional - How often does the data needs to be reloaded from the API? (Milliseconds). See the Terms & Conditions for responsible use of the API. 7500 - 86400000
animationSpeed 2500 (2.5 seconds) Optional - The speed of the update animation. (Milliseconds). 0 - 5000
grayscale true Optional - Whether to show the flags in grayscale (true) or colour (false). true or false
showFooter true Optional - Whether to show the footer below the table with information about the season and round. true or false

Displaying the Race Schedule

Stop your Magic Mirror (your exact method may vary)

pm2 stop mm

Install ical-generator in your MMM-Formula1 module directory.

cd ~/MagicMirror/modules/MMM-Formula1
npm install ical-generator

Set the calendar option for your MMM-Formula1 module to true.

config: {
    // Optional configuration options - see https://github.com/ianperrin/MMM-Formula1#configuration-options
    calendar: true,
}

Add the Formula 1 Race Schedule calendar to the calendar module to your configuration (config/config.js).

{
    symbol: 'flag-checkered',
    url: 'http://localhost:8080/MMM-Formula1/schedule.ics',
}

Restart your Magic Mirror (your exact method may vary)

pm2 start mm

mmm-formula1's People

Contributors

ianperrin avatar fewieden avatar el97 avatar slametps avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.