Coder Social home page Coder Social logo

jbishop129 / mmm-youtubechannelstats Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ianperrin/mmm-youtubechannelstats

0.0 0.0 0.0 715 KB

A MagicMirror Module for displaying statistics for a YouTube channel.

License: MIT License

CSS 9.50% JavaScript 77.08% Nunjucks 13.43%

mmm-youtubechannelstats's Introduction

MagicMirror Module: MMM-YouTubeChannelStats

A MagicMirror Module for displaying statistics about YouTube channels.

Platform License Test Status Code Climate Known Vulnerabilities

Example

Example screenshot

Installation

  1. Stop your MagicMirror and clone the repository into the modules folder

    cd ~/MagicMirror/modules
    git clone https://github.com/ianperrin/MMM-YouTubeChannelStats.git
    cd ~/MagicMirror/modules/MMM-YouTubeChannelStats
  2. Create a Google API key

  3. Add the module to the config file (~/MagicMirror/config/config.js) for your mirror.

    modules: [
      {
        module: "MMM-YouTubeChannelStats",
        position: "top_right",
        config: {
          channelIds: "your_youtube_channel_id,another_youtube_channel_id",
          apiKey: "your_google_api_key"
        }
      }
    ];

    The full list of config options can be found in the configuration options table.

  4. Restart the MagicMirror

    pm2 restart mm

Updating the module

To update the module to the latest version,

  1. Pull the changes from this repository into the module folder:

    cd ~/MagicMirror/modules/MMM-YouTubeChannelStats
    git pull
  2. Restart the mirror

    pm2 restart mm

Configuration options

The following properties can be added to the configuration:

Option Default Description Possible Values
channelIds The YouTube channel id or ids. Note: Multiple channel ids can be entered as a comma separated list (e.g. "id1,id2") or an array of strings (e.g. ["id1", "id2"])..
apiKey The YouTube API key.
stats ["views", "subscribers", "videos"] Optional - Which statistics to display. Note: - The stats can be listed in any order, and only one is required. However, they must be entered as an array of strings i.e. comma separated values within square brackets. views, subscribers, videos
showLabels true Optional - Display labels next to the statistics. true or false
grayscale true Optional - Display channel images in grayscale. true or false
maximumChannels 0 Optional - The maximum number of channels displayed in the module. If 0 (or not defined), all channels will be shown. If maximumChannels is less than the number of configured channelIds, the channels will automatically rotate based on the rotationInterval 0 or a number less than the number of channelIds.
fetchInterval 3600 * 1000 (1 hour) Optional - How often the statistics should be fetched (in milliseconds). 1000 - 86400000
rotationInterval 10 * 1000 (10 seconds) Optional - How often the channels should be rotated if maximumChannels is also set. 1000 - 86400000
animationSpeed 2.5 * 1000 (2.5 seconds) Optional - The speed of the update animation (in milliseconds). 0 - 5000

mmm-youtubechannelstats's People

Contributors

ianperrin 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.