GithubHelp home page GithubHelp logo

phrogg / mmm-clonewarsquotes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from macd2point0/mmm-clonewarsquotes

0.0 1.0 0.0 338 KB

The `MMM-CloneWarsQuotes` MagicMirror² module displays a random intro quote (Jedi proverb) from The Clone Wars television series, seasons 1-7.

License: MIT License

CSS 2.90% JavaScript 97.10%

mmm-clonewarsquotes's Introduction

Module: MMM-CloneWarsQuotes (german version)

The MMM-CloneWarsQuotes is a MagicMirror² module that displays a random intro quote (Jedi proverb) from The Clone Wars television series, seasons 1-7.

Using the module (default settings)

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

modules: [
	 {
		module: "MMM-CloneWarsQuotes",
		position: "middle_center",
		config: {}
	 }
]

The MMM-CloneWarsQuotes is a MagicMirror² module that displays a random intro quote (Jedi proverb) from The Clone Wars television series, seasons 1-7.

Screenshots

  • MMM-CloneWarsQuotes Screenshot Quotes Screenshot

Using the module

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

modules: [
	 {
		module: "MMM-CloneWarsQuotes",
		position: "middle_center",	// This can be any of the regions.
						// Best results in the middle regions: 
						// upper_third, middle_center, or lower_third
		config: {
			// The config property is optional.
			// If no config is set, the default quotes are shown randomly.
			// See 'Configuration options' for more information.
			quotes: [
				"This is the first quote",
				"This is the middle quote",
				"This is the last quote",
			],
			remoteFile: null, // set to null to use quotes config parameter
			classes: "bright large", // white text, large
			updateInterval: 60000, // 1 minute
			fadeSpeed: 2000, // 2 seconds
			random: false  // Show the quotes in the order listed.
		}
	}
]

Configuration options

The following properties can be configured:

Option Description
quotes The array of quotes. The remoteFile property must be null to use this property.

Possible values: An array of quote strings: See Quotes Configuration below.

Default value: [].
remoteFile External file from which to load the quotes

Possible values: Path or URL (starting with http:// or https://) to a JSON file containing an array of quotes, configured as per the External Quotes File (see below). Set to null to use the quotes config array property.
Default value: MMM-CloneWarsQuotes.json
classes Override the CSS classes of the div showing the quotes

Possible values: A space separated list of MM2 classes: Found at ~/MagicMirror/css/main.css and MMM-CloneWarsQuotes.css
Default value: light blue medium large
updateInterval How often does the quote have to change? (Milliseconds)

Possible values: 1000 - 86400000 (1 sec - 1 day)
Default value: 27000 (27 seconds)
fadeSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 4000 (4 seconds)
random Randomize the quotes

Possible values:true / false
Default value: true

Quote Configuration

The quotes property contains an array of strings. The array contains one or multiple quotes.

Default configuration:

config: {
	quotes: [],
	remoteFile: 'MMM-CloneWarsQuotes.json',
	classes: 'light blue medium large',
	updateInterval: 27000,
	fadeSpeed: 4000,
	random: true
}

External Quotes File

You may specify an external file that contains the quotes arrays. This is particularly useful if you have a large number of quotes and do not wish to crowd your config.js file with a large array of quotes. Adding the remoteFile variable will override an array you specify in the configuration file. Set to null to use the quotes config array.

This file must be straight JSON.

Example quotes.json file:

[
	"Great leaders inspire greatness in others.",
	"Belief is not a matter of choice, but conviction.",
	"Easy is the path to wisdom for those who are not blinded by themselves.",
]

mmm-clonewarsquotes's People

Contributors

macd2point0 avatar phrogg avatar

Watchers

 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.