Giter VIP home page Giter VIP logo

random_quotes's Introduction

Module: random_quotes

The random_quotes module returns a random quote based on the category set. Supplied quotes are courtesy of http://brainyquote.com. Since there is no API for BrainQuote.com, you will have to manually add new ones. See the section on Updating Quotes below.

Installing the module

Clone this repository in your ~/MagicMirror/modules/ folder

git clone https://github.com/KirAsh4/random_quotes

Using the module

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

modules: [
			{
				module: 'random_quotes',
				position: 'lower_third',
				config: {
						// The config property is optional
						// Without a config, a random quote is shown,
						// selected from all of the categories available.
				}
			}
]

Configuration options

The random_quotes module allows you to pick quotes randomly from all the provided categories, or you can set it to only use one category. Specifying multiple categories is curently not supported.

Options Description Default
More options may get added later.
updateInterval How often a new quote gets displayed. Value is in SECONDS. 300 seconds (every 5 minutes)
fadeSpeed How fast (in SECONDS) to fade out and back in when changing quotes. 4 seconds
category What category to pick from. random - The random setting will pick a random quote out of all the available categories. Or you can set it to a specific category: inspirational, life, love, motivational, positive, or success.

Updating Quotes

Because BrainyQuote.com does not proide an API for their database, you will have to update/change the quotes manually. You can edit the random_quotes.js file and add/remove quotes from the various sections. You may even delete an entire section.

Most random quotes APIs out there only allow for a single 'quote of the day'. If you want to have a random quote each time you send a request, most of them will require a paid subscription. In keeping this module 'free', I opted to not force anyone to have to pay for a service.

random_quotes's People

Contributors

kirash4 avatar wilco89 avatar

Watchers

James Cloos avatar  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.