From 98855de71fc7d2f2bcb1f47087237d840484ae0a Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sat, 31 Dec 2016 21:25:49 +0100 Subject: [PATCH 01/91] Changes in preperation of 2.1.1 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9551b79..94fc3495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.1.1] - Unreleased + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` diff --git a/package.json b/package.json index 118c9837..54c60f92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.1.0", + "version": "2.1.1", "description": "A modular interface for smart mirrors.", "main": "js/electron.js", "scripts": { From 3947deb7bdedba7b4e43690c49d00866319ae282 Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Wed, 7 Dec 2016 17:19:05 +0100 Subject: [PATCH 02/91] Add async callback to module when loaded --- js/app.js | 54 ++++++++++++++--------- modules/README.md | 15 +++++++ modules/node_modules/node_helper/index.js | 5 +++ 3 files changed, 54 insertions(+), 20 deletions(-) diff --git a/js/app.js b/js/app.js index ba6cd1a9..91149906 100644 --- a/js/app.js +++ b/js/app.js @@ -66,7 +66,7 @@ var App = function() { * * argument module string - The name of the module (including subpath). */ - var loadModule = function(module) { + var loadModule = function(module, callback) { var elements = module.split("/"); var moduleName = elements[elements.length - 1]; @@ -103,6 +103,10 @@ var App = function() { m.setName(moduleName); m.setPath(path.resolve(moduleFolder)); nodeHelpers.push(m); + + m.loaded(callback); + } else { + callback(); } }; @@ -111,14 +115,24 @@ var App = function() { * * argument module string - The name of the module (including subpath). */ - var loadModules = function(modules) { + var loadModules = function(modules, callback) { console.log("Loading module helpers ..."); - for (var m in modules) { - loadModule(modules[m]); - } + var loadNextModule = function() { + if (modules.length > 0) { + var nextModule = modules[0]; + loadModule(nextModule, function() { + modules = modules.slice(1); + loadNextModule(); + }); + } else { + // All modules are loaded + console.log("All module helpers loaded."); + callback(); + } + }; - console.log("All module helpers loaded."); + loadNextModule(); }; /* cmpVersions(a,b) @@ -164,24 +178,24 @@ var App = function() { } } - loadModules(modules); + loadModules(modules, function() { + var server = new Server(config, function(app, io) { + console.log("Server started ..."); - var server = new Server(config, function(app, io) { - console.log("Server started ..."); + for (var h in nodeHelpers) { + var nodeHelper = nodeHelpers[h]; + nodeHelper.setExpressApp(app); + nodeHelper.setSocketIO(io); + nodeHelper.start(); + } - for (var h in nodeHelpers) { - var nodeHelper = nodeHelpers[h]; - nodeHelper.setExpressApp(app); - nodeHelper.setSocketIO(io); - nodeHelper.start(); - } + console.log("Sockets connected & modules started ..."); - console.log("Sockets connected & modules started ..."); - - if (typeof callback === "function") { - callback(config); - } + if (typeof callback === "function") { + callback(config); + } + }); }); }); }; diff --git a/modules/README.md b/modules/README.md index 42a31dfa..03664b15 100644 --- a/modules/README.md +++ b/modules/README.md @@ -96,6 +96,21 @@ requiresVersion: "2.1.0", ####`init()` This method is called when a module gets instantiated. In most cases you do not need to subclass this method. +####`loaded(callback)` + +*Introduced in version: 2.1.1.* + +This method is called when a module is loaded. Subsequent modules in the config are not yet loaded. The `callback` function MUST be called when the module is done loading. In most cases you do not need to subclass this method. + +**Example:** +````javascript +loaded: function(callback) { + this.finishLoading(); + Log.log(this.name + ' is loaded!'); + callback(); +} +```` + ####`start()` This method is called when all modules are loaded an the system is ready to boot up. Keep in mind that the dom object for the module is not yet created. The start method is a perfect place to define any additional module properties: diff --git a/modules/node_modules/node_helper/index.js b/modules/node_modules/node_helper/index.js index dc57ef36..bdeccf8b 100644 --- a/modules/node_modules/node_helper/index.js +++ b/modules/node_modules/node_helper/index.js @@ -14,6 +14,11 @@ NodeHelper = Class.extend({ console.log("Initializing new module helper ..."); }, + loaded: function(callback) { + console.log("Module helper loaded: " + this.name); + callback(); + }, + start: function() { console.log("Staring module helper: " + this.name); }, From a7619771a637e165dc706f56a992e1e6ea6cec46 Mon Sep 17 00:00:00 2001 From: Ben Brosnahan Date: Mon, 2 Jan 2017 21:31:21 +0000 Subject: [PATCH 03/91] Add error handling to newsfeed --- modules/default/newsfeed/fetcher.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/default/newsfeed/fetcher.js b/modules/default/newsfeed/fetcher.js index b7511de9..f4fb44d9 100644 --- a/modules/default/newsfeed/fetcher.js +++ b/modules/default/newsfeed/fetcher.js @@ -85,7 +85,12 @@ var Fetcher = function(url, reloadInterval, encoding) { nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]); headers = {"User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)"} - request({uri: url, encoding: null, headers: headers}).pipe(iconv.decodeStream(encoding)).pipe(parser); + request({uri: url, encoding: null, headers: headers}) + .on("error", function(error) { + fetchFailedCallback(self, error); + scheduleTimer(); + }) + .pipe(iconv.decodeStream(encoding)).pipe(parser); }; From 4882a801d252bfdd8ab46c067eed0e612678f293 Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Tue, 3 Jan 2017 17:46:41 +0100 Subject: [PATCH 04/91] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94fc3495..e4e8687f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [2.1.1] - Unreleased +- Add loaded function to modules, providing an async callback. ## [2.1.0] - 2016-12-31 From 8ac8b666bf435f90dc81c980b170b13e7f63c53a Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Wed, 4 Jan 2017 08:59:37 +0100 Subject: [PATCH 05/91] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4e8687f..6408d1d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [2.1.1] - Unreleased + +### Added - Add loaded function to modules, providing an async callback. ## [2.1.0] - 2016-12-31 From adb8de97546a6dd07773717d6380ea1a8f7a7f56 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Wed, 4 Jan 2017 10:46:31 +0100 Subject: [PATCH 06/91] Enabled newsfeed default module for gesture events from https://github.com/thobach/MMM-Gestures --- modules/default/newsfeed/newsfeed.js | 101 ++++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 8 deletions(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 74014208..152505dc 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -89,7 +89,8 @@ Module.register("newsfeed",{ if (this.newsItems.length > 0) { - if (this.config.showSourceTitle || this.config.showPublishDate) { + // this.config.showFullArticle is a run-time configuration, triggered by optional gestures + if (!this.config.showFullArticle && (this.config.showSourceTitle || this.config.showPublishDate)) { var sourceAndTimestamp = document.createElement("div"); sourceAndTimestamp.className = "light small dimmed"; @@ -151,18 +152,32 @@ Module.register("newsfeed",{ } } - - var title = document.createElement("div"); - title.className = "bright medium light"; - title.innerHTML = this.newsItems[this.activeItem].title; - wrapper.appendChild(title); - + + if(!this.config.showFullArticle){ + var title = document.createElement("div"); + title.className = "bright medium light"; + title.innerHTML = this.newsItems[this.activeItem].title; + wrapper.appendChild(title); + } + if (this.config.showDescription) { var description = document.createElement("div"); description.className = "small light"; description.innerHTML = this.newsItems[this.activeItem].description; wrapper.appendChild(description); } + + if (this.config.showFullArticle) { + var fullArticle = document.createElement("iframe"); + fullArticle.className = ""; + fullArticle.style.width = "100%"; + fullArticle.style.height = "1735px"; + fullArticle.style.border = "none"; + fullArticle.src = this.newsItems[this.activeItem].url; + wrapper.appendChild(fullArticle); + } + + } else { wrapper.innerHTML = this.translate("LOADING"); @@ -256,7 +271,7 @@ Module.register("newsfeed",{ self.updateDom(self.config.animationSpeed); - setInterval(function() { + timer = setInterval(function() { self.activeItem++; self.updateDom(self.config.animationSpeed); }, this.config.updateInterval); @@ -272,6 +287,76 @@ Module.register("newsfeed",{ capitalizeFirstLetter: function(string) { return string.charAt(0).toUpperCase() + string.slice(1); }, + + notificationReceived: function(notification, payload, sender) { + Log.info(this.name + " - received event"); + if(notification == 'GESTURE'){ + Log.info(this.name + " - received gesture"); + var gesture = payload.gesture; + // actually RIGHT, because gesture sensor is built in upside down + if(gesture == 'LEFT'){ + Log.info(this.name + " - received right"); + var before = this.activeItem; + this.activeItem++; + if (this.activeItem >= this.newsItems.length) { + this.activeItem = 0; + } + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); + } + Log.info(this.name + " - going from " + before + " to " + this.activeItem + " (of " + this.newsItems.length + ")"); + this.updateDom(100); + } + // actually LEFT, because gesture sensor is built in upside down + else if(gesture == 'RIGHT'){ + Log.info(this.name + " - received left"); + var before = this.activeItem; + this.activeItem--; + if (this.activeItem < 0) { + this.activeItem = this.newsItems.length - 1; + } + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); + } + Log.info(this.name + " - going from " + before + " to " + this.activeItem + " (of " + this.newsItems.length + ")"); + this.updateDom(100); + } + // actually UP, because gesture sensor is built in upside down + else if(gesture == 'DOWN' && !this.config.showDescription){ + Log.info(this.name + " - received up"); + this.config.showDescription = true; + this.config.showFullArticle = false; + clearInterval(timer); + timer = null; + this.updateDom(100); + } + // actually DOWN, because gesture sensor is built in upside down + else if(gesture == 'UP'){ + Log.info(this.name + " - received down"); + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); + } + this.updateDom(100); + } + // actually UP, because gesture sensor is built in upside down + else if(gesture == 'DOWN' && this.config.showDescription){ + Log.info(this.name + " - received up again"); + this.config.showFullArticle = true; + this.config.showDescription = false; + clearInterval(timer); + timer = null; + this.updateDom(100); + } else { + Log.info(this.name + " - received other: " + gesture); + } + } + }, }); From 0099b6d4a2df5f9741560a237420b57f98cde343 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Wed, 4 Jan 2017 10:56:03 +0100 Subject: [PATCH 07/91] Added change to CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9551b79..fea09a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [develop] - release date to be defined +- Made default newsfeed module aware of gesture events from https://github.com/thobach/MMM-Gestures + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` From 6251b77b288c43e235ba6b0e6baacc20073bcf64 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Wed, 4 Jan 2017 11:01:07 +0100 Subject: [PATCH 08/91] Fixed code formatting issues --- modules/default/newsfeed/newsfeed.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 152505dc..0fdc9220 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -152,21 +152,21 @@ Module.register("newsfeed",{ } } - + if(!this.config.showFullArticle){ var title = document.createElement("div"); title.className = "bright medium light"; title.innerHTML = this.newsItems[this.activeItem].title; wrapper.appendChild(title); } - + if (this.config.showDescription) { var description = document.createElement("div"); description.className = "small light"; description.innerHTML = this.newsItems[this.activeItem].description; wrapper.appendChild(description); } - + if (this.config.showFullArticle) { var fullArticle = document.createElement("iframe"); fullArticle.className = ""; @@ -176,8 +176,8 @@ Module.register("newsfeed",{ fullArticle.src = this.newsItems[this.activeItem].url; wrapper.appendChild(fullArticle); } - - + + } else { wrapper.innerHTML = this.translate("LOADING"); @@ -287,14 +287,14 @@ Module.register("newsfeed",{ capitalizeFirstLetter: function(string) { return string.charAt(0).toUpperCase() + string.slice(1); }, - + notificationReceived: function(notification, payload, sender) { Log.info(this.name + " - received event"); - if(notification == 'GESTURE'){ + if(notification == "GESTURE"){ Log.info(this.name + " - received gesture"); var gesture = payload.gesture; // actually RIGHT, because gesture sensor is built in upside down - if(gesture == 'LEFT'){ + if(gesture == "LEFT"){ Log.info(this.name + " - received right"); var before = this.activeItem; this.activeItem++; @@ -310,7 +310,7 @@ Module.register("newsfeed",{ this.updateDom(100); } // actually LEFT, because gesture sensor is built in upside down - else if(gesture == 'RIGHT'){ + else if(gesture == "RIGHT"){ Log.info(this.name + " - received left"); var before = this.activeItem; this.activeItem--; @@ -326,7 +326,7 @@ Module.register("newsfeed",{ this.updateDom(100); } // actually UP, because gesture sensor is built in upside down - else if(gesture == 'DOWN' && !this.config.showDescription){ + else if(gesture == "DOWN" && !this.config.showDescription){ Log.info(this.name + " - received up"); this.config.showDescription = true; this.config.showFullArticle = false; @@ -335,7 +335,7 @@ Module.register("newsfeed",{ this.updateDom(100); } // actually DOWN, because gesture sensor is built in upside down - else if(gesture == 'UP'){ + else if(gesture == "UP"){ Log.info(this.name + " - received down"); this.config.showDescription = false; this.config.showFullArticle = false; @@ -345,7 +345,7 @@ Module.register("newsfeed",{ this.updateDom(100); } // actually UP, because gesture sensor is built in upside down - else if(gesture == 'DOWN' && this.config.showDescription){ + else if(gesture == "DOWN" && this.config.showDescription){ Log.info(this.name + " - received up again"); this.config.showFullArticle = true; this.config.showDescription = false; From 09531b399a5b992b9c7080c0371487ae899ffcb7 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Wed, 4 Jan 2017 11:04:33 +0100 Subject: [PATCH 09/91] Fixed Link formatting in MD --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fea09a07..bcb6b70a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [develop] - release date to be defined -- Made default newsfeed module aware of gesture events from https://github.com/thobach/MMM-Gestures +- Made default newsfeed module aware of gesture events from [MMM-Gestures](https://github.com/thobach/MMM-Gestures) ## [2.1.0] - 2016-12-31 From af41e4892ff3d7b7aa8ee9620fd62650c69331c1 Mon Sep 17 00:00:00 2001 From: IgniparousTempest Date: Wed, 4 Jan 2017 16:26:49 +0200 Subject: [PATCH 10/91] Afrikaans language translation --- translations/af.json | 34 ++++++++++++++++++++++++++++++++++ translations/translations.js | 1 + 2 files changed, 35 insertions(+) create mode 100644 translations/af.json diff --git a/translations/af.json b/translations/af.json new file mode 100644 index 00000000..894b14ea --- /dev/null +++ b/translations/af.json @@ -0,0 +1,34 @@ +{ + /* GENERAL */ + "LOADING": "Besig om te laai …", + + /* CALENDAR */ + "TODAY": "Vandag", + "TOMORROW": "Môre", + "DAYAFTERTOMORROW": "Oormôre", + "RUNNING": "Eindig in", + "EMPTY": "Geen komende gebeurtenisse.", + + /* WEATHER */ + "N": "N", + "NNE": "NNO", + "NE": "NO", + "ENE": "ONO", + "E": "O", + "ESE": "OSO", + "SE": "SO", + "SSE": "SSO", + "S": "S", + "SSW": "SSW", + "SW": "SW", + "WSW": "WSW", + "W": "W", + "WNW": "WNW", + "NW": "NW", + "NNW": "NNW", + + /* UPDATE INFO */ + "UPDATE_NOTIFICATION": "MagicMirror² update beskikbaar.", + "UPDATE_NOTIFICATION_MODULE": "Update beskikbaar vir MODULE_NAME module.", + "UPDATE_INFO": "Die huidige installasie is COMMIT_COUNT agter op die BRANCH_NAME branch." +} diff --git a/translations/translations.js b/translations/translations.js index d572c803..d5e74882 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -26,4 +26,5 @@ var translations = { "gr" : "translations/gr.json", // Greek "da" : "translations/da.json", // Danish "tr" : "translations/tr.json", // Turkish + "af" : "translations/af.json", // Afrikaans }; From 6552157894e6047b72dbbdf7339bedd96dea96fe Mon Sep 17 00:00:00 2001 From: Rodrigo Ramez Norambuena Date: Wed, 4 Jan 2017 12:52:21 -0300 Subject: [PATCH 11/91] Remove white flash on boot up When the electron app is started appear a white flash before show the MagicMirror system. This patch remove the white flash on boot up. --- CHANGELOG.md | 3 +++ js/electron.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6408d1d2..cefc49c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Add loaded function to modules, providing an async callback. +### Fixed +- Remove white flash on boot up + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` diff --git a/js/electron.js b/js/electron.js index 173abe68..1f16092b 100644 --- a/js/electron.js +++ b/js/electron.js @@ -28,7 +28,8 @@ function createWindow() { webPreferences: { nodeIntegration: false, zoomFactor: config.zoom - } + }, + backgroundColor: "#000000" } // DEPRECATED: "kioskmode" backwards compatibility, to be removed From 92e0affb85df7f920524ebc0bcd2a82068c31626 Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Wed, 4 Jan 2017 19:22:59 +0100 Subject: [PATCH 12/91] Disable pointer-events on fullscreen overlay --- CHANGELOG.md | 1 + css/main.css | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94fc3495..dc97e5ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [2.1.1] - Unreleased +- Make mouse events pass through the region fullscreen_above to modules below. ## [2.1.0] - 2016-12-31 diff --git a/css/main.css b/css/main.css index 5e63e596..f1c07fa0 100644 --- a/css/main.css +++ b/css/main.css @@ -135,6 +135,11 @@ sup { left: -60px; right: -60px; bottom: -60px; + pointer-events: none; +} + +.region.fullscreen * { + pointer-events: auto; } .region.right { From 396bbd83c8bbee6d92a892cfdb7c5e958427b8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sun, 1 Jan 2017 19:51:50 -0300 Subject: [PATCH 13/91] modified installer to use config.js.sample for init config. --- CHANGELOG.md | 3 +++ installers/raspberry.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6408d1d2..852df9c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2.1.1] - Unreleased +### Changed +- Installer: Use init config.js from config.js.sample. + ### Added - Add loaded function to modules, providing an async callback. diff --git a/installers/raspberry.sh b/installers/raspberry.sh index cd995a1e..b970d02e 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -113,6 +113,9 @@ else exit; fi +# Use sample config for start MagicMirror +cp config/config.js.sample config/config.js + # Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen. echo -e "\e[96mCheck plymouth installation ...\e[0m" if command_exists plymouth; then From 01cf4cc1ed4dcf26eeb8a9722bc828ef9664778b Mon Sep 17 00:00:00 2001 From: Sergey Morozov Date: Fri, 6 Jan 2017 11:21:20 -0800 Subject: [PATCH 14/91] Added Russian Translations Redo of the PR #598 **Added:** - Russian Translations **Fixed:** - corrected .gitignore rules for default modules (Reasoning behind change: when I added translation for `alert` module `git add` was telling me that `.gitignore` rule excludes files and folders under `modules/default`) I also noticed that `.gitignore:56` has following declaration: ``` !/modules/node_helper !/modules/node_helper/** ``` but I don't think this directory structure exists today (also there is a small typo) --- .gitignore | 5 ++-- CHANGELOG.md | 8 +++++ modules/default/alert/translations/ru.json | 4 +++ translations/ru.json | 34 ++++++++++++++++++++++ translations/translations.js | 1 + 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 modules/default/alert/translations/ru.json create mode 100644 translations/ru.json diff --git a/.gitignore b/.gitignore index 67feae54..9e51215c 100644 --- a/.gitignore +++ b/.gitignore @@ -58,8 +58,9 @@ Temporary Items !/modules/node_helper/** # Ignore all modules except the default modules. -/modules/** -!/modules/default/** +!/modules/ +/modules/* +!/modules/default/ !/modules/README.md** # Ignore changes to the custom css files. diff --git a/CHANGELOG.md b/CHANGELOG.md index b9551b79..bc627832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.1.1] - Unreleased + +### Added +- Russian Translation + +### Fixed +- corrected .gitignore rules for default modules + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` diff --git a/modules/default/alert/translations/ru.json b/modules/default/alert/translations/ru.json new file mode 100644 index 00000000..ef7ee708 --- /dev/null +++ b/modules/default/alert/translations/ru.json @@ -0,0 +1,4 @@ +{ + "sysTitle": "MagicMirror Уведомление", + "welcome": "Добро пожаловать, старт был успешным!"" +} diff --git a/translations/ru.json b/translations/ru.json new file mode 100644 index 00000000..053385ee --- /dev/null +++ b/translations/ru.json @@ -0,0 +1,34 @@ +{ + /* GENERAL */ + "LOADING": "Загрузка …", + + /* CALENDAR */ + "TODAY": "Сегодня", + "TOMORROW": "Завтра", + "DAYAFTERTOMORROW": "Послезавтра", + "RUNNING": "Заканчивается через", + "EMPTY": "Нет предстоящих событий", + + /* WEATHER */ + "N": "С", + "NNE": "ССВ", + "NE": "СВ", + "ENE": "ВСВ", + "E": "В", + "ESE": "ВЮВ", + "SE": "ЮВ", + "SSE": "ЮЮВ", + "S": "Ю", + "SSW": "ЮЮЗ", + "SW": "ЮЗ", + "WSW": "ЗЮЗ", + "W": "З", + "WNW": "ЗСЗ", + "NW": "СЗ", + "NNW": "ССЗ", + + /* UPDATE INFO */ + "UPDATE_NOTIFICATION": "Есть обновление для MagicMirror².", + "UPDATE_NOTIFICATION_MODULE": "Есть обновление для MODULE_NAME модуля.", + "UPDATE_INFO": "Данная инсталляция позади BRANCH_NAME ветки на COMMIT_COUNT коммитов." +} diff --git a/translations/translations.js b/translations/translations.js index d572c803..71d086f5 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -26,4 +26,5 @@ var translations = { "gr" : "translations/gr.json", // Greek "da" : "translations/da.json", // Danish "tr" : "translations/tr.json", // Turkish + "ru" : "translations/ru.json", // Russian }; From b8a72245dc93d59f026a499dfe76883e877a21e2 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Fri, 6 Jan 2017 21:57:30 +0100 Subject: [PATCH 15/91] Using generic news feed events as notifications, instead of more implementation specific gestures from sensor --- modules/default/newsfeed/newsfeed.js | 114 ++++++++++++--------------- 1 file changed, 51 insertions(+), 63 deletions(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 0fdc9220..28bc4a0e 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -89,7 +89,7 @@ Module.register("newsfeed",{ if (this.newsItems.length > 0) { - // this.config.showFullArticle is a run-time configuration, triggered by optional gestures + // this.config.showFullArticle is a run-time configuration, triggered by optional notifications if (!this.config.showFullArticle && (this.config.showSourceTitle || this.config.showPublishDate)) { var sourceAndTimestamp = document.createElement("div"); sourceAndTimestamp.className = "light small dimmed"; @@ -289,74 +289,62 @@ Module.register("newsfeed",{ }, notificationReceived: function(notification, payload, sender) { - Log.info(this.name + " - received event"); - if(notification == "GESTURE"){ - Log.info(this.name + " - received gesture"); - var gesture = payload.gesture; - // actually RIGHT, because gesture sensor is built in upside down - if(gesture == "LEFT"){ - Log.info(this.name + " - received right"); - var before = this.activeItem; - this.activeItem++; - if (this.activeItem >= this.newsItems.length) { - this.activeItem = 0; - } - this.config.showDescription = false; - this.config.showFullArticle = false; - if(!timer){ - this.scheduleUpdateInterval(); - } - Log.info(this.name + " - going from " + before + " to " + this.activeItem + " (of " + this.newsItems.length + ")"); - this.updateDom(100); + Log.info(this.name + " - received notification: " + notification); + if(notification == "ARTICLE_NEXT"){ + var before = this.activeItem; + this.activeItem++; + if (this.activeItem >= this.newsItems.length) { + this.activeItem = 0; } - // actually LEFT, because gesture sensor is built in upside down - else if(gesture == "RIGHT"){ - Log.info(this.name + " - received left"); - var before = this.activeItem; - this.activeItem--; - if (this.activeItem < 0) { - this.activeItem = this.newsItems.length - 1; - } - this.config.showDescription = false; - this.config.showFullArticle = false; - if(!timer){ - this.scheduleUpdateInterval(); - } - Log.info(this.name + " - going from " + before + " to " + this.activeItem + " (of " + this.newsItems.length + ")"); - this.updateDom(100); + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); } - // actually UP, because gesture sensor is built in upside down - else if(gesture == "DOWN" && !this.config.showDescription){ - Log.info(this.name + " - received up"); - this.config.showDescription = true; - this.config.showFullArticle = false; - clearInterval(timer); - timer = null; - this.updateDom(100); + Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")"); + this.updateDom(100); + } else if(notification == "ARTICLE_PREVIOUS"){ + var before = this.activeItem; + this.activeItem--; + if (this.activeItem < 0) { + this.activeItem = this.newsItems.length - 1; } - // actually DOWN, because gesture sensor is built in upside down - else if(gesture == "UP"){ - Log.info(this.name + " - received down"); - this.config.showDescription = false; - this.config.showFullArticle = false; - if(!timer){ - this.scheduleUpdateInterval(); - } - this.updateDom(100); + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); } - // actually UP, because gesture sensor is built in upside down - else if(gesture == "DOWN" && this.config.showDescription){ - Log.info(this.name + " - received up again"); - this.config.showFullArticle = true; - this.config.showDescription = false; - clearInterval(timer); - timer = null; - this.updateDom(100); - } else { - Log.info(this.name + " - received other: " + gesture); + Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")"); + this.updateDom(100); + } + // received "more details" the first time, so showing article summary + else if(notification == "ARTICLE_MORE_DETAILS" && !this.config.showDescription){ + this.config.showDescription = true; + this.config.showFullArticle = false; + clearInterval(timer); + timer = null; + Log.info(this.name + " - showing article description"); + this.updateDom(100); + } else if(notification == "ARTICLE_LESS_DETAILS"){ + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); } + Log.info(this.name + " - showing only article titles again"); + this.updateDom(100); + } + // received "more details" a second time, so showing full article + else if(notification == "ARTICLE_MORE_DETAILS" && this.config.showDescription){ + this.config.showFullArticle = true; + this.config.showDescription = false; + clearInterval(timer); + timer = null; + Log.info(this.name + " - showing full article"); + this.updateDom(100); + } else { + Log.info(this.name + " - unknown notification, ignoring: " + notification); } }, - }); From 443a90c7baec08f3254912ba428e2eea717eb887 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Sat, 7 Jan 2017 22:42:11 +0100 Subject: [PATCH 16/91] Made full article view of news full-screen on any screen size --- modules/default/newsfeed/newsfeed.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 28bc4a0e..55f2de58 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -171,7 +171,10 @@ Module.register("newsfeed",{ var fullArticle = document.createElement("iframe"); fullArticle.className = ""; fullArticle.style.width = "100%"; - fullArticle.style.height = "1735px"; + fullArticle.style.top = "0"; + fullArticle.style.left = "0"; + fullArticle.style.position = "fixed"; + fullArticle.height = window.innerHeight; fullArticle.style.border = "none"; fullArticle.src = this.newsItems[this.activeItem].url; wrapper.appendChild(fullArticle); From 456502893ca94234bba8965b04e86db61158edd4 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Sun, 8 Jan 2017 14:38:16 +0100 Subject: [PATCH 17/91] Addressed code review comments to reduce redundant lines --- modules/default/newsfeed/newsfeed.js | 45 ++++++++++------------------ 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 55f2de58..aed917f8 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -291,6 +291,14 @@ Module.register("newsfeed",{ return string.charAt(0).toUpperCase() + string.slice(1); }, + resetDescrOrFullArticleAndTimer: function() { + this.config.showDescription = false; + this.config.showFullArticle = false; + if(!timer){ + this.scheduleUpdateInterval(); + } + }, + notificationReceived: function(notification, payload, sender) { Log.info(this.name + " - received notification: " + notification); if(notification == "ARTICLE_NEXT"){ @@ -299,11 +307,7 @@ Module.register("newsfeed",{ if (this.activeItem >= this.newsItems.length) { this.activeItem = 0; } - this.config.showDescription = false; - this.config.showFullArticle = false; - if(!timer){ - this.scheduleUpdateInterval(); - } + this.resetDescrOrFullArticleAndTimer(); Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")"); this.updateDom(100); } else if(notification == "ARTICLE_PREVIOUS"){ @@ -312,39 +316,22 @@ Module.register("newsfeed",{ if (this.activeItem < 0) { this.activeItem = this.newsItems.length - 1; } - this.config.showDescription = false; - this.config.showFullArticle = false; - if(!timer){ - this.scheduleUpdateInterval(); - } + this.resetDescrOrFullArticleAndTimer(); Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")"); this.updateDom(100); } - // received "more details" the first time, so showing article summary - else if(notification == "ARTICLE_MORE_DETAILS" && !this.config.showDescription){ - this.config.showDescription = true; - this.config.showFullArticle = false; + // if "more details" is received the first time: show article summary, on second time show full article + else if(notification == "ARTICLE_MORE_DETAILS"){ + this.config.showDescription = !this.config.showDescription; + this.config.showFullArticle = !this.config.showDescription; clearInterval(timer); timer = null; - Log.info(this.name + " - showing article description"); + Log.info(this.name + " - showing " + this.config.showDescription ? "article description" : "full article"); this.updateDom(100); } else if(notification == "ARTICLE_LESS_DETAILS"){ - this.config.showDescription = false; - this.config.showFullArticle = false; - if(!timer){ - this.scheduleUpdateInterval(); - } + this.resetDescrOrFullArticleAndTimer(); Log.info(this.name + " - showing only article titles again"); this.updateDom(100); - } - // received "more details" a second time, so showing full article - else if(notification == "ARTICLE_MORE_DETAILS" && this.config.showDescription){ - this.config.showFullArticle = true; - this.config.showDescription = false; - clearInterval(timer); - timer = null; - Log.info(this.name + " - showing full article"); - this.updateDom(100); } else { Log.info(this.name + " - unknown notification, ignoring: " + notification); } From 6171e5cc6e80cac1eaa30e40e34a3cfe1dc1446b Mon Sep 17 00:00:00 2001 From: aaronaxvig Date: Sun, 8 Jan 2017 18:02:45 -0700 Subject: [PATCH 18/91] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c5286dd..7d3ea0a4 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The following wiki links are helpful in the configuration of your MagicMirror² - [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror) ### Updating your MagicMirror² - +8 If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command: ```bash @@ -83,7 +83,7 @@ The following properties can be configured: | `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. | | `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. | | `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** | -| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (defaults `.width = 800` & `.height = 600`). Kiosk mode can be enabled by setting `.kiosk = true`, `.autoHideMenuBar = false`, `.fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). | +| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `.kiosk = true`, `.autoHideMenuBar = false`, `.fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). | Module configuration: From a97fa1abb60877db4eef18209625f259eef46632 Mon Sep 17 00:00:00 2001 From: aaronaxvig Date: Sun, 8 Jan 2017 18:14:30 -0700 Subject: [PATCH 19/91] Remove errant character --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7d3ea0a4..3086d466 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ The following wiki links are helpful in the configuration of your MagicMirror² - [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror) ### Updating your MagicMirror² -8 If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command: ```bash From 6466bd4ba75cbd1c8e386dc00a6835b188541457 Mon Sep 17 00:00:00 2001 From: aaronaxvig Date: Sun, 8 Jan 2017 18:15:48 -0700 Subject: [PATCH 20/91] Add back missing newline --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3086d466..01b94178 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ The following wiki links are helpful in the configuration of your MagicMirror² - [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror) ### Updating your MagicMirror² + If you want to update your MagicMirror² to the latest version, use your terminal to go to your Magic Mirror folder and type the following command: ```bash From d71fd0ff2d85e6b96f2602b05a8ae6b0a4bff47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Mon, 9 Jan 2017 20:39:48 -0300 Subject: [PATCH 21/91] Add pm2 configuration for manager MagicMirror in script installer --- CHANGELOG.md | 1 + installers/mm.sh | 2 ++ installers/pm2_MagicMirror.json | 7 +++++++ installers/raspberry.sh | 6 ++++++ 4 files changed, 16 insertions(+) create mode 100755 installers/mm.sh create mode 100644 installers/pm2_MagicMirror.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 6408d1d2..8f6205eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Add loaded function to modules, providing an async callback. +- Add use pm2 for manager process into Installer RaspberryPi script ## [2.1.0] - 2016-12-31 diff --git a/installers/mm.sh b/installers/mm.sh new file mode 100755 index 00000000..cc6c4bb3 --- /dev/null +++ b/installers/mm.sh @@ -0,0 +1,2 @@ +cd ~/MagicMirror +DISPLAY=:0 npm start diff --git a/installers/pm2_MagicMirror.json b/installers/pm2_MagicMirror.json new file mode 100644 index 00000000..55f8df31 --- /dev/null +++ b/installers/pm2_MagicMirror.json @@ -0,0 +1,7 @@ +{ + apps : [{ + name : "MagicMirror", + script : "/home/pi/MagicMirror/installer/mm.sh", + watch : ["/home/pi/MagicMirror/config/config.js"] + }] +} diff --git a/installers/raspberry.sh b/installers/raspberry.sh index cd995a1e..df3994bc 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -141,6 +141,12 @@ else echo -e "\e[93mplymouth is not installed.\e[0m"; fi +# Use pm2 control like a service MagicMirror +sudo npm install -g pm2 +sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" +pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json +pm2 save + echo " " echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m" echo " " From 2e9b6ead2e18be7187f171e4969481529ec26840 Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Mon, 9 Jan 2017 17:31:01 +0100 Subject: [PATCH 22/91] Fix gitignore to not ignore default modules folder /modules/** makes git ignore all directories and files in /modules, so it's not even looking in /modules/default for changes. !/modules/default/** is therefore never used. By adding the new line !/modules/default, git is told to look in the /modules/default folder for changes and will find all sub files/dirs and match these on !/modules/default/**. --- .gitignore | 1 + CHANGELOG.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 67feae54..1e17ef8b 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ Temporary Items # Ignore all modules except the default modules. /modules/** +!/modules/default !/modules/default/** !/modules/README.md** diff --git a/CHANGELOG.md b/CHANGELOG.md index 6408d1d2..149b9644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Add loaded function to modules, providing an async callback. +### Fixed +- Update .gitignore to not ignore default modules folder + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` From 831d8b6d362af7672a0e7f573ee75b11555025ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 10 Jan 2017 15:21:59 -0300 Subject: [PATCH 23/91] update year license for 2017 --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index d4765af2..09ac7e6f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ The MIT License (MIT) ===================== -Copyright © 2016 Michael Teeuw +Copyright © 2016-2017 Michael Teeuw Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation From 544e7fce8870843bc8e6c976ffafc32e68380875 Mon Sep 17 00:00:00 2001 From: Sergey Morozov Date: Tue, 10 Jan 2017 11:05:37 -0800 Subject: [PATCH 24/91] removing .gitignore changes and changelog notes about it --- .gitignore | 5 ++--- CHANGELOG.md | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 9e51215c..67feae54 100644 --- a/.gitignore +++ b/.gitignore @@ -58,9 +58,8 @@ Temporary Items !/modules/node_helper/** # Ignore all modules except the default modules. -!/modules/ -/modules/* -!/modules/default/ +/modules/** +!/modules/default/** !/modules/README.md** # Ignore changes to the custom css files. diff --git a/CHANGELOG.md b/CHANGELOG.md index 98876061..c046352c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add loaded function to modules, providing an async callback. - Russian Translation -### Fixed -- corrected .gitignore rules for default modules - ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` From 49abe2b11f32034569f13de689fcfd0a71d9cee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 10 Jan 2017 16:11:29 -0300 Subject: [PATCH 25/91] Fix capitalize missing word Community --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c5286dd..126a1d7f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec - [Configuration](#configuration) - [Modules](#modules) - [Known Issues](#known-issues) -- [community](#community) +- [Community](#community) - [Contributing Guidelines](#contributing-guidelines) ## Usage From c302030301900c037e9bb089a819afc08608875c Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Wed, 11 Jan 2017 11:19:33 +0100 Subject: [PATCH 26/91] Added documentation on supported notifications and related third party modules --- modules/default/newsfeed/README.md | 48 +++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 58c7b9ae..8a0fec25 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -1,9 +1,10 @@ # Module: News Feed The `newsfeed ` module is one of the default modules of the MagicMirror. -This module displays news headlines based on an RSS feed. +This module displays news headlines based on an RSS feed. Scrolling through news headlines happens time-based (````updateInterval````), but can also be controlled by sending news feed specific notifications to the module. ## Using the module +### Configuration To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ @@ -30,6 +31,51 @@ modules: [ ] ```` +### Notifications +#### Interacting with the module +MagicMirror's [notification mechanism](https://github.com/MichMich/MagicMirror/tree/master/modules#thissendnotificationnotification-payload) allows to send notifications to the ````newsfeed```` module. The following notifications are supported: + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Notification IdentifierDescription
ARTICLE_NEXTShows the next news title (hiding the summary or previously fully displayed article)
ARTICLE_PREVIOUSShows the previous news title (hiding the summary or previously fully displayed article)
ARTICLE_MORE_DETAILS

When received the *first time*, shows the corresponding description of the currently displayed news title.
The module expects that the module's configuration option ````showDescription```` is set to ````false```` (default value).

+ When received a *second consecutive time*, shows the full news article in an IFRAME.
+ This requires that the news page can be embedded in an IFRAME, e.g. doesn't have the HTTP response header [X-Frame-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) set to e.g. ````DENY````.
ARTICLE_LESS_DETAILSHides the summary or full news article and only displays the news title of the currently viewed news item.
+ +Note the payload of the sent notification event is ignored. + +#### Example +The following example shows how the next news article title can be displayed on the MagicMirror. +````javascript +this.sendNotification('ARTICLE_NEXT'); +```` + +#### ````newsfeed```` specific notification emitting modules +The third party [MMM-Gestures](https://github.com/thobach/MMM-Gestures) module supports above notifications when moving your hand up, down, left or right in front of a gesture sensor attached to the MagicMirror. See module's readme for more details. + ## Configuration options The following properties can be configured: From 3ba16f17734c7da7aa8505943dd03d155bb732e0 Mon Sep 17 00:00:00 2001 From: Thomas Bachmann Date: Wed, 11 Jan 2017 11:32:20 +0100 Subject: [PATCH 27/91] Merge remote-tracking branch 'MichMich/develop' --- .gitignore | 1 + CHANGELOG.md | 12 ++++- LICENSE.md | 2 +- installers/raspberry.sh | 3 ++ js/app.js | 54 ++++++++++++++--------- js/electron.js | 3 +- modules/README.md | 15 +++++++ modules/default/newsfeed/fetcher.js | 7 ++- modules/node_modules/node_helper/index.js | 5 +++ package.json | 2 +- 10 files changed, 79 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 67feae54..1e17ef8b 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ Temporary Items # Ignore all modules except the default modules. /modules/** +!/modules/default !/modules/default/** !/modules/README.md** diff --git a/CHANGELOG.md b/CHANGELOG.md index bcb6b70a..65119703 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,19 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [develop] - release date to be defined +## [2.1.1] - Unreleased + +### Changed +- Installer: Use init config.js from config.js.sample. + +### Added +- Add loaded function to modules, providing an async callback. - Made default newsfeed module aware of gesture events from [MMM-Gestures](https://github.com/thobach/MMM-Gestures) +### Fixed +- Update .gitignore to not ignore default modules folder. +- Remove white flash on boot up. + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` diff --git a/LICENSE.md b/LICENSE.md index d4765af2..09ac7e6f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ The MIT License (MIT) ===================== -Copyright © 2016 Michael Teeuw +Copyright © 2016-2017 Michael Teeuw Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/installers/raspberry.sh b/installers/raspberry.sh index cd995a1e..b970d02e 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -113,6 +113,9 @@ else exit; fi +# Use sample config for start MagicMirror +cp config/config.js.sample config/config.js + # Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen. echo -e "\e[96mCheck plymouth installation ...\e[0m" if command_exists plymouth; then diff --git a/js/app.js b/js/app.js index ba6cd1a9..91149906 100644 --- a/js/app.js +++ b/js/app.js @@ -66,7 +66,7 @@ var App = function() { * * argument module string - The name of the module (including subpath). */ - var loadModule = function(module) { + var loadModule = function(module, callback) { var elements = module.split("/"); var moduleName = elements[elements.length - 1]; @@ -103,6 +103,10 @@ var App = function() { m.setName(moduleName); m.setPath(path.resolve(moduleFolder)); nodeHelpers.push(m); + + m.loaded(callback); + } else { + callback(); } }; @@ -111,14 +115,24 @@ var App = function() { * * argument module string - The name of the module (including subpath). */ - var loadModules = function(modules) { + var loadModules = function(modules, callback) { console.log("Loading module helpers ..."); - for (var m in modules) { - loadModule(modules[m]); - } + var loadNextModule = function() { + if (modules.length > 0) { + var nextModule = modules[0]; + loadModule(nextModule, function() { + modules = modules.slice(1); + loadNextModule(); + }); + } else { + // All modules are loaded + console.log("All module helpers loaded."); + callback(); + } + }; - console.log("All module helpers loaded."); + loadNextModule(); }; /* cmpVersions(a,b) @@ -164,24 +178,24 @@ var App = function() { } } - loadModules(modules); + loadModules(modules, function() { + var server = new Server(config, function(app, io) { + console.log("Server started ..."); - var server = new Server(config, function(app, io) { - console.log("Server started ..."); + for (var h in nodeHelpers) { + var nodeHelper = nodeHelpers[h]; + nodeHelper.setExpressApp(app); + nodeHelper.setSocketIO(io); + nodeHelper.start(); + } - for (var h in nodeHelpers) { - var nodeHelper = nodeHelpers[h]; - nodeHelper.setExpressApp(app); - nodeHelper.setSocketIO(io); - nodeHelper.start(); - } + console.log("Sockets connected & modules started ..."); - console.log("Sockets connected & modules started ..."); - - if (typeof callback === "function") { - callback(config); - } + if (typeof callback === "function") { + callback(config); + } + }); }); }); }; diff --git a/js/electron.js b/js/electron.js index 173abe68..1f16092b 100644 --- a/js/electron.js +++ b/js/electron.js @@ -28,7 +28,8 @@ function createWindow() { webPreferences: { nodeIntegration: false, zoomFactor: config.zoom - } + }, + backgroundColor: "#000000" } // DEPRECATED: "kioskmode" backwards compatibility, to be removed diff --git a/modules/README.md b/modules/README.md index 42a31dfa..03664b15 100644 --- a/modules/README.md +++ b/modules/README.md @@ -96,6 +96,21 @@ requiresVersion: "2.1.0", ####`init()` This method is called when a module gets instantiated. In most cases you do not need to subclass this method. +####`loaded(callback)` + +*Introduced in version: 2.1.1.* + +This method is called when a module is loaded. Subsequent modules in the config are not yet loaded. The `callback` function MUST be called when the module is done loading. In most cases you do not need to subclass this method. + +**Example:** +````javascript +loaded: function(callback) { + this.finishLoading(); + Log.log(this.name + ' is loaded!'); + callback(); +} +```` + ####`start()` This method is called when all modules are loaded an the system is ready to boot up. Keep in mind that the dom object for the module is not yet created. The start method is a perfect place to define any additional module properties: diff --git a/modules/default/newsfeed/fetcher.js b/modules/default/newsfeed/fetcher.js index b7511de9..f4fb44d9 100644 --- a/modules/default/newsfeed/fetcher.js +++ b/modules/default/newsfeed/fetcher.js @@ -85,7 +85,12 @@ var Fetcher = function(url, reloadInterval, encoding) { nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]); headers = {"User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)"} - request({uri: url, encoding: null, headers: headers}).pipe(iconv.decodeStream(encoding)).pipe(parser); + request({uri: url, encoding: null, headers: headers}) + .on("error", function(error) { + fetchFailedCallback(self, error); + scheduleTimer(); + }) + .pipe(iconv.decodeStream(encoding)).pipe(parser); }; diff --git a/modules/node_modules/node_helper/index.js b/modules/node_modules/node_helper/index.js index dc57ef36..bdeccf8b 100644 --- a/modules/node_modules/node_helper/index.js +++ b/modules/node_modules/node_helper/index.js @@ -14,6 +14,11 @@ NodeHelper = Class.extend({ console.log("Initializing new module helper ..."); }, + loaded: function(callback) { + console.log("Module helper loaded: " + this.name); + callback(); + }, + start: function() { console.log("Staring module helper: " + this.name); }, diff --git a/package.json b/package.json index 118c9837..54c60f92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magicmirror", - "version": "2.1.0", + "version": "2.1.1", "description": "A modular interface for smart mirrors.", "main": "js/electron.js", "scripts": { From 4bb3d33907816b139e4fc4a3a174c17d12ea275d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Wed, 11 Jan 2017 10:22:13 -0300 Subject: [PATCH 28/91] add choice to use pm2 for auto starting of MagicMirror --- installers/raspberry.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index df3994bc..b6ab3435 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -142,10 +142,14 @@ else fi # Use pm2 control like a service MagicMirror -sudo npm install -g pm2 -sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" -pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json -pm2 save +read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice +if [[ $choice =~ ^[Yy]$ ]] +then + sudo npm install -g pm2 + sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi" + pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json + pm2 save +fi echo " " echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m" From d542c063d7e7fd4165bf31de6084c34ec67dd50d Mon Sep 17 00:00:00 2001 From: IgniparousTempest Date: Wed, 11 Jan 2017 21:42:31 +0200 Subject: [PATCH 29/91] Updated CHANGELOG.md to include Afrikkans translation --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9551b79..b5573bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.1.1] - Unreleased + +### Added +- Add loaded function to modules, providing an async callback. +- Afrikaans translation. + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` From 07d5b0774833110197f638fb04fbc5249f99e15c Mon Sep 17 00:00:00 2001 From: Courtney Pitcher Date: Wed, 11 Jan 2017 21:48:33 +0200 Subject: [PATCH 30/91] Update Changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3b4dd3..982ecf4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Update .gitignore to not ignore default modules folder. - Remove white flash on boot up. + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` From 6d1b0ae498f38e9efee66a32db935ca7f01f3695 Mon Sep 17 00:00:00 2001 From: Greg Dev Date: Thu, 12 Jan 2017 01:33:13 +0100 Subject: [PATCH 31/91] Add Polish translation for UPDATE_INFO --- translations/pl.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translations/pl.json b/translations/pl.json index 7a47745b..06bf3b5c 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -24,10 +24,10 @@ "W": "W", "WNW": "WNW", "NW": "NW", - "NNW": "NNW" - + "NNW": "NNW", + /* UPDATE INFO */ "UPDATE_NOTIFICATION": "Dostępna jest aktualizacja MagicMirror².", "UPDATE_NOTIFICATION_MODULE": "Dostępna jest aktualizacja modułu MODULE_NAME.", - "UPDATE_INFO": "The current installation is COMMIT_COUNT behind on the BRANCH_NAME branch." + "UPDATE_INFO": "Zainstalowana wersja odbiega o COMMIT_COUNT commitów od gałęzi BRANCH_NAME." } From 3cea6e5d0cea7b4e927e7182c29d0b0b1b1f01f3 Mon Sep 17 00:00:00 2001 From: Alex Barcelo Date: Thu, 12 Jan 2017 09:58:02 +0100 Subject: [PATCH 32/91] Add apt-get update in raspberry.sh script Just tried this script and realized that it is likely that it will fail because the apt index is not up to date. The trivial fix seems to be to add an `apt-get update` before the package installation. It should be harmless also. --- installers/raspberry.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index b970d02e..e91c2850 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -36,6 +36,10 @@ fi function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; } function command_exists () { type "$1" &> /dev/null ;} +# Update before first apt-get +echo -e "\e[96mUpdating packages ...\e[90m" +sudo apt-get update || exit + # Installing helper tools echo -e "\e[96mInstalling helper tools ...\e[90m" sudo apt-get install curl wget git build-essential unzip || exit From af85ef8cfbd2aaf99556302e5834500b6bacb997 Mon Sep 17 00:00:00 2001 From: Alex Barcelo Date: Thu, 12 Jan 2017 17:15:58 +0100 Subject: [PATCH 33/91] removing unnecessary exit, leaving a warning --- installers/raspberry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index e91c2850..3ba16795 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -38,7 +38,7 @@ function command_exists () { type "$1" &> /dev/null ;} # Update before first apt-get echo -e "\e[96mUpdating packages ...\e[90m" -sudo apt-get update || exit +sudo apt-get update || echo -e "\e[91mUpdate failed, carrying on installation ...\e[90m" # Installing helper tools echo -e "\e[96mInstalling helper tools ...\e[90m" From ab9e0f891ab035904c733b7085a30fa9f7b71ba2 Mon Sep 17 00:00:00 2001 From: Alex Barcelo Date: Thu, 12 Jan 2017 17:25:33 +0100 Subject: [PATCH 34/91] updating CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b061f6f..aead7517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Update .gitignore to not ignore default modules folder. - Remove white flash on boot up. +- Added `update` in Raspberry Pi installation script. ## [2.1.0] - 2016-12-31 From 2f7be0559a00a65071a133388d82978ac58cea9a Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sat, 14 Jan 2017 19:31:24 +0100 Subject: [PATCH 35/91] Switch to rrule-alt. Issue: #565 --- CHANGELOG.md | 7 +++++-- modules/default/calendar/vendor/ical.js/node-ical.js | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a06df56..09c1d13d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,13 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [2.1.1] - Unreleased -- Make mouse events pass through the region fullscreen_above to modules below. + +**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` ### Changed - Installer: Use init config.js from config.js.sample. +- Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) +- Make mouse events pass through the region fullscreen_above to modules below. ### Added - Add loaded function to modules, providing an async callback. @@ -136,7 +139,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Added reference to Italian Translation. -- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344) +- Added the missing NE translation to all languages. [#565](https://github.com/MichMich/MagicMirror/issues/344) - Added proper User-Agent string to calendar call. ### Changed diff --git a/modules/default/calendar/vendor/ical.js/node-ical.js b/modules/default/calendar/vendor/ical.js/node-ical.js index 2f6ef3ef..e2c4a319 100644 --- a/modules/default/calendar/vendor/ical.js/node-ical.js +++ b/modules/default/calendar/vendor/ical.js/node-ical.js @@ -17,7 +17,7 @@ exports.parseFile = function(filename){ } -var rrule = require('rrule').RRule +var rrule = require('rrule-alt').RRule ical.objectHandlers['RRULE'] = function(val, params, curr, stack, line){ curr.rrule = line; diff --git a/package.json b/package.json index 54c60f92..37ebbf0f 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "iconv-lite": "latest", "moment": "latest", "request": "^2.78.0", - "rrule": "latest", + "rrule-alt": "^2.2.3", "simple-git": "^1.62.0", "socket.io": "^1.5.1", "valid-url": "latest", From 0d672420f75a272686e5a7406ac3fe0351e06c64 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Sat, 14 Jan 2017 15:32:59 -0500 Subject: [PATCH 36/91] Add postinstall script for installation --- installers/postinstall/postinstall.sh | 2 ++ package.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 installers/postinstall/postinstall.sh diff --git a/installers/postinstall/postinstall.sh b/installers/postinstall/postinstall.sh new file mode 100644 index 00000000..dc19df98 --- /dev/null +++ b/installers/postinstall/postinstall.sh @@ -0,0 +1,2 @@ +echo "\033[32mMagicMirror installation successful!" +exit 0 diff --git a/package.json b/package.json index 118c9837..9d69eb58 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "A modular interface for smart mirrors.", "main": "js/electron.js", "scripts": { - "start": "electron js/electron.js" + "start": "electron js/electron.js", + "postinstall": "sh installers/postinstall.sh" }, "repository": { "type": "git", From 5c4d1c025924755c20da29e0b08c97bbf17eee8d Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Sat, 14 Jan 2017 15:37:32 -0500 Subject: [PATCH 37/91] Add CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c1d13d..4fc72060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Installer: Use init config.js from config.js.sample. - Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) -- Make mouse events pass through the region fullscreen_above to modules below. +- Make mouse events pass through the region fullscreen\_above to modules below. ### Added - Add loaded function to modules, providing an async callback. @@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add use pm2 for manager process into Installer RaspberryPi script - Russian Translation - Afrikaans Translation +- Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM. ### Fixed - Update .gitignore to not ignore default modules folder. From f4c8db654c8a1c0ff663f076e03bc5fd59f3dfa5 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Sat, 14 Jan 2017 15:42:29 -0500 Subject: [PATCH 38/91] Fix postinstall error. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 32ed0b40..5b85915a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "js/electron.js", "scripts": { "start": "electron js/electron.js", - "postinstall": "sh installers/postinstall.sh" + "postinstall": "sh installers/postinstall/postinstall.sh" }, "repository": { "type": "git", From 65a8b831502febb9f936144b51bfe7876500d458 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Sat, 14 Jan 2017 15:46:38 -0500 Subject: [PATCH 39/91] Add Cache --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index f2d34342..b37becb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,6 @@ node_js: before_script: - npm install grunt-cli -g script: grunt +cache: + directories: + - node_modules From 1cf8e08d4b8fe045b6ca99bf0d97d8faaff73b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sat, 14 Jan 2017 19:37:09 -0300 Subject: [PATCH 40/91] Changelog: fix number reference issue. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c1d13d..2e4e77e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -139,7 +139,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Added reference to Italian Translation. -- Added the missing NE translation to all languages. [#565](https://github.com/MichMich/MagicMirror/issues/344) +- Added the missing NE translation to all languages. [#344](https://github.com/MichMich/MagicMirror/issues/344) - Added proper User-Agent string to calendar call. ### Changed From 4c3dce694a12c1d547c15df725c9f2bbf958bc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sun, 15 Jan 2017 14:10:48 -0300 Subject: [PATCH 41/91] fix blackslash introduce in Pull Request #619 URL Pull Request: https://github.com/MichMich/MagicMirror/pull/619 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e72147..62c93e6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Installer: Use init config.js from config.js.sample. - Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) -- Make mouse events pass through the region fullscreen\_above to modules below. +- Make mouse events pass through the region fullscreen_above to modules below. ### Added - Add loaded function to modules, providing an async callback. From 949f7587dc5fbb8975883728872fb6d981ade33f Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sun, 15 Jan 2017 19:38:46 +0100 Subject: [PATCH 42/91] Solve issue: #611 --- modules/default/clock/clock.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index c84c133e..e0a4326d 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -134,6 +134,10 @@ Module.register("clock",{ if (this.config.analogFace != "" && this.config.analogFace != "simple" && this.config.analogFace != "none") { clockCircle.style.background = "url("+ this.data.path + "faces/" + this.config.analogFace + ".svg)"; clockCircle.style.backgroundSize = "100%"; + + // The following line solves issue: https://github.com/MichMich/MagicMirror/issues/611 + clockCircle.style.border = "1px solid black"; + } else if (this.config.analogFace != "none") { clockCircle.style.border = "2px solid white"; } From 3a8d72db313e62729dbb6f9061415ff615b7ba0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sun, 15 Jan 2017 15:40:23 -0300 Subject: [PATCH 43/91] init tests: This patch propouse use the mocha for testing MagicMirror. --- js/module.js | 4 ++++ package.json | 5 ++++- tests/functions/compare-version.js | 21 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/functions/compare-version.js diff --git a/js/module.js b/js/module.js index 67305a9c..b12f6cd4 100644 --- a/js/module.js +++ b/js/module.js @@ -415,3 +415,7 @@ Module.register = function (name, moduleDefinition) { Log.log("Module registered: " + name); Module.definitions[name] = moduleDefinition; }; + +exports._test = { + cmpVersions: cmpVersions +} diff --git a/package.json b/package.json index 5b85915a..0cc8f497 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "js/electron.js", "scripts": { "start": "electron js/electron.js", - "postinstall": "sh installers/postinstall/postinstall.sh" + "postinstall": "sh installers/postinstall/postinstall.sh", + "test": "./node_modules/mocha/bin/mocha tests --recursive" }, "repository": { "type": "git", @@ -27,12 +28,14 @@ }, "homepage": "https://github.com/MichMich/MagicMirror#readme", "devDependencies": { + "chai": "^3.5.0", "grunt": "latest", "grunt-eslint": "latest", "grunt-jsonlint": "latest", "grunt-markdownlint": "^1.0.13", "grunt-stylelint": "latest", "grunt-yamllint": "latest", + "mocha": "^3.2.0", "stylelint-config-standard": "latest", "time-grunt": "latest" }, diff --git a/tests/functions/compare-version.js b/tests/functions/compare-version.js new file mode 100644 index 00000000..77efa422 --- /dev/null +++ b/tests/functions/compare-version.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var expect = chai.expect; +var classMM = require('../../js/class.js'); // require for load module.js +var moduleMM = require('../../js/module.js') + +describe('Test function cmpVersions into js/module.js', function() { + + it('Should be return -1 ', function() { + expect(moduleMM._test.cmpVersions('2.1', '2.2')).to.equal(-1); + }); + + it('Should be return 0 ', function() { + expect(moduleMM._test.cmpVersions('2.2', '2.2')).to.equal(0); + }); + + it('Should be return 1', function() { + expect(moduleMM._test.cmpVersions('1.1', '1.0')).to.equal(1); + }); + +}); + From 1d02154d998a4e68bded7639385b48ee592ab9db Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sun, 15 Jan 2017 19:41:42 +0100 Subject: [PATCH 44/91] Fix eslint issues. --- modules/default/clock/clock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index e0a4326d..1882c52e 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -137,7 +137,7 @@ Module.register("clock",{ // The following line solves issue: https://github.com/MichMich/MagicMirror/issues/611 clockCircle.style.border = "1px solid black"; - + } else if (this.config.analogFace != "none") { clockCircle.style.border = "2px solid white"; } From 865dce6f6843dbe13c2870e6d84afb5ee6b041a1 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sun, 15 Jan 2017 20:36:11 +0100 Subject: [PATCH 45/91] Add info about issue #611. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62c93e6a..df41689b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Update .gitignore to not ignore default modules folder. - Remove white flash on boot up. - Added `update` in Raspberry Pi installation script. +- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611)) ## [2.1.0] - 2016-12-31 From a4cb53fdb4af6eaea652c3baa77a3cd92e4ebd49 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sun, 15 Jan 2017 21:16:01 +0100 Subject: [PATCH 46/91] Show correct units for showRainAmount --- CHANGELOG.md | 1 + modules/default/weatherforecast/weatherforecast.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df41689b..e0caa6de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Remove white flash on boot up. - Added `update` in Raspberry Pi installation script. - Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611)) +- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit. ## [2.1.0] - 2016-12-31 diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index 9bd15ba8..0b389873 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -150,7 +150,11 @@ Module.register("weatherforecast",{ if (isNaN(forecast.rain)) { rainCell.innerHTML = ""; } else { - rainCell.innerHTML = forecast.rain + " mm"; + if(config.units !== "imperial") { + rainCell.innerHTML = forecast.rain + " mm"; + } else { + rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2) + " in"; + } } rainCell.className = "align-right bright rain"; row.appendChild(rainCell); From 29e82cc50911995105bb5106775988b29508d130 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 16 Jan 2017 02:27:12 +0100 Subject: [PATCH 47/91] Fix Typo Change E into R --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index b636b30b..b719ac01 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -360,7 +360,7 @@ Module.register("calendar", { /* capFirst(string) * Capitalize the first letter of a string - * Eeturn capitalized string + * Return capitalized string */ capFirst: function (string) { From c95a37130ac09ff9fed4bb6fff9ec4f3aa025609 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 16 Jan 2017 02:36:10 +0100 Subject: [PATCH 48/91] Remove unused uelf variable --- modules/default/calendar/node_helper.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/default/calendar/node_helper.js b/modules/default/calendar/node_helper.js index a1b8db09..cc511659 100644 --- a/modules/default/calendar/node_helper.js +++ b/modules/default/calendar/node_helper.js @@ -12,7 +12,6 @@ var CalendarFetcher = require("./calendarfetcher.js"); module.exports = NodeHelper.create({ // Override start method. start: function() { - var self = this; var events = []; this.fetchers = []; From 4cb3b514ab75f2f899762089d6873c91480462e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sun, 15 Jan 2017 22:41:16 -0300 Subject: [PATCH 49/91] update CHANGELOG test --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0caa6de..718e3785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Russian Translation - Afrikaans Translation - Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM. +- Init tests using mocha. ### Fixed - Update .gitignore to not ignore default modules folder. From 49fb9108e98aafb706f40a54bd3c354d90f36477 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 16 Jan 2017 02:49:08 +0100 Subject: [PATCH 50/91] Add Regexp possibility to titleReplace Check if the given needle is a regexp, if so create one and use it instead --- modules/default/calendar/calendar.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index b636b30b..d0527408 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -379,6 +379,13 @@ Module.register("calendar", { titleTransform: function (title) { for (var needle in this.config.titleReplace) { var replacement = this.config.titleReplace[needle]; + + var regParts = needle.match(/^\/(.+)\/([gim]*)$/); + if (regParts) { + // the parsed pattern is a regexp. + needle = new RegExp(regParts[1], regParts[2]); + } + title = title.replace(needle, replacement); } From c1a5f59c422a84109b3ad4a265924f8b66080a08 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 16 Jan 2017 02:52:50 +0100 Subject: [PATCH 51/91] Remove Trailing space --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index d0527408..9ecf1389 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -382,7 +382,7 @@ Module.register("calendar", { var regParts = needle.match(/^\/(.+)\/([gim]*)$/); if (regParts) { - // the parsed pattern is a regexp. + // the parsed pattern is a regexp. needle = new RegExp(regParts[1], regParts[2]); } From 6ea225ed2a8529e4effbb9034df8880e10ce1756 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Mon, 16 Jan 2017 11:53:02 +0100 Subject: [PATCH 52/91] Rescale Splash Screen --- CHANGELOG.md | 1 + splashscreen/splash.png | Bin 19820 -> 37062 bytes 2 files changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0caa6de..c9a73c34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Installer: Use init config.js from config.js.sample. - Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) - Make mouse events pass through the region fullscreen_above to modules below. +- Scaled the splash screen down to make it a bit more subtle. ### Added - Add loaded function to modules, providing an async callback. diff --git a/splashscreen/splash.png b/splashscreen/splash.png index f3da394b8f65fd41ede188b53093021400029123..b2acc49539505c9bcc991e155f5b4decc9534069 100644 GIT binary patch literal 37062 zcmeFacUaR|7B?O%Dk#p1D578qV3dx4KmZjHBTYd?x|C3)M0!t9N7z9H4ZUWRHi&@I zdqe~b9g$u_?+^$j1OoZpFS@hr%~p?&B}lHB|QQ zIkE=^gY89Ky{rX;Z3o3|uw6UBufoEEd%>^W_pj@VrGMOK5mM(w6>Q&Nhud zWWm34qQ}2ICl&U964KG!LRRbYm2cgFzvNF^IXmB%6%lcBa}#!x5XLxK0&*D{5m9jw zad9C~L&(X)-r2-m$lmGH*GB%)&SkWdnWOc6XKRf8aj0DrQ;dtV{K=D0N54Pc=4E&P z_m1qHzF`MY6md7XFCr!^D)LuE=4QXs+;?%b-58p=nF!hzZHKmZb^>%_e@S=W3ge7% zvcmkEE`R^}-*ybvL|y&&zW;K(c6NW+wUe{5D}dk|q<=~2bkpNLT0{%&gmG~+Lo2(2 zshs+&**jZX{Bv>sr6uT_e>--xyY;^zgTDDnw!sQtR|pB_Dy!s(HgU!{-o#*R6~1!W z^?yKkTuBMyDoJ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Tccq=K7-{lEK)cB&sI z-6>XS1$X)k-dYkp*S-?m9ZHJ^IJx0gi|3ZC#Va|V!|GN@+!A)UAbSJjh T(lIsttxHQ?SFP&Ni^%^C3tFD_ From fc00966b8b0057a62126bce669f52f9d177ac6dc Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 17 Jan 2017 11:05:18 +0100 Subject: [PATCH 53/91] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0caa6de..0e2b73e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Russian Translation - Afrikaans Translation - Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM. +- Option to use RegExp in Calendar's titleReplace. ### Fixed - Update .gitignore to not ignore default modules folder. From 2913120ff7ced418eb0dbe339efe7a3dfe86824e Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 17 Jan 2017 16:12:03 +0100 Subject: [PATCH 54/91] Update README files --- modules/default/alert/README.md | 141 ++--------- modules/default/calendar/README.md | 211 +++-------------- modules/default/clock/README.md | 118 ++-------- modules/default/compliments/README.md | 80 ++----- modules/default/currentweather/README.md | 235 ++++--------------- modules/default/helloworld/README.md | 23 +- modules/default/newsfeed/README.md | 200 +++------------- modules/default/updatenotification/README.md | 21 +- modules/default/weatherforecast/README.md | 212 ++++------------- 9 files changed, 211 insertions(+), 1030 deletions(-) diff --git a/modules/default/alert/README.md b/modules/default/alert/README.md index d566313d..89505d16 100644 --- a/modules/default/alert/README.md +++ b/modules/default/alert/README.md @@ -21,52 +21,13 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
effectThe animation effect to use for notifications.
-
Possible values: scale slide genie jelly flip exploader bouncyflip -
Default value: slide -
alert_effectThe animation effect to use for alerts.
-
Possible values: scale slide genie jelly flip exploader bouncyflip -
Default value: jelly -
display_timeTime a notification is displayed in milliseconds.
-
Possible values: int -
Default value: 3500 -
positionPosition where the notifications should be displayed.
-
Possible values: left center right -
Default value: center -
welcome_messageMessage shown at startup.
-
Possible values: string false -
Default value: false (no message at startup) -
+| Option | Description +| ----------------- | ----------- +| `effect` | The animation effect to use for notifications.

**Possible values:** `scale` `slide` `genie` `jelly` `flip` `exploader` `bouncyflip`
**Default value:** `slide` +| `alert_effect` | The animation effect to use for alerts.

**Possible values:** `scale` `slide` `genie` `jelly` `flip` `exploader` `bouncyflip`
**Default value:** `jelly` +| `display_time` | Time a notification is displayed in milliseconds.

**Possible values:** `int`
**Default value:** `3500` +| `position` | Position where the notifications should be displayed.

**Possible values:** `left` `center` `right`
**Default value:** `center` +| `welcome_message` | Message shown at startup.

**Possible values:** `string` `false`
**Default value:** `false` (no message at startup) ## Developer notes @@ -82,83 +43,21 @@ self.sendNotification("SHOW_ALERT", {}); ``` ### Notification params - - - - - - - - - - - - - - - - - - -
OptionDescription
titleThe title of the notification.
-
Possible values: text or html -
messageThe message of the notification.
-
Possible values: text or html -
+| Option | Description +| --------- | ----------- +| `title` | The title of the notification.

**Possible values:** `text` or `html` +| `message` | The message of the notification.

**Possible values:** `text` or `html` + ### Alert params - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
titleThe title of the alert.
-
Possible values: text or html -
messageThe message of the alert.
-
Possible values: text or html -
imageUrl (optional)Image to show in the alert
-
Possible values: url path -
Default value: none -
imageFA (optional)Font Awesome icon to show in the alert
-
Possible values: See Font Awsome website. -
Default value: none -
imageHeight (optional even with imageUrl set)Height of the image
-
Possible values: intpx -
Default value: 80px -
timer (optional)How long the alert should stay visible in ms. -
Important: If you do not use the timer, it is your duty to hide the alert by using self.sendNotification("HIDE_ALERT");!
-
Possible values: int float -
Default value: none -
+| Option | Description +| ----------------------------------------------- | ----------- +| `title` | The title of the alert.

**Possible values:** `text` or `html` +| `message` | The message of the alert.

**Possible values:** `text` or `html` +| `imageUrl` (optional) | Image to show in the alert

**Possible values:** `url` `path`
**Default value:** `none` +| `imageFA` (optional) | Font Awesome icon to show in the alert

**Possible values:** See [Font Awsome](http://fontawesome.io/icons/) website.
**Default value:** `none` +| `imageHeight` (optional even with imageUrl set) | Height of the image

**Possible values:** `intpx`
**Default value:** `80px` +| `timer` (optional) | How long the alert should stay visible in ms.
**Important:** If you do not use the `timer`, it is your duty to hide the alert by using `self.sendNotification("HIDE_ALERT");`!

**Possible values:** `int` `float`
**Default value:** `none` ## Open Source Licenses ###[NotificationStyles](https://github.com/codrops/NotificationStyles) diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md index c5745152..06b7dd9c 100644 --- a/modules/default/calendar/README.md +++ b/modules/default/calendar/README.md @@ -24,152 +24,26 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
maximumEntriesThe maximum number of events shown.
-
Possible values: 0 - 100 -
Default value: 10 -
maximumNumberOfDaysThe maximum number of days in the future.
-
Default value: 365 -
displaySymbolDisplay a symbol in front of an entry.
-
Possible values: true or false -
Default value: true -
defaultSymbolThe default symbol.
-
Possible values: See Font Awsome website. -
Default value: calendar -
maxTitleLengthThe maximum title length.
-
Possible values: 10 - 50 -
Default value: 25 -
fetchIntervalHow often does the content needs to be fetched? (Milliseconds)
-
Possible values: 1000 - 86400000 -
Default value: 300000 (5 minutes) -
animationSpeedSpeed of the update animation. (Milliseconds)
-
Possible values:0 - 5000 -
Default value: 2000 (2 seconds) -
fadeFade the future events to black. (Gradient)
-
Possible values: true or false -
Default value: true -
fadePointWhere to start fade?
-
Possible values: 0 (top of the list) - 1 (bottom of list) -
Default value: 0.25 -
calendarsThe list of calendars.
-
Possible values: An array, see calendar configuration below. -
Default value: An example calendar. -
titleReplaceAn object of textual replacements applied to the tile of the event. This allow to remove or replace certains words in the title.
-
Example:
- - titleReplace: {'Birthday of ' : '', 'foo':'bar'} - -
Default value: - - { - "De verjaardag van ": "", - "'s birthday": "" - } - -
displayRepeatingCountTitleShow count title for yearly repeating events (e.g. "X. Birthday", "X. Anniversary")
-
Possible values: true or false -
Default value: false -
dateFormatFormat to use for the date of events (when using absolute dates)
-
Possible values: See Moment.js formats -
Default value: MMM Do (e.g. Jan 18th) -
timeFormatDisplay event times as absolute dates, or relative time
-
Possible values: absolute or relative -
Default value: relative -
getRelativeHow much time (in hours) should be left until calendar events start getting relative?
-
Possible values: 0 (events stay absolute) - 48 (48 hours before the event starts) -
Default value: 6 -
urgencyWhen using a timeFormat of absolute, the urgency setting allows you to display events within a specific time frame as relative - This allows events within a certain time frame to be displayed as relative (in xx days) while others are displayed as absolute dates
-
Possible values: a positive integer representing the number of days for which you want a relative date, for example 7 (for 7 days)
-
Default value: 7 -
broadcastEventsIf this property is set to true, the calendar will broadcast all the events to all other modules with the notification message: CALENDAR_EVENTS. The event objects are stored in an array and contain the following fields: title, startDate, endDate, fullDayEvent, location and geo.
-
Possible values: true, false
-
Default value: true -
hidePrivateHides private calendar events.
-
Possible values: true or false -
Default value: false -
+| Option | Description +| ---------------------------- | ----------- +| `maximumEntries` | The maximum number of events shown. / **Possible values:** `0` - `100`
**Default value:** `10` +| `maximumNumberOfDays` | The maximum number of days in the future.

**Default value:** `365` +| `displaySymbol` | Display a symbol in front of an entry.

**Possible values:** `true` or `false`
**Default value:** `true` +| `defaultSymbol` | The default symbol.

**Possible values:** See [Font Awsome](http://fontawesome.io/icons/) website.
**Default value:** `calendar` +| `maxTitleLength` | The maximum title length.

**Possible values:** `10` - `50`
**Default value:** `25` +| `fetchInterval` | How often does the content needs to be fetched? (Milliseconds)

**Possible values:** `1000` - `86400000`
**Default value:** `300000` (5 minutes) +| `animationSpeed` | Speed of the update animation. (Milliseconds)

**Possible values:**`0` - `5000`
**Default value:** `2000` (2 seconds) +| `fade` | Fade the future events to black. (Gradient)

**Possible values:** `true` or `false`
**Default value:** `true` +| `fadePoint` | Where to start fade?

**Possible values:** `0` (top of the list) - `1` (bottom of list)
**Default value:** `0.25` +| `calendars` | The list of calendars.

**Possible values:** An array, see _calendar configuration_ below.
**Default value:** _An example calendar._ +| `titleReplace` | An object of textual replacements applied to the tile of the event. This allow to remove or replace certains words in the title.

**Example:** `{'Birthday of ' : '', 'foo':'bar'}`
**Default value:** `{ "De verjaardag van ": "", "'s birthday": "" }` +| `displayRepeatingCountTitle` | Show count title for yearly repeating events (e.g. "X. Birthday", "X. Anniversary")

**Possible values:** `true` or `false`
**Default value:** `false` +| `dateFormat` | Format to use for the date of events (when using absolute dates)

**Possible values:** See [Moment.js formats](http://momentjs.com/docs/#/parsing/string-format/)
**Default value:** `MMM Do` (e.g. Jan 18th) +| `timeFormat` | Display event times as absolute dates, or relative time

**Possible values:** `absolute` or `relative`
**Default value:** `relative` +| `getRelative` | How much time (in hours) should be left until calendar events start getting relative?

**Possible values:** `0` (events stay absolute) - `48` (48 hours before the event starts)
**Default value:** `6` +| `urgency` | When using a timeFormat of `absolute`, the `urgency` setting allows you to display events within a specific time frame as `relative`. This allows events within a certain time frame to be displayed as relative (in xx days) while others are displayed as absolute dates

**Possible values:** a positive integer representing the number of days for which you want a relative date, for example `7` (for 7 days)

**Default value:** `7` +| `broadcastEvents` | If this property is set to true, the calendar will broadcast all the events to all other modules with the notification message: `CALENDAR_EVENTS`. The event objects are stored in an array and contain the following fields: `title`, `startDate`, `endDate`, `fullDayEvent`, `location` and `geo`.

**Possible values:** `true`, `false`

**Default value:** `true` +| `hidePrivate` | Hides private calendar events.

**Possible values:** `true` or `false`
**Default value:** `false` ### Calendar configuration @@ -189,41 +63,10 @@ config: { #### Calendar configuration options: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
urlThe url of the calendar .ical. This property is required.
-
Possible values: Any public accessble .ical calendar. -
symbolThe symbol to show in front of an event. This property is optional.
-
Possible values: See Font Awesome website. -
repeatingCountTitleThe count title for yearly repating events in this calendar.
-
Example:
- 'Birthday' -
userThe username for HTTP Basic authentication.
passThe password for HTTP Basic authentication.
+| Option | Description +| --------------------- | ----------- +| `url` | The url of the calendar .ical. This property is required.

**Possible values:** Any public accessble .ical calendar. +| `symbol` | The symbol to show in front of an event. This property is optional.

**Possible values:** See [Font Awesome](http://fontawesome.io/icons/) website. +| `repeatingCountTitle` | The count title for yearly repating events in this calendar.

**Example:** `'Birthday'` +| `user` | The username for HTTP Basic authentication. +| `pass` | The password for HTTP Basic authentication. diff --git a/modules/default/clock/README.md b/modules/default/clock/README.md index 76a979d4..9bd0bafd 100644 --- a/modules/default/clock/README.md +++ b/modules/default/clock/README.md @@ -22,106 +22,18 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
timeFormatUse 12 or 24 hour format.
-
Possible values: 12 or 24 -
Default value: uses value of config.timeFormat -
displaySecondsDisplay seconds.
-
Possible values: true or false -
Default value: true -
showPeriodShow the period (am/pm) with 12 hour format.
-
Possible values: true or false -
Default value: true -
showPeriodUpperShow the period (AM/PM) with 12 hour format as uppercase.
-
Possible values: true or false -
Default value: false -
clockBoldRemove the colon and bold the minutes to make a more modern look.
-
Possible values: true or false -
Default value: false -
showDateTurn off or on the Date section.
-
Possible values: true or false -
Default value: true -
displayTypeDisplay a digital clock, analog clock, or both together.
-
Possible values: digital, analog, or both -
Default value: digital -
analogSizeSpecific to the analog clock. Defines how large the analog display is.
-
Possible values: A positive number of pixels -
Default value: 200px -
analogFaceSpecific to the analog clock. Specifies which clock face to use.
-
Possible values: simple for a simple border, none for no face or border, or face-### (where ### is currently a value between 001 and 012, inclusive) -
Default value: simple -
secondsColorSpecific to the analog clock. Specifies what color to make the 'seconds' hand.
-
Possible values: any HTML RGB Color -
Default value: #888888 -
analogPlacementSpecific to the analog clock. (requires displayType set to 'both') Specifies where the analog clock is in relation to the digital clock
-
Possible values: top, right, bottom, or left -
Default value: bottom -
analogShowDateSpecific to the analog clock. If the clock is used as a separate module and set to analog only, this configures whether a date is also displayed with the clock.
-
Possible values: false, top, or bottom -
Default value: top -
timezoneSpecific a timezone to show clock.
-
Possible examples values: America/New_York, America/Santiago, Etc/GMT+10 -
Default value: none -
+| Option | Description +| ----------------- | ----------- +| `timeFormat` | Use 12 or 24 hour format.

**Possible values:** `12` or `24`
**Default value:** uses value of _config.timeFormat_ +| `displaySeconds` | Display seconds.

**Possible values:** `true` or `false`
**Default value:** `true` +| `showPeriod` | Show the period (am/pm) with 12 hour format.

**Possible values:** `true` or `false`
**Default value:** `true` +| `showPeriodUpper` | Show the period (AM/PM) with 12 hour format as uppercase.

**Possible values:** `true` or `false`
**Default value:** `false` +| `clockBold` | Remove the colon and bold the minutes to make a more modern look.

**Possible values:** `true` or `false`
**Default value:** `false` +| `showDate` | Turn off or on the Date section.

**Possible values:** `true` or `false`
**Default value:** `true` +| `displayType` | Display a digital clock, analog clock, or both together.

**Possible values:** `digital`, `analog`, or `both`
**Default value:** `digital` +| `analogSize` | **Specific to the analog clock.** Defines how large the analog display is.

**Possible values:** A positive number of pixels`
**Default value:** `200px` +| `analogFace` | **Specific to the analog clock.** Specifies which clock face to use.

**Possible values:** `simple` for a simple border, `none` for no face or border, or `face-###` (where ### is currently a value between 001 and 012, inclusive)
**Default value:** `simple` +| `secondsColor` | **Specific to the analog clock.** Specifies what color to make the 'seconds' hand.

**Possible values:** `any HTML RGB Color`
**Default value:** `#888888` +| `analogPlacement` | **Specific to the analog clock. _(requires displayType set to `'both'`)_** Specifies where the analog clock is in relation to the digital clock

**Possible values:** `top`, `right`, `bottom`, or `left`
**Default value:** `bottom` +| `analogShowDate` | **Specific to the analog clock.** If the clock is used as a separate module and set to analog only, this configures whether a date is also displayed with the clock.

**Possible values:** `false`, `top`, or `bottom`
**Default value:** `top` +| `timezone` | Specific a timezone to show clock.

**Possible examples values:** `America/New_York`, `America/Santiago`, `Etc/GMT+10`
**Default value:** `none` diff --git a/modules/default/compliments/README.md b/modules/default/compliments/README.md index 430c4fbf..d8be85d2 100644 --- a/modules/default/compliments/README.md +++ b/modules/default/compliments/README.md @@ -25,48 +25,12 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
updateIntervalHow often does the compliment have to change? (Milliseconds)
-
Possible values: 1000 - 86400000 -
Default value: 30000 (30 seconds) -
fadeSpeedSpeed of the update animation. (Milliseconds)
-
Possible values:0 - 5000 -
Default value: 4000 (4 seconds) -
complimentsThe list of compliments.
-
Possible values: An object with three arrays: morning, afternoon andevening. See compliment configuration below. -
Default value: See compliment configuration below. -
remoteFileExternal file from which to load the compliments
-
Possible values:Path to a JSON file containing compliments, configured - as per the value of the compliments configuration (see below). An object with three arrays: - morning, afternoon and evening. - compliments.json -
Default value: null (Do not load from file) -
+| Option | Description +| ---------------- | ----------- +| `updateInterval` | How often does the compliment have to change? (Milliseconds)

**Possible values:** `1000` - `86400000`
**Default value:** `30000` (30 seconds) +| `fadeSpeed` | Speed of the update animation. (Milliseconds)

**Possible values:**`0` - `5000`
**Default value:** `4000` (4 seconds) +| `compliments` | The list of compliments.

**Possible values:** An object with three arrays: `morning`, `afternoon` and`evening`. See _compliment configuration_ below.
**Default value:** See _compliment configuration_ below. +| `remoteFile` | External file from which to load the compliments

**Possible values:** Path to a JSON file containing compliments, configured as per the value of the _compliments configuration_ (see below). An object with three arrays: `morning`, `afternoon` and `evening`. - `compliments.json`
**Default value:** `null` (Do not load from file) ### Compliment configuration @@ -74,22 +38,22 @@ The `compliments` property contains an object with three arrays: morningday_sunny -* day_cloudy -* cloudy -* cloudy_windy -* showers -* rain -* thunderstorm -* snow -* fog -* night_clear -* night_cloudy -* night_showers -* night_rain -* night_thunderstorm -* night_snow -* night_alt_cloudy_windy +* `day_sunny` +* `day_cloudy` +* `cloudy` +* `cloudy_windy` +* `showers` +* `rain` +* `thunderstorm` +* `snow` +* `fog` +* `night_clear` +* `night_cloudy` +* `night_showers` +* `night_rain` +* `night_thunderstorm` +* `night_snow` +* `night_alt_cloudy_windy` #### Example use with currentweather module ````javascript diff --git a/modules/default/currentweather/README.md b/modules/default/currentweather/README.md index ccef543c..36a8a436 100644 --- a/modules/default/currentweather/README.md +++ b/modules/default/currentweather/README.md @@ -26,189 +26,52 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
locationThe location used for weather information.
-
Example: 'Amsterdam,Netherlands' -
Default value: false

- Note: When the location and locationID are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. -
locationIDLocation ID from OpenWeatherMap This will override anything you put in location.
Leave blank if you want to use location. -
Example: 1234567 -
Default value: false

- Note: When the location and locationID are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. -
appidThe OpenWeatherMap API key, which can be obtained by creating an OpenWeatherMap account.
-
This value is REQUIRED -
unitsWhat units to use. Specified by config.js
-
Possible values: config.units = Specified by config.js, default = Kelvin, metric = Celsius, imperial =Fahrenheit -
Default value: config.units -
roundTempRound temperature value to nearest integer.
-
Possible values: true (round to integer) or false (display exact value with decimal point) -
Default value: false -
updateIntervalHow often does the content needs to be fetched? (Milliseconds)
-
Possible values: 1000 - 86400000 -
Default value: 600000 (10 minutes) -
animationSpeedSpeed of the update animation. (Milliseconds)
-
Possible values:0 - 5000 -
Default value: 1000 (1 second) -
timeFormatUse 12 or 24 hour format.
-
Possible values: 12 or 24 -
Default value: uses value of config.timeFormat -
showPeriodShow the period (am/pm) with 12 hour format
-
Possible values: true or false -
Default value: true -
showPeriodUpperShow the period (AM/PM) with 12 hour format as uppercase
-
Possible values: true or false -
Default value: false -
showWindDirectionShow the wind direction next to the wind speed.
-
Possible values: true or false -
Default value: true -
showHumidityShow the current humidity
-
Possible values: true or false -
Default value: false -
onlyTempShow only current Temperature and weather icon.
-
Possible values: true or false -
Default value: false -
useBeaufortPick between using the Beaufort scale for wind speed or using the default units.
-
Possible values: true or false -
Default value: true -
langThe language of the days.
-
Possible values: en, nl, ru, etc ... -
Default value: uses value of config.language -
initialLoadDelayThe initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds)
-
Possible values: 1000 - 5000 -
Default value: 0 -
retryDelayThe delay before retrying after a request failure. (Milliseconds)
-
Possible values: 1000 - 60000 -
Default value: 2500 -
apiVersionThe OpenWeatherMap API version to use.
-
Default value: 2.5 -
apiBaseThe OpenWeatherMap base URL.
-
Default value: 'http://api.openweathermap.org/data/' -
weatherEndpointThe OpenWeatherMap API endPoint.
-
Default value: 'weather' -
appendLocationNameToHeaderIf set to true, the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather.
-
Default value: true -
calendarClassThe class for the calender module to base the event based weather information on.
-
Default value: 'calendar' -
iconTableThe conversion table to convert the weather conditions to weather-icons.
-
Default value: iconTable: { - '01d':'wi-day-sunny', - '02d':'wi-day-cloudy', - '03d':'wi-cloudy', - '04d':'wi-cloudy-windy', - '09d':'wi-showers', - '10d':'wi-rain', - '11d':'wi-thunderstorm', - '13d':'wi-snow', - '50d':'wi-fog', - '01n':'wi-night-clear', - '02n':'wi-night-cloudy', - '03n':'wi-night-cloudy', - '04n':'wi-night-cloudy', - '09n':'wi-night-showers', - '10n':'wi-night-rain', - '11n':'wi-night-thunderstorm', - '13n':'wi-night-snow', - '50n':'wi-night-alt-cloudy-windy' - } -
+| Option | Description +| ---------------------------- | ----------- +| `location` | The location used for weather information.

**Example:** `'Amsterdam,Netherlands'`
**Default value:** `false`

**Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. +| `locationID` | Location ID from [OpenWeatherMap](http://openweathermap.org/help/city_list.txt) **This will override anything you put in location.**
Leave blank if you want to use location.
**Example:** `1234567`
**Default value:** `false`

**Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. +| `appid` | The [OpenWeatherMap](https://home.openweathermap.org) API key, which can be obtained by creating an OpenWeatherMap account.

This value is **REQUIRED** +| `units` | What units to use. Specified by config.js

**Possible values:** `config.units` = Specified by config.js, `default` = Kelvin, `metric` = Celsius, `imperial` =Fahrenheit
**Default value:** `config.units` +| `roundTemp` | Round temperature value to nearest integer.

**Possible values:** `true` (round to integer) or `false` (display exact value with decimal point)
**Default value:** `false` +| `updateInterval` | How often does the content needs to be fetched? (Milliseconds)

**Possible values:** `1000` - `86400000`
**Default value:** `600000` (10 minutes) +| `animationSpeed` | Speed of the update animation. (Milliseconds)

**Possible values:**`0` - `5000`
**Default value:** `1000` (1 second) +| `timeFormat` | Use 12 or 24 hour format.

**Possible values:** `12` or `24`
**Default value:** uses value of _config.timeFormat_ +| `showPeriod` | Show the period (am/pm) with 12 hour format

**Possible values:** `true` or `false`
**Default value:** `true` +| `showPeriodUpper` | Show the period (AM/PM) with 12 hour format as uppercase

**Possible values:** `true` or `false`
**Default value:** `false` +| `showWindDirection` | Show the wind direction next to the wind speed.

**Possible values:** `true` or `false`
**Default value:** `true` +| `showHumidity` | Show the current humidity

**Possible values:** `true` or `false`
**Default value:** `false` +| `onlyTemp` | Show only current Temperature and weather icon.

**Possible values:** `true` or `false`
**Default value:** `false` +| `useBeaufort` | Pick between using the Beaufort scale for wind speed or using the default units.

**Possible values:** `true` or `false`
**Default value:** `true` +| `lang` | The language of the days.

**Possible values:** `en`, `nl`, `ru`, etc ...
**Default value:** uses value of _config.language_ +| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds)

**Possible values:** `1000` - `5000`
**Default value:** `0` +| `retryDelay` | The delay before retrying after a request failure. (Milliseconds)

**Possible values:** `1000` - `60000`
**Default value:** `2500` +| `apiVersion` | The OpenWeatherMap API version to use.

**Default value:** `2.5` +| `apiBase` | The OpenWeatherMap base URL.

**Default value:** `'http://api.openweathermap.org/data/'` +| `weatherEndpoint` | The OpenWeatherMap API endPoint.

**Default value:** `'weather'` +| `appendLocationNameToHeader` | If set to `true`, the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather.

**Default value:** `true` +| `calendarClass` | The class for the calender module to base the event based weather information on.

**Default value:** `'calendar'` +| `iconTable` | The conversion table to convert the weather conditions to weather-icons.

**Default value:** view tabel below. + +#### Default Icon Table +````javascript +iconTable: { + '01d': 'wi-day-sunny', + '02d': 'wi-day-cloudy', + '03d': 'wi-cloudy', + '04d': 'wi-cloudy-windy', + '09d': 'wi-showers', + '10d': 'wi-rain', + '11d': 'wi-thunderstorm', + '13d': 'wi-snow', + '50d': 'wi-fog', + '01n': 'wi-night-clear', + '02n': 'wi-night-cloudy', + '03n': 'wi-night-cloudy', + '04n': 'wi-night-cloudy', + '09n': 'wi-night-showers', + '10n': 'wi-night-rain', + '11n': 'wi-night-thunderstorm', + '13n': 'wi-night-snow', + '50n': 'wi-night-alt-cloudy-windy' +} +```` diff --git a/modules/default/helloworld/README.md b/modules/default/helloworld/README.md index 72e7d023..bcbd57fc 100644 --- a/modules/default/helloworld/README.md +++ b/modules/default/helloworld/README.md @@ -20,23 +20,6 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - - - -
OptionDescription
textThe text to display.
-
Example: 'Hello world!' -
Default value: 'Hello world!' -
+| Option | Description +| ------ | ----------- +| `text` | The text to display.

**Example:** `'Hello world!'`
**Default value:** `'Hello world!'` diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 8a0fec25..20840806 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -33,37 +33,14 @@ modules: [ ### Notifications #### Interacting with the module -MagicMirror's [notification mechanism](https://github.com/MichMich/MagicMirror/tree/master/modules#thissendnotificationnotification-payload) allows to send notifications to the ````newsfeed```` module. The following notifications are supported: +MagicMirror's [notification mechanism](https://github.com/MichMich/MagicMirror/tree/master/modules#thissendnotificationnotification-payload) allows to send notifications to the `newsfeed` module. The following notifications are supported: - - - - - - - - - - - - - - - - - - - - - - - - - - -
Notification IdentifierDescription
ARTICLE_NEXTShows the next news title (hiding the summary or previously fully displayed article)
ARTICLE_PREVIOUSShows the previous news title (hiding the summary or previously fully displayed article)
ARTICLE_MORE_DETAILS

When received the *first time*, shows the corresponding description of the currently displayed news title.
The module expects that the module's configuration option ````showDescription```` is set to ````false```` (default value).

- When received a *second consecutive time*, shows the full news article in an IFRAME.
- This requires that the news page can be embedded in an IFRAME, e.g. doesn't have the HTTP response header [X-Frame-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) set to e.g. ````DENY````.
ARTICLE_LESS_DETAILSHides the summary or full news article and only displays the news title of the currently viewed news item.
+| Notification Identifier | Description +| ----------------------- | ----------- +| `ARTICLE_NEXT` | Shows the next news title (hiding the summary or previously fully displayed article) +| `ARTICLE_PREVIOUS` | Shows the previous news title (hiding the summary or previously fully displayed article) +| `ARTICLE_MORE_DETAILS` | When received the _first time_, shows the corresponding description of the currently displayed news title.
The module expects that the module's configuration option `showDescription` is set to `false` (default value).

When received a _second consecutive time_, shows the full news article in an IFRAME.
This requires that the news page can be embedded in an IFRAME, e.g. doesn't have the HTTP response header [X-Frame-Options](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) set to e.g. `DENY`. +| `ARTICLE_LESS_DETAILS` | Hides the summary or full news article and only displays the news title of the currently viewed news item. Note the payload of the sent notification event is ignored. @@ -73,155 +50,32 @@ The following example shows how the next news article title can be displayed on this.sendNotification('ARTICLE_NEXT'); ```` -#### ````newsfeed```` specific notification emitting modules +#### `newsfeed` specific notification emitting modules The third party [MMM-Gestures](https://github.com/thobach/MMM-Gestures) module supports above notifications when moving your hand up, down, left or right in front of a gesture sensor attached to the MagicMirror. See module's readme for more details. ## Configuration options The following properties can be configured: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - removeStartTags: false, - removeEndTags: false, - startTags: [], - endTags: [] - - - - - - - - - - - - - - - - - - - -
OptionDescription
feedsAn array of feed urls that will be used as source.
- More info about this object can be found below. -
Default value: [ - { - title: "New York Times", - url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml", - encoding: "UTF-8" - } - ] -
showSourceTitleDisplay the title of the source.
-
Possible values: true or false -
Default value: true -
showPublishDateDisplay the publish date of an headline.
-
Possible values: true or false -
Default value: true -
showDescriptionDisplay the description of an item.
-
Possible values: true or false -
Default value: false -
reloadIntervalHow often does the content needs to be fetched? (Milliseconds)
-
Possible values: 1000 - 86400000 -
Default value: 300000 (5 minutes) -
updateIntervalHow often do you want to display a new headline? (Milliseconds)
-
Possible values:1000 - 60000 -
Default value: 10000 (10 seconds) -
animationSpeedSpeed of the update animation. (Milliseconds)
-
Possible values:0 - 5000 -
Default value: 2500 (2.5 seconds) -
maxNewsItemsTotal amount of news items to cycle through. (0 for unlimited)
-
Possible values:0 - ... -
Default value: 0 -
removeStartTagsSome newsfeeds feature tags at the beginning of their titles or descriptions, such as [VIDEO]. - This setting allows for the removal of specified tags from the beginning of an item's description and/or title.
-
Possible values:'title', 'description', 'both' -
startTagsList the tags you would like to have removed at the beginning of the feed item
-
Possible values: ['TAG'] or ['TAG1','TAG2',...] -
removeEndTagsRemove specified tags from the end of an item's description and/or title.
-
Possible values:'title', 'description', 'both' -
endTagsList the tags you would like to have removed at the end of the feed item
-
Possible values: ['TAG'] or ['TAG1','TAG2',...] -
+| Option | Description +| ----------------- | ----------- +| `feeds` | An array of feed urls that will be used as source.
More info about this object can be found below.
**Default value:** `[{ title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml", encoding: "UTF-8" }]` +| `showSourceTitle` | Display the title of the source.

**Possible values:** `true` or `false`
**Default value:** `true` +| `showPublishDate` | Display the publish date of an headline.

**Possible values:** `true` or `false`
**Default value:** `true` +| `showDescription` | Display the description of an item.

**Possible values:** `true` or `false`
**Default value:** `false` +| `reloadInterval` | How often does the content needs to be fetched? (Milliseconds)

**Possible values:** `1000` - `86400000`
**Default value:** `300000` (5 minutes) +| `updateInterval` | How often do you want to display a new headline? (Milliseconds)

**Possible values:**`1000` - `60000`
**Default value:** `10000` (10 seconds) +| `animationSpeed` | Speed of the update animation. (Milliseconds)

**Possible values:**`0` - `5000`
**Default value:** `2500` (2.5 seconds) +| `maxNewsItems` | Total amount of news items to cycle through. (0 for unlimited)

**Possible values:**`0` - `...`
**Default value:** `0` +| `removeStartTags` | Some newsfeeds feature tags at the **beginning** of their titles or descriptions, such as _[VIDEO]_. This setting allows for the removal of specified tags from the beginning of an item's description and/or title.

**Possible values:**`'title'`, `'description'`, `'both'` +| `startTags` | List the tags you would like to have removed at the beginning of the feed item

**Possible values:** `['TAG']` or `['TAG1','TAG2',...]` +| `removeEndTags` | Remove specified tags from the **end** of an item's description and/or title.

**Possible values:**`'title'`, `'description'`, `'both'` +| `endTags` | List the tags you would like to have removed at the end of the feed item

**Possible values:** `['TAG']` or `['TAG1','TAG2',...]` The `feeds` property contains an array with multiple objects. These objects have the following properties: - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
titleThe name of the feed source to be displayed above the news items.
-
This property is optional. -
urlThe url of the feed used for the headlines.
-
Example: 'http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml' -
encodingThe encoding of the news feed.
-
This property is optional. -
Possible values:'UTF-8', 'ISO-8859-1', etc ... -
Default value: 'UTF-8' -
+| Option | Description +| ---------- | ----------- +| `title` | The name of the feed source to be displayed above the news items.

This property is optional. +| `url` | The url of the feed used for the headlines.

**Example:** `'http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml'` +| `encoding` | The encoding of the news feed.

This property is optional.
**Possible values:**`'UTF-8'`, `'ISO-8859-1'`, etc ...
**Default value:** `'UTF-8'` diff --git a/modules/default/updatenotification/README.md b/modules/default/updatenotification/README.md index 7d839087..16a1b0c2 100644 --- a/modules/default/updatenotification/README.md +++ b/modules/default/updatenotification/README.md @@ -22,21 +22,6 @@ modules: [ The following properties can be configured: - - - - - - - - - - - - - - -
OptionDescription
updateIntervalHow often do you want to check for a new version? This value represents the interval in milliseconds.
-
Possible values: Any value above 60000 (1 minute); -
Default value: 600000 (10 minutes); -
\ No newline at end of file +| Option | Description +| ---------------- | ----------- +| `updateInterval` | How often do you want to check for a new version? This value represents the interval in milliseconds.

**Possible values:** Any value above `60000` (1 minute)
**Default value:** `600000` (10 minutes); diff --git a/modules/default/weatherforecast/README.md b/modules/default/weatherforecast/README.md index 2842af54..e2cc5028 100644 --- a/modules/default/weatherforecast/README.md +++ b/modules/default/weatherforecast/README.md @@ -25,171 +25,49 @@ modules: [ The following properties can be configured: +| Option | Description +| ---------------------------- | ----------- +| `location` | The location used for weather information.

**Example:** `'Amsterdam,Netherlands'`
**Default value:** `false`

**Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. +| `locationID` | Location ID from [OpenWeatherMap](http://openweathermap.org/help/city_list.txt) **This will override anything you put in location.**
Leave blank if you want to use location.
**Example:** `1234567`
**Default value:** `false`

**Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. +| `appid` | The [OpenWeatherMap](https://home.openweathermap.org) API key, which can be obtained by creating an OpenWeatherMap account.

This value is **REQUIRED** +| `units` | What units to use. Specified by config.js

**Possible values:** `config.units` = Specified by config.js, `default` = Kelvin, `metric` = Celsius, `imperial` =Fahrenheit
**Default value:** `config.units` +| `roundTemp` | Round temperature values to nearest integer.

**Possible values:** `true` (round to integer) or `false` (display exact value with decimal point)
**Default value:** `false` +| `maxNumberOfDays` | How many days of forecast to return. Specified by config.js

**Possible values:** `1` - `16`
**Default value:** `7` (7 days)
This value is optional. By default the weatherforecast module will return 7 days. +| `showRainAmount` | Should the predicted rain amount be displayed?

**Possible values:** `true` or `false`
**Default value:** `false`
This value is optional. By default the weatherforecast module will not display the predicted amount of rain. +| `updateInterval` | How often does the content needs to be fetched? (Milliseconds)

**Possible values:** `1000` - `86400000`
**Default value:** `600000` (10 minutes) +| `animationSpeed` | Speed of the update animation. (Milliseconds)

**Possible values:**`0` - `5000`
**Default value:** `1000` (1 second) +| `lang` | The language of the days.

**Possible values:** `en`, `nl`, `ru`, etc ...
**Default value:** uses value of _config.language_ +| `fade` | Fade the future events to black. (Gradient)

**Possible values:** `true` or `false`
**Default value:** `true` +| `fadePoint` | Where to start fade?

**Possible values:** `0` (top of the list) - `1` (bottom of list)
**Default value:** `0.25` +| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds)

**Possible values:** `1000` - `5000`
**Default value:** `2500` (2.5 seconds delay. This delay is used to keep the OpenWeather API happy.) +| `retryDelay` | The delay before retrying after a request failure. (Milliseconds)

**Possible values:** `1000` - `60000`
**Default value:** `2500` +| `apiVersion` | The OpenWeatherMap API version to use.

**Default value:** `2.5` +| `apiBase` | The OpenWeatherMap base URL.

**Default value:** `'http://api.openweathermap.org/data/'` +| `forecastEndpoint` | The OpenWeatherMap API endPoint.

**Default value:** `'forecast/daily'` +| `appendLocationNameToHeader` | If set to `true`, the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather.

**Default value:** `true` +| `calendarClass` | The class for the calender module to base the event based weather information on.

**Default value:** `'calendar'` +| `iconTable` | The conversion table to convert the weather conditions to weather-icons.

**Default value:** view table below - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescription
locationThe location used for weather information.
-
Example: 'Amsterdam,Netherlands' -
Default value: false

- Note: When the location and locationID are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. -
locationIDLocation ID from OpenWeatherMap This will override anything you put in location.
Leave blank if you want to use location. -
Example: 1234567 -
Default value: false

- Note: When the location and locationID are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used. -
appidThe OpenWeatherMap API key, which can be obtained by creating an OpenWeatherMap account.
-
This value is REQUIRED -
unitsWhat units to use. Specified by config.js
-
Possible values: config.units = Specified by config.js, default = Kelvin, metric = Celsius, imperial =Fahrenheit -
Default value: config.units -
roundTempRound temperature values to nearest integer.
-
Possible values: true (round to integer) or false (display exact value with decimal point) -
Default value: false -
maxNumberOfDaysHow many days of forecast to return. Specified by config.js
-
Possible values: 1 - 16 -
Default value: 7 (7 days) -
This value is optional. By default the weatherforecast module will return 7 days. -
showRainAmountShould the predicted rain amount be displayed?
-
Possible values: true or false -
Default value: false -
This value is optional. By default the weatherforecast module will not display the predicted amount of rain. -
updateIntervalHow often does the content needs to be fetched? (Milliseconds)
-
Possible values: 1000 - 86400000 -
Default value: 600000 (10 minutes) -
animationSpeedSpeed of the update animation. (Milliseconds)
-
Possible values:0 - 5000 -
Default value: 1000 (1 second) -
langThe language of the days.
-
Possible values: en, nl, ru, etc ... -
Default value: uses value of config.language -
fadeFade the future events to black. (Gradient)
-
Possible values: true or false -
Default value: true -
fadePointWhere to start fade?
-
Possible values: 0 (top of the list) - 1 (bottom of list) -
Default value: 0.25 -
initialLoadDelayThe initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds)
-
Possible values: 1000 - 5000 -
Default value: 2500 (2.5 seconds delay. This delay is used to keep the OpenWeather API happy.) -
retryDelayThe delay before retrying after a request failure. (Milliseconds)
-
Possible values: 1000 - 60000 -
Default value: 2500 -
apiVersionThe OpenWeatherMap API version to use.
-
Default value: 2.5 -
apiBaseThe OpenWeatherMap base URL.
-
Default value: 'http://api.openweathermap.org/data/' -
forecastEndpointThe OpenWeatherMap API endPoint.
-
Default value: 'forecast/daily' -
appendLocationNameToHeaderIf set to true, the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather.
-
Default value: true -
calendarClassThe class for the calender module to base the event based weather information on.
-
Default value: 'calendar' -
iconTableThe conversion table to convert the weather conditions to weather-icons.
-
Default value: iconTable: { - '01d':'wi-day-sunny', - '02d':'wi-day-cloudy', - '03d':'wi-cloudy', - '04d':'wi-cloudy-windy', - '09d':'wi-showers', - '10d':'wi-rain', - '11d':'wi-thunderstorm', - '13d':'wi-snow', - '50d':'wi-fog', - '01n':'wi-night-clear', - '02n':'wi-night-cloudy', - '03n':'wi-night-cloudy', - '04n':'wi-night-cloudy', - '09n':'wi-night-showers', - '10n':'wi-night-rain', - '11n':'wi-night-thunderstorm', - '13n':'wi-night-snow', - '50n':'wi-night-alt-cloudy-windy' - } -
+#### Default Icon Table +````javascript +iconTable: { + '01d': 'wi-day-sunny', + '02d': 'wi-day-cloudy', + '03d': 'wi-cloudy', + '04d': 'wi-cloudy-windy', + '09d': 'wi-showers', + '10d': 'wi-rain', + '11d': 'wi-thunderstorm', + '13d': 'wi-snow', + '50d': 'wi-fog', + '01n': 'wi-night-clear', + '02n': 'wi-night-cloudy', + '03n': 'wi-night-cloudy', + '04n': 'wi-night-cloudy', + '09n': 'wi-night-showers', + '10n': 'wi-night-rain', + '11n': 'wi-night-thunderstorm', + '13n': 'wi-night-snow', + '50n': 'wi-night-alt-cloudy-windy' +} +```` From 0734e136d0f9c347819fcbf12f13800131aa271f Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 17 Jan 2017 16:15:39 +0100 Subject: [PATCH 55/91] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a01840c9..459779a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) - Make mouse events pass through the region fullscreen_above to modules below. - Scaled the splash screen down to make it a bit more subtle. +- Replace HTML tables with markdown tables in README files. ### Added - Add loaded function to modules, providing an async callback. From a591cf1d21813b8358245691078f1a49cfcc04e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Wed, 18 Jan 2017 01:36:14 -0300 Subject: [PATCH 56/91] update branch Manual Installation in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 126a1d7f..3ccd2150 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installer ### Manual Installation 1. Download and install the latest Node.js version. -2. Clone the repository and check out the beta branch: `git clone https://github.com/MichMich/MagicMirror` +2. Clone the repository and check out the master branch: `git clone https://github.com/MichMich/MagicMirror` 3. Enter the repository: `cd ~/MagicMirror` 4. Install and run the app: `npm install && npm start` From 93c07b2b1e2e4218d17ceead43b63509b6beb7e0 Mon Sep 17 00:00:00 2001 From: Tino Ziegler Date: Wed, 18 Jan 2017 15:56:12 +0100 Subject: [PATCH 57/91] =?UTF-8?q?Fix:=20check=20if=20temperature=20is=20de?= =?UTF-8?q?fined=20(0=C2=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/default/currentweather/currentweather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index e92550ea..37b054a9 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -296,7 +296,7 @@ Module.register("currentweather",{ */ processWeather: function(data) { - if (!data || !data.main || !data.main.temp) { + if (!data || !data.main || typeof data.main.temp === 'undefined') { // Did not receive usable new data. // Maybe this needs a better check? return; From 56413ee94eca749171fad83ccd95aabc189e02e5 Mon Sep 17 00:00:00 2001 From: Tino Ziegler Date: Wed, 18 Jan 2017 16:04:02 +0100 Subject: [PATCH 58/91] added fix --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9551b79..544ce189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## Fixed +- Module currentWeather: check if temperature is defined + ## [2.1.0] - 2016-12-31 **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` From 222e4154a1bc303c8c37a0c25abfbc16bb89e0f0 Mon Sep 17 00:00:00 2001 From: Tino Ziegler Date: Thu, 19 Jan 2017 09:11:33 +0100 Subject: [PATCH 59/91] changed to double quotes --- modules/default/currentweather/currentweather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 37b054a9..135af54a 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -296,7 +296,7 @@ Module.register("currentweather",{ */ processWeather: function(data) { - if (!data || !data.main || typeof data.main.temp === 'undefined') { + if (!data || !data.main || typeof data.main.temp === "undefined") { // Did not receive usable new data. // Maybe this needs a better check? return; From d9e20ea17a0f336099990146c48523aa3cd98b43 Mon Sep 17 00:00:00 2001 From: zoliaz1993 Date: Fri, 20 Jan 2017 13:43:44 +0100 Subject: [PATCH 60/91] Hungarian Translation --- translations/hu.json | 35 +++++++++++++++++++++++++++++++++++ translations/translations.js | 1 + 2 files changed, 36 insertions(+) create mode 100644 translations/hu.json diff --git a/translations/hu.json b/translations/hu.json new file mode 100644 index 00000000..d52242d8 --- /dev/null +++ b/translations/hu.json @@ -0,0 +1,35 @@ +{ + /* GENERAL */ + "LOADING": "Betöltés …", + + /* CALENDAR */ + "TODAY": "Ma", + "TOMORROW": "Holnap", + "DAYAFTERTOMORROW": "Holnapután", + "RUNNING": "Vége lesz", + "EMPTY": "Nincs közelgő esemény.", + + /* WEATHER */ + "N": "É", + "NNE": "ÉÉK", + "NE": "ÉK", + "ENE": "KÉK", + "E": "K", + "ESE": "KDK", + "SE": "DK", + "SSE": "DDK", + "S": "D", + "SSW": "DDNy", + "SW": "DNy", + "WSW": "NyDNy", + "W": "Ny", + "WNW": "NyÉNy", + "NW": "ÉNy", + "NNW": "ÉÉNy", + + /* UPDATE INFO */ + "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés.", + "UPDATE_NOTIFICATION_MODULE": "A frissítés MODULE_NAME modul néven érhető el.", + "UPDATE_INFO": "A jelenlegi telepítés COMMIT_COUNT mögött BRANCH_NAME ágon található." +} + \ No newline at end of file diff --git a/translations/translations.js b/translations/translations.js index d572c803..4c0a6b94 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -26,4 +26,5 @@ var translations = { "gr" : "translations/gr.json", // Greek "da" : "translations/da.json", // Danish "tr" : "translations/tr.json", // Turkish + "hu" : "translations/hu.json", // Hungarian }; From 02a32dea40c62d625868dc8f3b49737409cf7318 Mon Sep 17 00:00:00 2001 From: zoliaz1993 Date: Fri, 20 Jan 2017 13:43:58 +0100 Subject: [PATCH 61/91] Revert "Hungarian Translation" This reverts commit d9e20ea17a0f336099990146c48523aa3cd98b43. --- translations/hu.json | 35 ----------------------------------- translations/translations.js | 1 - 2 files changed, 36 deletions(-) delete mode 100644 translations/hu.json diff --git a/translations/hu.json b/translations/hu.json deleted file mode 100644 index d52242d8..00000000 --- a/translations/hu.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - /* GENERAL */ - "LOADING": "Betöltés …", - - /* CALENDAR */ - "TODAY": "Ma", - "TOMORROW": "Holnap", - "DAYAFTERTOMORROW": "Holnapután", - "RUNNING": "Vége lesz", - "EMPTY": "Nincs közelgő esemény.", - - /* WEATHER */ - "N": "É", - "NNE": "ÉÉK", - "NE": "ÉK", - "ENE": "KÉK", - "E": "K", - "ESE": "KDK", - "SE": "DK", - "SSE": "DDK", - "S": "D", - "SSW": "DDNy", - "SW": "DNy", - "WSW": "NyDNy", - "W": "Ny", - "WNW": "NyÉNy", - "NW": "ÉNy", - "NNW": "ÉÉNy", - - /* UPDATE INFO */ - "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés.", - "UPDATE_NOTIFICATION_MODULE": "A frissítés MODULE_NAME modul néven érhető el.", - "UPDATE_INFO": "A jelenlegi telepítés COMMIT_COUNT mögött BRANCH_NAME ágon található." -} - \ No newline at end of file diff --git a/translations/translations.js b/translations/translations.js index 4c0a6b94..d572c803 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -26,5 +26,4 @@ var translations = { "gr" : "translations/gr.json", // Greek "da" : "translations/da.json", // Danish "tr" : "translations/tr.json", // Turkish - "hu" : "translations/hu.json", // Hungarian }; From 7f1b11d19b371ab0222e3b2741e0b9384612a990 Mon Sep 17 00:00:00 2001 From: zoliaz1993 Date: Fri, 20 Jan 2017 13:45:14 +0100 Subject: [PATCH 62/91] Hungarian translation --- translations/hu.json | 35 +++++++++++++++++++++++++++++++++++ translations/translations.js | 1 + 2 files changed, 36 insertions(+) create mode 100644 translations/hu.json diff --git a/translations/hu.json b/translations/hu.json new file mode 100644 index 00000000..d52242d8 --- /dev/null +++ b/translations/hu.json @@ -0,0 +1,35 @@ +{ + /* GENERAL */ + "LOADING": "Betöltés …", + + /* CALENDAR */ + "TODAY": "Ma", + "TOMORROW": "Holnap", + "DAYAFTERTOMORROW": "Holnapután", + "RUNNING": "Vége lesz", + "EMPTY": "Nincs közelgő esemény.", + + /* WEATHER */ + "N": "É", + "NNE": "ÉÉK", + "NE": "ÉK", + "ENE": "KÉK", + "E": "K", + "ESE": "KDK", + "SE": "DK", + "SSE": "DDK", + "S": "D", + "SSW": "DDNy", + "SW": "DNy", + "WSW": "NyDNy", + "W": "Ny", + "WNW": "NyÉNy", + "NW": "ÉNy", + "NNW": "ÉÉNy", + + /* UPDATE INFO */ + "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés.", + "UPDATE_NOTIFICATION_MODULE": "A frissítés MODULE_NAME modul néven érhető el.", + "UPDATE_INFO": "A jelenlegi telepítés COMMIT_COUNT mögött BRANCH_NAME ágon található." +} + \ No newline at end of file diff --git a/translations/translations.js b/translations/translations.js index d572c803..4c0a6b94 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -26,4 +26,5 @@ var translations = { "gr" : "translations/gr.json", // Greek "da" : "translations/da.json", // Danish "tr" : "translations/tr.json", // Turkish + "hu" : "translations/hu.json", // Hungarian }; From c4d70e7f9bf889f2ebe650cdca452309b1daa440 Mon Sep 17 00:00:00 2001 From: zoliaz1993 Date: Fri, 20 Jan 2017 13:49:10 +0100 Subject: [PATCH 63/91] Hungarian Translation --- translations/hu.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/hu.json b/translations/hu.json index d52242d8..a957a2e6 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -28,7 +28,7 @@ "NNW": "ÉÉNy", /* UPDATE INFO */ - "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés.", + "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés!", "UPDATE_NOTIFICATION_MODULE": "A frissítés MODULE_NAME modul néven érhető el.", "UPDATE_INFO": "A jelenlegi telepítés COMMIT_COUNT mögött BRANCH_NAME ágon található." } From b8917a3c0e4fb1eef3d7211f15064c8653972919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Wed, 18 Jan 2017 13:47:45 -0300 Subject: [PATCH 64/91] Hotfix introduced client error on commit 3a8d72d Noticed by @qistoph https://github.com/MichMich/MagicMirror/pull/623#issuecomment-273505208 --- js/module.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/module.js b/js/module.js index b12f6cd4..dfd5f2bc 100644 --- a/js/module.js +++ b/js/module.js @@ -416,6 +416,10 @@ Module.register = function (name, moduleDefinition) { Module.definitions[name] = moduleDefinition; }; -exports._test = { - cmpVersions: cmpVersions +if (typeof exports != "undefined") { // For testing purpose only + // A good a idea move the function cmpversions a helper file. + // It's used into other side. + exports._test = { + cmpVersions: cmpVersions + } } From 853ec7320f8b413e206e848021ccd2449b910c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Fri, 20 Jan 2017 19:03:33 -0300 Subject: [PATCH 65/91] Add note in step of copy for sample file configuration in README. This note is related if was used installer script. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc9e398b..b13b5f54 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Type `git status` to see your changes, if there are any, you can reset them with ## Configuration -1. Duplicate `config/config.js.sample` to `config/config.js`. +1. Duplicate `config/config.js.sample` to `config/config.js`. **Note:** If you used the installer script. This step is already done for you. 2. Modify your required settings. The following properties can be configured: From 08cbac62773daf3fdd4670565096ac2e22fa2b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sat, 21 Jan 2017 11:04:11 -0300 Subject: [PATCH 66/91] minor fix textual --- tests/functions/compare-version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functions/compare-version.js b/tests/functions/compare-version.js index 77efa422..3baaacd0 100644 --- a/tests/functions/compare-version.js +++ b/tests/functions/compare-version.js @@ -3,7 +3,7 @@ var expect = chai.expect; var classMM = require('../../js/class.js'); // require for load module.js var moduleMM = require('../../js/module.js') -describe('Test function cmpVersions into js/module.js', function() { +describe('Test function cmpVersions in js/module.js', function() { it('Should be return -1 ', function() { expect(moduleMM._test.cmpVersions('2.1', '2.2')).to.equal(-1); From 63819c5757b0e0cc3c5d0003c4f4c5671407e6d5 Mon Sep 17 00:00:00 2001 From: Joseph Bethge Date: Sat, 21 Jan 2017 16:05:29 +0100 Subject: [PATCH 67/91] fix calendar issues --- CHANGELOG.md | 2 +- modules/default/calendar/vendor/ical.js/ical.js | 12 +++++++++++- modules/default/calendar/vendor/ical.js/node-ical.js | 11 ++++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e8571f..3211d200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Installer: Use init config.js from config.js.sample. -- Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) +- Switched out `rrule` package for `rrule-alt` and fixes in `ical.js` in order to fix calendar issues. ([#565](https://github.com/MichMich/MagicMirror/issues/565)) - Make mouse events pass through the region fullscreen_above to modules below. - Scaled the splash screen down to make it a bit more subtle. - Replace HTML tables with markdown tables in README files. diff --git a/modules/default/calendar/vendor/ical.js/ical.js b/modules/default/calendar/vendor/ical.js/ical.js index 252e426b..f60c5357 100644 --- a/modules/default/calendar/vendor/ical.js/ical.js +++ b/modules/default/calendar/vendor/ical.js/ical.js @@ -90,7 +90,6 @@ return dt } - var dateParam = function(name){ return function(val, params, curr){ @@ -143,6 +142,16 @@ } } + var exdateParam = function(name){ + return function(val, params, curr){ + var date = dateParam(name)(val, params, curr); + if (date.exdates === undefined) { + date.exdates = []; + } + date.exdates.push(date.exdate); + return date; + } + } var geoParam = function(name){ return function(val, params, curr){ @@ -240,6 +249,7 @@ , 'LOCATION' : storeParam('location') , 'DTSTART' : dateParam('start') , 'DTEND' : dateParam('end') + , 'EXDATE' : exdateParam('exdate') ,' CLASS' : storeParam('class') , 'TRANSP' : storeParam('transparency') , 'GEO' : geoParam('geo') diff --git a/modules/default/calendar/vendor/ical.js/node-ical.js b/modules/default/calendar/vendor/ical.js/node-ical.js index e2c4a319..c954e722 100644 --- a/modules/default/calendar/vendor/ical.js/node-ical.js +++ b/modules/default/calendar/vendor/ical.js/node-ical.js @@ -18,6 +18,7 @@ exports.parseFile = function(filename){ var rrule = require('rrule-alt').RRule +var rrulestr = rrule.rrulestr ical.objectHandlers['RRULE'] = function(val, params, curr, stack, line){ curr.rrule = line; @@ -26,7 +27,7 @@ ical.objectHandlers['RRULE'] = function(val, params, curr, stack, line){ var originalEnd = ical.objectHandlers['END']; ical.objectHandlers['END'] = function(val, params, curr, stack){ if (curr.rrule) { - var rule = curr.rrule.replace('RRULE:', ''); + var rule = curr.rrule; if (rule.indexOf('DTSTART') === -1) { if (curr.start.length === 8) { @@ -36,10 +37,14 @@ ical.objectHandlers['END'] = function(val, params, curr, stack){ } } - rule += ';DTSTART=' + curr.start.toISOString().replace(/[-:]/g, ''); + rule += ' DTSTART:' + curr.start.toISOString().replace(/[-:]/g, ''); rule = rule.replace(/\.[0-9]{3}/, ''); } - curr.rrule = rrule.fromString(rule); + for (var i in curr.exdates) { + rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, ''); + rule = rule.replace(/\.[0-9]{3}/, ''); + } + curr.rrule = rrulestr(rule); } return originalEnd.call(this, val, params, curr, stack); } From 782bfd058bb3a5408498ac3bbeee244bc5b5d43b Mon Sep 17 00:00:00 2001 From: villevirtanen Date: Sun, 22 Jan 2017 10:46:28 +0200 Subject: [PATCH 68/91] Update fi.json DAYAFTERTOMORROW, UPDATE_NOTIFICATION and UPDATE_NOTIFICATION_MODULE added. --- translations/fi.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/translations/fi.json b/translations/fi.json index b753039e..59fa0180 100644 --- a/translations/fi.json +++ b/translations/fi.json @@ -5,6 +5,7 @@ /* CALENDAR */ "TODAY": "Tänään", "TOMORROW": "Huomenna", + "DAYAFTERTOMORROW": "Ylihuomenna", "RUNNING": "Meneillään", "EMPTY": "Ei tulevia tapahtumia.", @@ -24,5 +25,9 @@ "W": "L", "WNW": "LPL", "NW": "PL", - "NNW": "PPL" + "NNW": "PPL", + + /* UPDATE INFO */ + "UPDATE_NOTIFICATION": "MagicMirror² päivitys saatavilla.", + "UPDATE_NOTIFICATION_MODULE": "Päivitys saatavilla moduulille MODULE_NAME." } From 3dd3afd21f8b5f5f8471f138e93a6ea612eb3d91 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sun, 22 Jan 2017 12:23:11 +0100 Subject: [PATCH 69/91] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e8571f..4856fc25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Make mouse events pass through the region fullscreen_above to modules below. - Scaled the splash screen down to make it a bit more subtle. - Replace HTML tables with markdown tables in README files. +- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations. ### Added - Add loaded function to modules, providing an async callback. From b893ae7c14b5bb6986a1816e019d4577ba9cdff2 Mon Sep 17 00:00:00 2001 From: Rodrigo Ramez Norambuena Date: Sun, 22 Jan 2017 23:45:02 -0300 Subject: [PATCH 70/91] Fix path for script MagicMirror on pm2 --- installers/pm2_MagicMirror.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/pm2_MagicMirror.json b/installers/pm2_MagicMirror.json index 55f8df31..3f0b27bd 100644 --- a/installers/pm2_MagicMirror.json +++ b/installers/pm2_MagicMirror.json @@ -1,7 +1,7 @@ { apps : [{ name : "MagicMirror", - script : "/home/pi/MagicMirror/installer/mm.sh", + script : "/home/pi/MagicMirror/installers/mm.sh", watch : ["/home/pi/MagicMirror/config/config.js"] }] } From 5087dbd7565d3bee14b1792a7cc161f922e87713 Mon Sep 17 00:00:00 2001 From: zoliaz1993 Date: Mon, 23 Jan 2017 09:44:09 +0100 Subject: [PATCH 71/91] Update hu.json Remove + line. --- translations/hu.json | 1 - 1 file changed, 1 deletion(-) diff --git a/translations/hu.json b/translations/hu.json index a957a2e6..0fa5ea5e 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -32,4 +32,3 @@ "UPDATE_NOTIFICATION_MODULE": "A frissítés MODULE_NAME modul néven érhető el.", "UPDATE_INFO": "A jelenlegi telepítés COMMIT_COUNT mögött BRANCH_NAME ágon található." } - \ No newline at end of file From 9758f3c9d264b80fb8e3180e158b0c3ed15ac6ff Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Mon, 23 Jan 2017 11:38:48 +0100 Subject: [PATCH 72/91] Add the Hungarian translation. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9491fb15..e2ca6d03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM. - Init tests using mocha. - Option to use RegExp in Calendar's titleReplace. +- Hungarian Translation. ### Fixed - Update .gitignore to not ignore default modules folder. From 00197d131d645ad6f1cc44fc9e70bb529dbce06a Mon Sep 17 00:00:00 2001 From: kthorri Date: Mon, 23 Jan 2017 14:51:59 +0000 Subject: [PATCH 73/91] Adding Icelandic translation to translation.js --- translations/translations.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/translations/translations.js b/translations/translations.js index d572c803..51b90e62 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -19,11 +19,12 @@ var translations = { "pt_br" : "translations/pt_br.json", // Português Brasileiro "sv" : "translations/sv.json", // Svenska "it" : "translations/it.json", // Italian - "zh_cn" : "translations/zh_cn.json", // Simplified Chinese + "zh_cn" : "translations/zh_cn.jsona", // Simplified Chinese "zh_tw" : "translations/zh_tw.json", // Traditional Chinese "ja" : "translations/ja.json", // Japanese "pl" : "translations/pl.json", // Polish "gr" : "translations/gr.json", // Greek "da" : "translations/da.json", // Danish "tr" : "translations/tr.json", // Turkish + "is" : "translations/is.json", // Icelandic }; From 9a983e7565ec18e6dfecddcfac9494eb294d1542 Mon Sep 17 00:00:00 2001 From: kthorri Date: Mon, 23 Jan 2017 14:53:18 +0000 Subject: [PATCH 74/91] Adding icelandic translation json file --- translations/is.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 translations/is.json diff --git a/translations/is.json b/translations/is.json new file mode 100644 index 00000000..d3e6d6cb --- /dev/null +++ b/translations/is.json @@ -0,0 +1,34 @@ +{ + /* GENERAL */ + "LOADING": "Hleð upp …", + + /* CALENDAR */ + "TODAY": "Í dag", + "TOMORROW": "Á morgun", + "DAYAFTERTOMORROW": "Ekki á morgun, heldur hinn", + "RUNNING": "Endar eftir", + "EMPTY": "Ekkert framundan.", + + /* WEATHER */ + "N": "N", + "NNE": "NNA", + "NE": "NA", + "ENE": "ANA", + "E": "A", + "ESE": "ASA", + "SE": "SA", + "SSE": "SSA", + "S": "S", + "SSW": "SSV", + "SW": "SV", + "WSW": "VSV", + "W": "V", + "WNW": "VNV", + "NW": "NV", + "NNW": "NNV", + + /* UPDATE INFO */ + "UPDATE_NOTIFICATION": "MagicMirror² uppfærsla í boði.", + "UPDATE_NOTIFICATION_MODULE": "Uppfærsla í boði fyrir MODULE_NAME module.", + "UPDATE_INFO": "Núverandi kerfi er COMMIT_COUNT á eftir BRANCH_NAME branchinu." +} From 5e860b685069822afe674da7d19751dc21725940 Mon Sep 17 00:00:00 2001 From: kthorri Date: Mon, 23 Jan 2017 14:53:57 +0000 Subject: [PATCH 75/91] Added icelandic translation to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9551b79..ad182002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` ### Added +- Icelandic translation. - Finnish translation. - Danish translation. - Turkish translation. From 47a87a14f5475f547bcba571beb9b583ccb3da92 Mon Sep 17 00:00:00 2001 From: kthorri Date: Mon, 23 Jan 2017 14:55:24 +0000 Subject: [PATCH 76/91] Fixing typo --- translations/translations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/translations.js b/translations/translations.js index 51b90e62..c3e15bca 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -19,7 +19,7 @@ var translations = { "pt_br" : "translations/pt_br.json", // Português Brasileiro "sv" : "translations/sv.json", // Svenska "it" : "translations/it.json", // Italian - "zh_cn" : "translations/zh_cn.jsona", // Simplified Chinese + "zh_cn" : "translations/zh_cn.json", // Simplified Chinese "zh_tw" : "translations/zh_tw.json", // Traditional Chinese "ja" : "translations/ja.json", // Japanese "pl" : "translations/pl.json", // Polish From d9c7ee8976b69c8306ab133e20dc4c7d47ed1afc Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Mon, 23 Jan 2017 16:18:42 +0100 Subject: [PATCH 77/91] Fixed Changelog to match the correct version. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe43a1df..d845fec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Init tests using mocha. - Option to use RegExp in Calendar's titleReplace. - Hungarian Translation. +- Icelandic Translation. ### Fixed - Update .gitignore to not ignore default modules folder. @@ -38,7 +39,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). **Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install` ### Added -- Icelandic translation. - Finnish translation. - Danish translation. - Turkish translation. From 690567659cc7bbc8d11ae1618c1c0ac67cc1132d Mon Sep 17 00:00:00 2001 From: Sergey Morozov Date: Mon, 23 Jan 2017 09:46:50 -0800 Subject: [PATCH 78/91] Minor clean up for test suite @roramirez thanks for starting adding tests. I figured that we might as well grunt them and follow same rules for linting as we do for rest of JS code in the repo. I've made following minor modifications: - added tests to the grunt target - fixed indentation in package.json - made tests a bit more descriptive - fixed eslint errors surfaced by grunt --- Gruntfile.js | 4 ++-- package.json | 2 +- tests/functions/compare-version.js | 21 ++++++++++----------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ec3128ef..5dca05d9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,8 +7,8 @@ module.exports = function(grunt) { configFile: ".eslintrc.json" }, target: ["js/*.js", "modules/default/*.js", "modules/default/*/*.js", - "serveronly/*.js", "*.js", "!modules/default/alert/notificationFx.js", - "!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js" + "serveronly/*.js", "*.js", "tests/*/*.js", "!modules/default/alert/notificationFx.js", + "!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js", ] }, stylelint: { diff --git a/package.json b/package.json index 0cc8f497..4cff0689 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "electron js/electron.js", "postinstall": "sh installers/postinstall/postinstall.sh", - "test": "./node_modules/mocha/bin/mocha tests --recursive" + "test": "./node_modules/mocha/bin/mocha tests --recursive" }, "repository": { "type": "git", diff --git a/tests/functions/compare-version.js b/tests/functions/compare-version.js index 3baaacd0..8cc22101 100644 --- a/tests/functions/compare-version.js +++ b/tests/functions/compare-version.js @@ -1,21 +1,20 @@ -var chai = require('chai'); +var chai = require("chai"); var expect = chai.expect; -var classMM = require('../../js/class.js'); // require for load module.js -var moduleMM = require('../../js/module.js') +var classMM = require("../../js/class.js"); // require for load module.js +var moduleMM = require("../../js/module.js") -describe('Test function cmpVersions in js/module.js', function() { +describe("Test function cmpVersions in js/module.js", function() { - it('Should be return -1 ', function() { - expect(moduleMM._test.cmpVersions('2.1', '2.2')).to.equal(-1); + it("should return -1 when comparing 2.1 to 2.2", function() { + expect(moduleMM._test.cmpVersions("2.1", "2.2")).to.equal(-1); }); - it('Should be return 0 ', function() { - expect(moduleMM._test.cmpVersions('2.2', '2.2')).to.equal(0); + it("should be return 0 when comparing 2.2 to 2.2", function() { + expect(moduleMM._test.cmpVersions("2.2", "2.2")).to.equal(0); }); - it('Should be return 1', function() { - expect(moduleMM._test.cmpVersions('1.1', '1.0')).to.equal(1); + it("should be return 1 when comparing 1.1 to 1.0", function() { + expect(moduleMM._test.cmpVersions("1.1", "1.0")).to.equal(1); }); - }); From f59f035a7ec5e64ab9e629521b39a548a6430b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Mon, 23 Jan 2017 18:00:54 -0300 Subject: [PATCH 79/91] Add config/* to the Grunt target. Also, this change can be check config errors by syntax. --- Gruntfile.js | 1 + config/config.js.sample | 52 ++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 5dca05d9..a3edb053 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,6 +9,7 @@ module.exports = function(grunt) { target: ["js/*.js", "modules/default/*.js", "modules/default/*/*.js", "serveronly/*.js", "*.js", "tests/*/*.js", "!modules/default/alert/notificationFx.js", "!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js", + "config/*", ] }, stylelint: { diff --git a/config/config.js.sample b/config/config.js.sample index 913dbc43..eab22972 100644 --- a/config/config.js.sample +++ b/config/config.js.sample @@ -8,61 +8,61 @@ var config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], - language: 'en', + language: "en", timeFormat: 24, - units: 'metric', + units: "metric", modules: [ { - module: 'alert', + module: "alert", }, { module: "updatenotification", position: "top_bar" }, { - module: 'clock', - position: 'top_left' + module: "clock", + position: "top_left" }, { - module: 'calendar', - header: 'US Holidays', - position: 'top_left', + module: "calendar", + header: "US Holidays", + position: "top_left", config: { calendars: [ { - symbol: 'calendar-check-o ', - url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics' + symbol: "calendar-check-o ", + url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics" } ] } }, { - module: 'compliments', - position: 'lower_third' + module: "compliments", + position: "lower_third" }, { - module: 'currentweather', - position: 'top_right', + module: "currentweather", + position: "top_right", config: { - location: 'New York', - locationID: '', //ID from http://www.openweathermap.org - appid: 'YOUR_OPENWEATHER_API_KEY' + location: "New York", + locationID: "", //ID from http://www.openweathermap.org + appid: "YOUR_OPENWEATHER_API_KEY" } }, { - module: 'weatherforecast', - position: 'top_right', - header: 'Weather Forecast', + module: "weatherforecast", + position: "top_right", + header: "Weather Forecast", config: { - location: 'New York', - locationID: '5128581', //ID from http://www.openweathermap.org - appid: 'YOUR_OPENWEATHER_API_KEY' + location: "New York", + locationID: "5128581", //ID from http://www.openweathermap.org + appid: "YOUR_OPENWEATHER_API_KEY" } }, { - module: 'newsfeed', - position: 'bottom_bar', + module: "newsfeed", + position: "bottom_bar", config: { feeds: [ { @@ -79,4 +79,4 @@ var config = { }; /*************** DO NOT EDIT THE LINE BELOW ***************/ -if (typeof module !== 'undefined') {module.exports = config;} +if (typeof module !== "undefined") {module.exports = config;} From 566ea9a1106fc7e18a670ad57f3e93f28895c015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 24 Jan 2017 02:12:36 -0300 Subject: [PATCH 80/91] Use script for start MagicMirror --- CHANGELOG.md | 1 + package.json | 2 +- run-start.sh | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 run-start.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4563d3..795bce1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Option to use RegExp in Calendar's titleReplace. - Hungarian Translation. - Icelandic Translation. +- Add use a script to prevent when is run by SSH session set DISPLAY enviroment. ### Fixed - Update .gitignore to not ignore default modules folder. diff --git a/package.json b/package.json index 4cff0689..9d94a012 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A modular interface for smart mirrors.", "main": "js/electron.js", "scripts": { - "start": "electron js/electron.js", + "start": "sh run-start.sh", "postinstall": "sh installers/postinstall/postinstall.sh", "test": "./node_modules/mocha/bin/mocha tests --recursive" }, diff --git a/run-start.sh b/run-start.sh new file mode 100644 index 00000000..6c4d4003 --- /dev/null +++ b/run-start.sh @@ -0,0 +1,4 @@ +if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty + export DISPLAY=:0 # Set by defaul display +fi +electron js/electron.js From 86e553e756fed4f327ff9b014b1dcf760309638e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 24 Jan 2017 02:59:20 -0300 Subject: [PATCH 81/91] Set configuration file by enviroment variable: Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE. --- CHANGELOG.md | 1 + js/app.js | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4563d3..347099e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Option to use RegExp in Calendar's titleReplace. - Hungarian Translation. - Icelandic Translation. +- Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE. ### Fixed - Update .gitignore to not ignore default modules folder. diff --git a/js/app.js b/js/app.js index 91149906..2eda7d1e 100644 --- a/js/app.js +++ b/js/app.js @@ -17,6 +17,10 @@ console.log("Starting MagicMirror: v" + global.version); // global absolute root path global.root_path = path.resolve(__dirname + "/../"); +if (process.env.MM_CONFIG_FILE) { + global.configuration_file = process.env.MM_CONFIG_FILE; +} + // The next part is here to prevent a major exception when there // is no internet connection. This could probable be solved better. process.on("uncaughtException", function (err) { @@ -41,7 +45,16 @@ var App = function() { var loadConfig = function(callback) { console.log("Loading config ..."); var defaults = require(__dirname + "/defaults.js"); - var configFilename = path.resolve(global.root_path + "/config/config.js"); + + // For this check proposed to TestSuite + // https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8 + console.log(global.configuration_file); + if (global.configuration_file === undefined ) { + var configFilename = path.resolve(global.root_path + "/config/config.js"); + } else { + var configFilename = path.resolve(global.configuration_file); + } + try { fs.accessSync(configFilename, fs.F_OK); var c = require(configFilename); From 9670d74345d6d6a6db8d2a2c8505f8c3b2d1636f Mon Sep 17 00:00:00 2001 From: zoliaz1993 Date: Tue, 24 Jan 2017 08:54:39 +0100 Subject: [PATCH 82/91] Update Hungarian language. Add Alert module Hun translation. Text aligned formality. --- modules/default/alert/translations/hu | 4 ++++ translations/hu.json | 2 +- translations/translations.js | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 modules/default/alert/translations/hu diff --git a/modules/default/alert/translations/hu b/modules/default/alert/translations/hu new file mode 100644 index 00000000..be618365 --- /dev/null +++ b/modules/default/alert/translations/hu @@ -0,0 +1,4 @@ +{ + "sysTitle": "MagicMirror értesítés", + "welcome": "Üdvözöljük, indulás sikeres!" +} diff --git a/translations/hu.json b/translations/hu.json index 0fa5ea5e..069ad1ad 100644 --- a/translations/hu.json +++ b/translations/hu.json @@ -31,4 +31,4 @@ "UPDATE_NOTIFICATION": "MagicMirror² elérhető egy frissítés!", "UPDATE_NOTIFICATION_MODULE": "A frissítés MODULE_NAME modul néven érhető el.", "UPDATE_INFO": "A jelenlegi telepítés COMMIT_COUNT mögött BRANCH_NAME ágon található." -} +} \ No newline at end of file diff --git a/translations/translations.js b/translations/translations.js index 0eaed850..ebfd48d7 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -28,6 +28,6 @@ var translations = { "tr" : "translations/tr.json", // Turkish "ru" : "translations/ru.json", // Russian "af" : "translations/af.json", // Afrikaans - "hu" : "translations/hu.json", // Hungarian - "is" : "translations/is.json", // Icelandic -}; + "hu" : "translations/hu.json", // Hungarian + "is" : "translations/is.json", // Icelandic +}; \ No newline at end of file From 105e4f990df21ede561c4ba5e53bd4eee867dba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20R=C3=B3nai?= Date: Tue, 24 Jan 2017 08:59:37 +0100 Subject: [PATCH 83/91] Update translations.js Text aligned. --- translations/translations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translations/translations.js b/translations/translations.js index ebfd48d7..c10da418 100644 --- a/translations/translations.js +++ b/translations/translations.js @@ -28,6 +28,6 @@ var translations = { "tr" : "translations/tr.json", // Turkish "ru" : "translations/ru.json", // Russian "af" : "translations/af.json", // Afrikaans - "hu" : "translations/hu.json", // Hungarian - "is" : "translations/is.json", // Icelandic -}; \ No newline at end of file + "hu" : "translations/hu.json", // Hungarian + "is" : "translations/is.json", // Icelandic +}; From 8181b9a31ce3a25fa7581182d3b02607e012660a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20R=C3=B3nai?= Date: Tue, 24 Jan 2017 09:09:13 +0100 Subject: [PATCH 84/91] Rename hu to hu.json extension (**.json) --- modules/default/alert/translations/{hu => hu.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/default/alert/translations/{hu => hu.json} (100%) diff --git a/modules/default/alert/translations/hu b/modules/default/alert/translations/hu.json similarity index 100% rename from modules/default/alert/translations/hu rename to modules/default/alert/translations/hu.json From b13c6f283a7a7d8ee9041e8f34a914e87014313d Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Mon, 23 Jan 2017 17:38:25 +0100 Subject: [PATCH 85/91] Run npm test on Travis --- .travis.yml | 4 +++- CHANGELOG.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b37becb1..da3fb099 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ node_js: - "5.1" before_script: - npm install grunt-cli -g -script: grunt +script: +- grunt +- npm test cache: directories: - node_modules diff --git a/CHANGELOG.md b/CHANGELOG.md index d845fec7..7d4563d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Scaled the splash screen down to make it a bit more subtle. - Replace HTML tables with markdown tables in README files. - Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations. +- Run `npm test` on Travis automatically ### Added - Add loaded function to modules, providing an async callback. From 7dbfa0b2030d75cdb8d6e51d29bb2e621cc2859d Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Tue, 24 Jan 2017 12:22:43 +0100 Subject: [PATCH 86/91] Add root_path testing --- tests/global_vars/root_path.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/global_vars/root_path.js diff --git a/tests/global_vars/root_path.js b/tests/global_vars/root_path.js new file mode 100644 index 00000000..bcb6c509 --- /dev/null +++ b/tests/global_vars/root_path.js @@ -0,0 +1,24 @@ +var fs = require("fs"); +var path = require("path"); +var chai = require("chai"); +var expect = chai.expect; +var appMM = require("../../js/app.js") + +describe("Test global.root_path, set in js/app.js", function() { + var expectedSubPaths = [ + 'modules', + 'serveronly', + 'js', + 'js/app.js', + 'js/main.js', + 'js/electron.js', + 'config' + ]; + + expectedSubPaths.forEach(subpath => { + it(`should contain a file/folder "${subpath}"`, function() { + expect(fs.existsSync(path.join(global.root_path, subpath))).to.equal(true); + }); + }); +}); + From 422349c2d135e7926bb1d71932eb15eecce95e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 24 Jan 2017 17:22:17 -0300 Subject: [PATCH 87/91] Change of examples configuration in README modules. This change is related commit f59f035a7ec5e64ab9e629521b39a548a6430b8b Now is used grunt for check ESLint syntax validation of config/* files --- modules/default/alert/README.md | 2 +- modules/default/calendar/README.md | 4 +-- modules/default/clock/README.md | 4 +-- modules/default/compliments/README.md | 28 ++++++++++---------- modules/default/currentweather/README.md | 10 +++---- modules/default/helloworld/README.md | 6 ++--- modules/default/newsfeed/README.md | 4 +-- modules/default/updatenotification/README.md | 4 +-- modules/default/weatherforecast/README.md | 10 +++---- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/modules/default/alert/README.md b/modules/default/alert/README.md index 89505d16..58be0570 100644 --- a/modules/default/alert/README.md +++ b/modules/default/alert/README.md @@ -7,7 +7,7 @@ To use this module, add it to the modules array in the config/config.js file: ``` modules: [ { - module: 'alert', + module: "alert", config: { // The config property is optional. // See 'Configuration options' for more information. diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md index 06b7dd9c..d7eabe78 100644 --- a/modules/default/calendar/README.md +++ b/modules/default/calendar/README.md @@ -8,8 +8,8 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'calendar', - position: 'top_left', // This can be any of the regions. Best results in left or right regions. + module: "calendar", + position: "top_left", // This can be any of the regions. Best results in left or right regions. config: { // The config property is optional. // If no config is set, an example calendar is shown. diff --git a/modules/default/clock/README.md b/modules/default/clock/README.md index 9bd0bafd..5570ff5a 100644 --- a/modules/default/clock/README.md +++ b/modules/default/clock/README.md @@ -8,8 +8,8 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'clock', - position: 'top_left', // This can be any of the regions. + module: "clock", + position: "top_left", // This can be any of the regions. config: { // The config property is optional. // See 'Configuration options' for more information. diff --git a/modules/default/compliments/README.md b/modules/default/compliments/README.md index d8be85d2..8ef9e2fb 100644 --- a/modules/default/compliments/README.md +++ b/modules/default/compliments/README.md @@ -8,8 +8,8 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'compliments', - position: 'lower_third', // This can be any of the regions. + module: "compliments", + position: "lower_third", // This can be any of the regions. // Best results in one of the middle regions like: lower_third config: { // The config property is optional. @@ -60,14 +60,14 @@ If use the currentweather is possible use a actual weather for set compliments. config: { compliments: { day_sunny: [ - 'Today is a sunny day', - 'It\'s a beautiful day' + "Today is a sunny day", + "It's a beautiful day" ], snow: [ - 'Snowball battle!' + "Snowball battle!" ], rain: [ - 'Don\'t forget your umbrella' + "Don't forget your umbrella" ] } } @@ -79,19 +79,19 @@ config: { config: { compliments: { morning: [ - 'Good morning, handsome!', - 'Enjoy your day!', - 'How was your sleep?' + "Good morning, handsome!", + "Enjoy your day!", + "How was your sleep?" ], afternoon: [ - 'Hello, beauty!', + "Hello, beauty!", 'You look sexy!', - 'Looking good today!' + "Looking good today!" ], evening: [ - 'Wow, you look hot!', - 'You look nice!', - 'Hi, sexy!' + "Wow, you look hot!", + "You look nice!", + "Hi, sexy!" ] } } diff --git a/modules/default/currentweather/README.md b/modules/default/currentweather/README.md index 36a8a436..65913d82 100644 --- a/modules/default/currentweather/README.md +++ b/modules/default/currentweather/README.md @@ -8,14 +8,14 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'currentweather', - position: 'top_right', // This can be any of the regions. + module: "currentweather", + position: "top_right", // This can be any of the regions. // Best results in left or right regions. config: { // See 'Configuration options' for more information. - location: 'Amsterdam,Netherlands', - locationID: '', //Location ID from http://openweathermap.org/help/city_list.txt - appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key. + location: "Amsterdam,Netherlands", + locationID: "", //Location ID from http://openweathermap.org/help/city_list.txt + appid: "abcde12345abcde12345abcde12345ab" //openweathermap.org API key. } } ] diff --git a/modules/default/helloworld/README.md b/modules/default/helloworld/README.md index bcbd57fc..d86fce3d 100644 --- a/modules/default/helloworld/README.md +++ b/modules/default/helloworld/README.md @@ -6,11 +6,11 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'helloworld', - position: 'bottom_bar', // This can be any of the regions. + module: "helloworld", + position: "bottom_bar", // This can be any of the regions. config: { // See 'Configuration options' for more information. - text: 'Hello world!' + text: "Hello world!" } } ] diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 20840806..bfaa1aad 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -9,8 +9,8 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'newsfeed', - position: 'bottom_bar', // This can be any of the regions. Best results in center regions. + module: "newsfeed", + position: "bottom_bar", // This can be any of the regions. Best results in center regions. config: { // The config property is optional. // If no config is set, an example calendar is shown. diff --git a/modules/default/updatenotification/README.md b/modules/default/updatenotification/README.md index 16a1b0c2..54ba213a 100644 --- a/modules/default/updatenotification/README.md +++ b/modules/default/updatenotification/README.md @@ -8,8 +8,8 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'updatenotification', - position: 'top_center', // This can be any of the regions. + module: "updatenotification", + position: "top_center", // This can be any of the regions. config: { // The config property is optional. // See 'Configuration options' for more information. diff --git a/modules/default/weatherforecast/README.md b/modules/default/weatherforecast/README.md index e2cc5028..9298c0cc 100644 --- a/modules/default/weatherforecast/README.md +++ b/modules/default/weatherforecast/README.md @@ -8,14 +8,14 @@ To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { - module: 'weatherforecast', - position: 'top_right', // This can be any of the regions. + module: "weatherforecast", + position: "top_right", // This can be any of the regions. // Best results in left or right regions. config: { // See 'Configuration options' for more information. - location: 'Amsterdam,Netherlands', - locationID: '', //Location ID from http://openweathermap.org/help/city_list.txt - appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key. + location: "Amsterdam,Netherlands", + locationID: "", //Location ID from http://openweathermap.org/help/city_list.txt + appid: "abcde12345abcde12345abcde12345ab" //openweathermap.org API key. } } ] From 36ead2251a98ee058a748dddc868dca23c59ebca Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Wed, 25 Jan 2017 11:58:20 +0100 Subject: [PATCH 88/91] Fix grunt errors --- tests/global_vars/root_path.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/global_vars/root_path.js b/tests/global_vars/root_path.js index bcb6c509..04edc03f 100644 --- a/tests/global_vars/root_path.js +++ b/tests/global_vars/root_path.js @@ -2,17 +2,18 @@ var fs = require("fs"); var path = require("path"); var chai = require("chai"); var expect = chai.expect; -var appMM = require("../../js/app.js") describe("Test global.root_path, set in js/app.js", function() { + var appMM = require("../../js/app.js") + var expectedSubPaths = [ - 'modules', - 'serveronly', - 'js', - 'js/app.js', - 'js/main.js', - 'js/electron.js', - 'config' + "modules", + "serveronly", + "js", + "js/app.js", + "js/main.js", + "js/electron.js", + "config" ]; expectedSubPaths.forEach(subpath => { From ae41ed1d518d26847d79c65e403fcac1be117cb8 Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Wed, 25 Jan 2017 12:00:38 +0100 Subject: [PATCH 89/91] Fix syntax in DA translation --- translations/da.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/da.json b/translations/da.json index 4b346437..5ad271fe 100644 --- a/translations/da.json +++ b/translations/da.json @@ -25,7 +25,7 @@ "W": "V", "WNW": "VNV", "NW": "NV", - "NNW": "NNV" + "NNW": "NNV", /* UPDATE INFO */ From 3818e48218d89c79d43caad062cf27146cb4627a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Wed, 25 Jan 2017 19:05:40 -0300 Subject: [PATCH 90/91] remove console.log --- js/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/app.js b/js/app.js index 2eda7d1e..83d637b2 100644 --- a/js/app.js +++ b/js/app.js @@ -48,7 +48,6 @@ var App = function() { // For this check proposed to TestSuite // https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8 - console.log(global.configuration_file); if (global.configuration_file === undefined ) { var configFilename = path.resolve(global.root_path + "/config/config.js"); } else { From 2f9a27269628364c22ec6f824f83b955aab0444e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Thu, 26 Jan 2017 18:33:37 -0300 Subject: [PATCH 91/91] Improvement of code block about from discussion Pull Request #653 https://github.com/MichMich/MagicMirror/pull/653 --- js/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/app.js b/js/app.js index 83d637b2..9f992b29 100644 --- a/js/app.js +++ b/js/app.js @@ -48,10 +48,9 @@ var App = function() { // For this check proposed to TestSuite // https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8 - if (global.configuration_file === undefined ) { - var configFilename = path.resolve(global.root_path + "/config/config.js"); - } else { - var configFilename = path.resolve(global.configuration_file); + var configFilename = path.resolve(global.root_path + "/config/config.js"); + if (typeof(global.configuration_file) === "undefined" ) { + configFilename = path.resolve(global.configuration_file); } try {