From d000e3c8a916cf0f2d42a839cbc3f8ba14c4c9ab Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Tue, 9 Aug 2016 10:22:29 +0200 Subject: [PATCH 01/52] Force fullscreen when kioskmode is active --- CHANGELOG.md | 5 +++++ js/electron.js | 32 ++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c76d0362..df710e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## Unpublished + +### Updated +- Force fullscreen when kioskmode is active. + ## [2.0.4] - 2016-08-07 ### Added diff --git a/js/electron.js b/js/electron.js index 0a72aee9..1a3ddb64 100644 --- a/js/electron.js +++ b/js/electron.js @@ -1,3 +1,5 @@ +/* jshint esversion: 6 */ + "use strict"; const Server = require(__dirname + "/server.js"); @@ -28,17 +30,31 @@ function createWindow() { mainWindow.loadURL("http://localhost:" + config.port); // Open the DevTools if run with "npm start dev" - if(process.argv[2] == "dev"){ + if(process.argv[2] == "dev") { mainWindow.webContents.openDevTools(); } - // Emitted when the window is closed. + // Set responders for window events. mainWindow.on("closed", function() { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. mainWindow = null; }); + + if (config.kioskmode) { + mainWindow.on("blur", function() { + mainWindow.focus(); + }); + + mainWindow.on("leave-full-screen", function() { + // console.log("leave-full-screen"); + mainWindow.setFullScreen(true); + }); + + mainWindow.on("resize", function() { + setTimeout(function() { + mainWindow.reload(); + }, 1000); + }); + } } // This method will be called when Electron has finished @@ -50,11 +66,7 @@ app.on("ready", function() { // Quit when all windows are closed. app.on("window-all-closed", function() { - // On OS X it is common for applications and their menu bar - // to stay active until the user quits explicitly with Cmd + Q - if (process.platform !== "darwin") { - app.quit(); - } + createWindow(); }); app.on("activate", function() { From e2ed0f5e55c132633bcbd5c7c64159c0aaced571 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Tue, 9 Aug 2016 10:33:34 +0200 Subject: [PATCH 02/52] Cleanup --- js/electron.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/electron.js b/js/electron.js index 1a3ddb64..75dc47fd 100644 --- a/js/electron.js +++ b/js/electron.js @@ -45,7 +45,6 @@ function createWindow() { }); mainWindow.on("leave-full-screen", function() { - // console.log("leave-full-screen"); mainWindow.setFullScreen(true); }); From 45cb770e41cbdd4a4af9501a7b8ccb3289d31e73 Mon Sep 17 00:00:00 2001 From: yo-less Date: Fri, 26 Aug 2016 22:06:03 +0200 Subject: [PATCH 03/52] Added option to remove "more" tags in description Many feed descriptions end with with a link tag to the actual article online (see http://www.deutschlandfunk.de/die-nachrichten.353.de.rss, for example). The mirror news description looks strange with this tag in the end. I have added an option to remove the tag from the description and updated the readme.md accordingly. --- modules/default/newsfeed/README.md | 15 ++++++++++++++- modules/default/newsfeed/newsfeed.js | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 882ef94a..365d8a6e 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -108,7 +108,20 @@ The following properties can be configured:
Default value: 0 - + + showMore + Remove "more..." tags from the end of the item description.
+
Possible values:true or false +
Default value: false + + + + moreTag + Specify the exact wording of the "more..." tag.
+
Possible values: 'YOUR_MORE_TAG_HERE' +
Default value: '' + + diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index a9664085..5a6c8b70 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -24,7 +24,9 @@ Module.register("newsfeed",{ reloadInterval: 5 * 60 * 1000, // every 5 minutes updateInterval: 10 * 1000, animationSpeed: 2.5 * 1000, - maxNewsItems: 0 // 0 for unlimited + maxNewsItems: 0, // 0 for unlimited + more: false, + moreTag: 'more' }, // Define required scripts. @@ -100,7 +102,16 @@ Module.register("newsfeed",{ title.className = "bright medium light"; title.innerHTML = this.newsItems[this.activeItem].title; wrapper.appendChild(title); - + + //Remove "more" tag from description of rss feeds + + if (this.config.showMore) { + if (this.newsItems[this.activeItem].description.slice(-this.config.moreTag.length)==this.config.moreTag) { + this.newsItems[this.activeItem].description = this.newsItems[this.activeItem].description.slice(0,-this.config.moreTag.length); + } + } + + if (this.config.showDescription) { var description = document.createElement("div"); description.className = "small light"; From e720efabdcbd9b99bb726d97c378a80588d2ae52 Mon Sep 17 00:00:00 2001 From: yo-less Date: Fri, 26 Aug 2016 22:08:23 +0200 Subject: [PATCH 04/52] Updated readme.md / Included more tag --- modules/default/newsfeed/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 365d8a6e..e2a4c6f1 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -119,7 +119,7 @@ The following properties can be configured: moreTag Specify the exact wording of the "more..." tag.

Possible values: 'YOUR_MORE_TAG_HERE' -
Default value: '' +
Default value: 'more' From 6f104f505609c13637a3182d10f6ea29a4111331 Mon Sep 17 00:00:00 2001 From: yo-less Date: Sat, 27 Aug 2016 00:32:47 +0200 Subject: [PATCH 05/52] Allow for the removal of feed tags User-specified feed tags in description and title can be removed --- modules/default/newsfeed/README.md | 33 +++++++++++---- modules/default/newsfeed/newsfeed.js | 61 ++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 21 deletions(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index e2a4c6f1..12fe8e7c 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -108,18 +108,35 @@ The following properties can be configured:
Default value: 0 + removeStartTags: false, + removeEndTags: false, + startTags: [], + endTags: [] + + - showMore - Remove "more..." tags from the end of the item description.
-
Possible values:true or false -
Default value: false + 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:'none',description, title, both - moreTag - Specify the exact wording of the "more..." tag.
-
Possible values: 'YOUR_MORE_TAG_HERE' -
Default value: 'more' + 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:description, title, both + + + + endTags + List the tags you would like to have removed at the end of the feed item
+
Possible values: ['TAG'] or ['TAG1','TAG2',...] diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 5a6c8b70..a61ba640 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -25,8 +25,11 @@ Module.register("newsfeed",{ updateInterval: 10 * 1000, animationSpeed: 2.5 * 1000, maxNewsItems: 0, // 0 for unlimited - more: false, - moreTag: 'more' + removeStartTags: false, + removeEndTags: false, + startTags: [], + endTags: [] + }, // Define required scripts. @@ -98,20 +101,50 @@ Module.register("newsfeed",{ wrapper.appendChild(sourceAndTimestamp); } + //Remove selected tags from the beginning of rss feed items (title or description) + + if (this.config.removeStartTags) { + + for (f=0; f Date: Sat, 27 Aug 2016 00:35:27 +0200 Subject: [PATCH 06/52] Allow for removal of feed tags Updated README.md for legibility --- modules/default/newsfeed/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 12fe8e7c..1815e567 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -116,8 +116,8 @@ The following properties can be configured: 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.
+ 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:'none',description, title, both @@ -129,7 +129,7 @@ The following properties can be configured: removeEndTags - Remove specified tags from the end of an item's description and / or title.
+ Remove specified tags from the end of an item's description and/or title.

Possible values:description, title, both From 43a0829f44aa64a6edb45831ed4b25d8af2b41ff Mon Sep 17 00:00:00 2001 From: yo-less Date: Sat, 27 Aug 2016 00:37:19 +0200 Subject: [PATCH 07/52] Allow for the removal of feed tags legibility update --- modules/default/newsfeed/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 1815e567..a8ac40dd 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -116,7 +116,7 @@ The following properties can be configured: removeStartTags - Some newsfeeds feature tags at the beginning of their titles or descriptions, such as VIDEO. + 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:'none',description, title, both @@ -124,7 +124,7 @@ The following properties can be configured: startTags List the tags you would like to have removed at the beginning of the feed item
-
Possible values: ['TAG'] or ['TAG1','TAG2',...] +
Possible values: ['TAG'] or ['TAG1','TAG2',...] @@ -136,7 +136,7 @@ The following properties can be configured: endTags List the tags you would like to have removed at the end of the feed item
-
Possible values: ['TAG'] or ['TAG1','TAG2',...] +
Possible values: ['TAG'] or ['TAG1','TAG2',...] From c427050a92be5c2fea16281c91798260b62a4049 Mon Sep 17 00:00:00 2001 From: yo-less Date: Sat, 27 Aug 2016 01:16:31 +0200 Subject: [PATCH 08/52] Allow for the removal of feed tags Added options: both, description, title --- modules/default/newsfeed/newsfeed.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index a61ba640..7d8d08c7 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -25,8 +25,8 @@ Module.register("newsfeed",{ updateInterval: 10 * 1000, animationSpeed: 2.5 * 1000, maxNewsItems: 0, // 0 for unlimited - removeStartTags: false, - removeEndTags: false, + removeStartTags: '', + removeEndTags: '', startTags: [], endTags: [] @@ -103,7 +103,7 @@ Module.register("newsfeed",{ //Remove selected tags from the beginning of rss feed items (title or description) - if (this.config.removeStartTags) { + if (this.config.removeStartTags == 'title' || 'both') { for (f=0; f Date: Sat, 27 Aug 2016 12:59:00 +0200 Subject: [PATCH 09/52] Updated README.md Fixed inconsistencies in tag removal instructions. --- modules/default/newsfeed/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index a8ac40dd..f88322c4 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -118,7 +118,7 @@ The following properties can be configured: 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:'none',description, title, both +
Possible values:'title', 'description', 'both' From a08704e8edf0772f660b4fb93586a346cc473531 Mon Sep 17 00:00:00 2001 From: Jens Date: Sat, 27 Aug 2016 13:12:08 +0200 Subject: [PATCH 10/52] Updated CHANGELOG.md Added tag removal description for newsfeed items --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index df710e02..243b7d15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Updated - Force fullscreen when kioskmode is active. +- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js' ## [2.0.4] - 2016-08-07 From d248b11ffc876d0107fd2fc3f785b3f8be4a922d Mon Sep 17 00:00:00 2001 From: Jens Date: Sat, 27 Aug 2016 13:48:33 +0200 Subject: [PATCH 11/52] Updated README.md Fixed inconsistencies in tag removal instructions. --- modules/default/newsfeed/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index f88322c4..89e3fd1b 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -130,7 +130,7 @@ The following properties can be configured: removeEndTags Remove specified tags from the end of an item's description and/or title.
-
Possible values:description, title, both +
Possible values:'title', 'description', 'both' From bf5587fe09e9aa80ee30b10aaa2cf7645001c6de Mon Sep 17 00:00:00 2001 From: Jens Date: Sat, 27 Aug 2016 20:35:00 +0200 Subject: [PATCH 12/52] Updated README.md Fixed minor typo --- modules/default/calendar/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md index 05d12de8..3189d92c 100644 --- a/modules/default/calendar/README.md +++ b/modules/default/calendar/README.md @@ -173,7 +173,7 @@ config: { symbol The symbol to show in front of an event. This property is optional.
-
Possible values: See Font Awsome website. +
Possible values: See Font Awesome website. From 177d113cd9224e53674186bfd24e3cfb7c534d98 Mon Sep 17 00:00:00 2001 From: Platimir Date: Tue, 30 Aug 2016 15:57:52 +0200 Subject: [PATCH 13/52] Update README.md --- modules/default/newsfeed/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 89e3fd1b..951fa51c 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -98,7 +98,7 @@ The following properties can be configured: animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000 -
Default value: 2000 (2.5 seconds) +
Default value: 2000 (2 seconds) From 1b69e62e2e25497959614bb3e0d83b5af05659ce Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 31 Aug 2016 14:39:37 +0200 Subject: [PATCH 14/52] Added "DAYAFTERTOMORROW" tag if config language is German --- modules/default/calendar/calendar.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index c90153a0..cf2c97cb 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -150,6 +150,12 @@ Module.register("calendar",{ timeWrapper.innerHTML = this.translate("TODAY"); } else if (event.startDate - now < one_day && event.startDate - now > 0) { timeWrapper.innerHTML = this.translate("TOMORROW"); + } else if (event.startDate - now < 2*one_day && event.startDate - now > 0) { + if (config.language == 'de') { + timeWrapper.innerHTML = this.translate("DAYAFTERTOMORROW"); + } else { + timeWrapper.innerHTML = moment(event.startDate, "x").fromNow(); + } } else { /* Check to see if the user displays absolute or relative dates with their events * Also check to see if an event is happening within an 'urgency' time frameElement From 76d6dca63fdafea8128bfa9d9d91b3da655ef183 Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 31 Aug 2016 14:41:49 +0200 Subject: [PATCH 15/52] =?UTF-8?q?Added=20"=C3=9Cbermorgen"=20to=20show=20i?= =?UTF-8?q?n=20calendar.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translations/de.json | 1 + 1 file changed, 1 insertion(+) diff --git a/translations/de.json b/translations/de.json index d4c20d10..d8a254a9 100644 --- a/translations/de.json +++ b/translations/de.json @@ -5,6 +5,7 @@ /* CALENDAR */ "TODAY": "Heute", "TOMORROW": "Morgen", + "DAYAFTERTOMORROW": "Übermorgen", "RUNNING": "noch", "EMPTY": "Keine Termine.", From f5be159187e63f11dc3a879aeaaf6a9091794b76 Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 31 Aug 2016 22:11:31 +0200 Subject: [PATCH 16/52] Added "DAYAFTERTOMORROW" tag if available --- modules/default/calendar/calendar.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index cf2c97cb..d4871338 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -151,10 +151,14 @@ Module.register("calendar",{ } else if (event.startDate - now < one_day && event.startDate - now > 0) { timeWrapper.innerHTML = this.translate("TOMORROW"); } else if (event.startDate - now < 2*one_day && event.startDate - now > 0) { - if (config.language == 'de') { - timeWrapper.innerHTML = this.translate("DAYAFTERTOMORROW"); + /*Provide ability to show "the day after tomorrow" instead of "in a day" + *if "DAYAFTERTOMORROW" is configured in a language's translation .json file, + *,which can be found in MagicMirror/translations/ + */ + if (this.translate('DAYAFTERTOMORROW') !== 'DAYAFTERTOMORROW') { + timeWrapper.innerHTML = this.translate("DAYAFTERTOMORROW"); } else { - timeWrapper.innerHTML = moment(event.startDate, "x").fromNow(); + timeWrapper.innerHTML = moment(event.startDate, "x").fromNow(); } } else { /* Check to see if the user displays absolute or relative dates with their events From 88266ec4e302fcbdce43b5f770e411dc2b2e8d7e Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 31 Aug 2016 22:17:43 +0200 Subject: [PATCH 17/52] Added "day after tomorrow" changes to calendar.js --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c76d0362..e9e14d7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## Unpublished + +### Updated +- Force fullscreen when kioskmode is active. + +### Added +- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js' +- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included) + ## [2.0.4] - 2016-08-07 ### Added From 104c1ecbec9815d87d1b9740dfbe3b35bd9544d7 Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 31 Aug 2016 22:18:30 +0200 Subject: [PATCH 18/52] Added "day after tomorrow" changes to calendar.js --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e14d7b..661eda5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Force fullscreen when kioskmode is active. ### Added -- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js' -- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included) +- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. +- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included). ## [2.0.4] - 2016-08-07 From 3d97e26cde73e7bc6d0a1fa6317842c6cbe485fe Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 31 Aug 2016 22:40:50 +0200 Subject: [PATCH 19/52] Delete CHANGELOG.md --- CHANGELOG.md | 83 ---------------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 661eda5f..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,83 +0,0 @@ -# MagicMirror² Change Log -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -## Unpublished - -### Updated -- Force fullscreen when kioskmode is active. - -### Added -- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. -- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included). - -## [2.0.4] - 2016-08-07 - -### Added -- Brazilian Portuguese Translation. -- Option to enable Kios mode. -- Added ability to start the app with Dev Tools. -- Added ability to turn off the date display in `clock.js` when in analog mode. -- Greek Translation - -### Fixed -- Prevent `getModules()` selectors from returning duplicate entries. -- Append endpoints of weather modules with `/` to retreive the correct data. (Issue [#337](https://github.com/MichMich/MagicMirror/issues/337)) -- Corrected grammer in `module.js` from 'suspend' to 'suspended'. -- Fixed openweathermap.org URL in config sample. -- Prevent currentweather module from crashing when received data object is incorrect. -- Fix issue where translation loading prevented the UI start-up when the language was set to 'en'. (Issue [#388](https://github.com/MichMich/MagicMirror/issues/388)) - -### Updated -- Updated package.json to fix possible vulnerabilities. (Using Snyk) -- Updated weathericons -- Updated default weatherforecast to work with the new icons. -- More detailed error message in case config file couldn't be loaded. - -## [2.0.3] - 2016-07-12 -### Added -- Add max newsitems parameter to the newsfeed module. -- Translations for Simplified Chinese, Traditional Chinese and Japanese. -- Polish Translation -- Add an analog clock in addition to the digital one. - -### Fixed -- Edit Alert Module to display title & message if they are provided in the notification (Issue [#300](https://github.com/MichMich/MagicMirror/issues/300)) -- Removed 'null' reference from updateModuleContent(). This fixes recent Edge and Internet Explorer browser displays (Issue [#319](https://github.com/MichMich/MagicMirror/issues/319)) - -### Changed -- Added default string to calendar titleReplace. - -## [2.0.2] - 2016-06-05 -### Added -- Norwegian Translations (nb and nn) -- Portuguese Translation -- Swedish Translation - -### Fixed -- Added reference to Italian Translation. -- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344) -- Added proper User-Agent string to calendar call. - -### Changed -- Add option to use locationID in weather modules. - -## [2.0.1] - 2016-05-18 -### Added -- Changelog -- Italian Translation - -### Changed -- Improve the installer by fetching the latest Node.js without any 3rd party interferences. - -## [2.0.0] - 2016-05-03 -### Initial release of MagicMirror² -It includes (but is not limited to) the following features: -- Modular system allowing 3rd party plugins. -- An Node/Electron based application taking away the need for external servers or browsers. -- A complete development API documentation. -- Small cute fairies that kiss you while you sleep. - -## [1.0.0] - 2014-02-16 -### Initial release of MagicMirror. -This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the From 91dd308952308aeeaad7b4fe66dbf0b94e5b139e Mon Sep 17 00:00:00 2001 From: yo-less Date: Wed, 31 Aug 2016 22:43:27 +0200 Subject: [PATCH 20/52] Added 'day after tomorrow' changes to calendar.js --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661eda5f..64afe07c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unpublished ### Updated -- Force fullscreen when kioskmode is active. +- Force fullscreen when kioskmode is active. ### Added - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. From 1bba75881f396873dd00274c4b5a7e78272e90bb Mon Sep 17 00:00:00 2001 From: yo-less Date: Wed, 31 Aug 2016 22:46:54 +0200 Subject: [PATCH 21/52] Added 'day after tomorrow'changes to calendar.js --- CHANGELOG.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..64afe07c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,83 @@ +# MagicMirror² Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## Unpublished + +### Updated +- Force fullscreen when kioskmode is active. + +### Added +- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. +- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included). + +## [2.0.4] - 2016-08-07 + +### Added +- Brazilian Portuguese Translation. +- Option to enable Kios mode. +- Added ability to start the app with Dev Tools. +- Added ability to turn off the date display in `clock.js` when in analog mode. +- Greek Translation + +### Fixed +- Prevent `getModules()` selectors from returning duplicate entries. +- Append endpoints of weather modules with `/` to retreive the correct data. (Issue [#337](https://github.com/MichMich/MagicMirror/issues/337)) +- Corrected grammer in `module.js` from 'suspend' to 'suspended'. +- Fixed openweathermap.org URL in config sample. +- Prevent currentweather module from crashing when received data object is incorrect. +- Fix issue where translation loading prevented the UI start-up when the language was set to 'en'. (Issue [#388](https://github.com/MichMich/MagicMirror/issues/388)) + +### Updated +- Updated package.json to fix possible vulnerabilities. (Using Snyk) +- Updated weathericons +- Updated default weatherforecast to work with the new icons. +- More detailed error message in case config file couldn't be loaded. + +## [2.0.3] - 2016-07-12 +### Added +- Add max newsitems parameter to the newsfeed module. +- Translations for Simplified Chinese, Traditional Chinese and Japanese. +- Polish Translation +- Add an analog clock in addition to the digital one. + +### Fixed +- Edit Alert Module to display title & message if they are provided in the notification (Issue [#300](https://github.com/MichMich/MagicMirror/issues/300)) +- Removed 'null' reference from updateModuleContent(). This fixes recent Edge and Internet Explorer browser displays (Issue [#319](https://github.com/MichMich/MagicMirror/issues/319)) + +### Changed +- Added default string to calendar titleReplace. + +## [2.0.2] - 2016-06-05 +### Added +- Norwegian Translations (nb and nn) +- Portuguese Translation +- Swedish Translation + +### Fixed +- Added reference to Italian Translation. +- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344) +- Added proper User-Agent string to calendar call. + +### Changed +- Add option to use locationID in weather modules. + +## [2.0.1] - 2016-05-18 +### Added +- Changelog +- Italian Translation + +### Changed +- Improve the installer by fetching the latest Node.js without any 3rd party interferences. + +## [2.0.0] - 2016-05-03 +### Initial release of MagicMirror² +It includes (but is not limited to) the following features: +- Modular system allowing 3rd party plugins. +- An Node/Electron based application taking away the need for external servers or browsers. +- A complete development API documentation. +- Small cute fairies that kiss you while you sleep. + +## [1.0.0] - 2014-02-16 +### Initial release of MagicMirror. +This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the From f795ee7fd90cd7b31392ed36366321d7e9a21aa7 Mon Sep 17 00:00:00 2001 From: yo-less Date: Wed, 31 Aug 2016 22:46:54 +0200 Subject: [PATCH 22/52] Added "day after tomorrow" changes to calendar.js --- CHANGELOG.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..64afe07c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,83 @@ +# MagicMirror² Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## Unpublished + +### Updated +- Force fullscreen when kioskmode is active. + +### Added +- Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. +- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included). + +## [2.0.4] - 2016-08-07 + +### Added +- Brazilian Portuguese Translation. +- Option to enable Kios mode. +- Added ability to start the app with Dev Tools. +- Added ability to turn off the date display in `clock.js` when in analog mode. +- Greek Translation + +### Fixed +- Prevent `getModules()` selectors from returning duplicate entries. +- Append endpoints of weather modules with `/` to retreive the correct data. (Issue [#337](https://github.com/MichMich/MagicMirror/issues/337)) +- Corrected grammer in `module.js` from 'suspend' to 'suspended'. +- Fixed openweathermap.org URL in config sample. +- Prevent currentweather module from crashing when received data object is incorrect. +- Fix issue where translation loading prevented the UI start-up when the language was set to 'en'. (Issue [#388](https://github.com/MichMich/MagicMirror/issues/388)) + +### Updated +- Updated package.json to fix possible vulnerabilities. (Using Snyk) +- Updated weathericons +- Updated default weatherforecast to work with the new icons. +- More detailed error message in case config file couldn't be loaded. + +## [2.0.3] - 2016-07-12 +### Added +- Add max newsitems parameter to the newsfeed module. +- Translations for Simplified Chinese, Traditional Chinese and Japanese. +- Polish Translation +- Add an analog clock in addition to the digital one. + +### Fixed +- Edit Alert Module to display title & message if they are provided in the notification (Issue [#300](https://github.com/MichMich/MagicMirror/issues/300)) +- Removed 'null' reference from updateModuleContent(). This fixes recent Edge and Internet Explorer browser displays (Issue [#319](https://github.com/MichMich/MagicMirror/issues/319)) + +### Changed +- Added default string to calendar titleReplace. + +## [2.0.2] - 2016-06-05 +### Added +- Norwegian Translations (nb and nn) +- Portuguese Translation +- Swedish Translation + +### Fixed +- Added reference to Italian Translation. +- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344) +- Added proper User-Agent string to calendar call. + +### Changed +- Add option to use locationID in weather modules. + +## [2.0.1] - 2016-05-18 +### Added +- Changelog +- Italian Translation + +### Changed +- Improve the installer by fetching the latest Node.js without any 3rd party interferences. + +## [2.0.0] - 2016-05-03 +### Initial release of MagicMirror² +It includes (but is not limited to) the following features: +- Modular system allowing 3rd party plugins. +- An Node/Electron based application taking away the need for external servers or browsers. +- A complete development API documentation. +- Small cute fairies that kiss you while you sleep. + +## [1.0.0] - 2014-02-16 +### Initial release of MagicMirror. +This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the From a481638c030c1e1ac750aae0bc1beccb45e5c11e Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Thu, 1 Sep 2016 09:42:33 +0200 Subject: [PATCH 23/52] Add dutch translation --- CHANGELOG.md | 2 +- translations/nl.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661eda5f..1e2cda42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. -- Added ability to define "the day after tomorrow" for calendar events (Definition for German already included). +- Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included). ## [2.0.4] - 2016-08-07 diff --git a/translations/nl.json b/translations/nl.json index c6094a3c..e4e882ea 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -5,6 +5,7 @@ /* CALENDAR */ "TODAY": "Vandaag", "TOMORROW": "Morgen", + "DAYAFTERTOMORROW": "Overmorgen", "RUNNING": "Eindigt over", "EMPTY": "Geen geplande afspraken.", From c3f97a0cf1360bb8487feb04d4782350cf42d632 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Fri, 2 Sep 2016 21:58:22 -0400 Subject: [PATCH 24/52] Add CII Badge, Remove Node Version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d5f7176..0b9e00ed 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

Dependency Status devDependency Status - Node Version + License Travis Known Vulnerabilities From a4ba7f277e94b7f014fa8350c71d754892e3b079 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Fri, 2 Sep 2016 22:00:37 -0400 Subject: [PATCH 25/52] Add Change to Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e2cda42..b87473dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. - Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included). +- Added CII Badge (we are compliant with the CII Best Practices) ## [2.0.4] - 2016-08-07 From 25ddf2c65178e2b8afe0709b48d5d30054208c04 Mon Sep 17 00:00:00 2001 From: Phil Oakley Date: Mon, 5 Sep 2016 19:06:21 -0600 Subject: [PATCH 26/52] currentweather module api url bugfix Running this on Raspberry Pi 2, node version v6.5.0, magicmirror@2.0.0 The current url created has a typo that causes the module to only display default weather units (Kelvin). After checking the website (http://openweathermap.org/current), there is no "/" at this location in the url. Removing it fixes the issue and allows the user to see the specified units in config.js. --- 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 db3d5de2..5265b099 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -164,7 +164,7 @@ Module.register("currentweather",{ * Calls processWeather on succesfull response. */ updateWeather: function() { - var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.weatherEndpoint + '/' + this.getParams(); + var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.weatherEndpoint + this.getParams(); var self = this; var retry = true; From 1def12061673cb231d9862770016cfad9e0f8399 Mon Sep 17 00:00:00 2001 From: Callum Date: Mon, 5 Sep 2016 22:47:49 -0400 Subject: [PATCH 27/52] Fix typos in raspberry.sh --- installers/raspberry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index 824bf7cc..f10c0ddc 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -68,7 +68,7 @@ else NODE_INSTALL=true fi -# Install or upgare node if nessecery. +# Install or upgrade node if necessary. if $NODE_INSTALL; then echo -e "\e[96mInstalling Node.js ...\e[90m" From 476c577bc113684f84bdf2ef112cafd92e879032 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Tue, 6 Sep 2016 10:08:12 +0200 Subject: [PATCH 28/52] Add fixes. --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b87473dc..9ac4cee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,17 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unpublished -### Updated -- Force fullscreen when kioskmode is active. - ### Added - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. - Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included). - Added CII Badge (we are compliant with the CII Best Practices) +- +### Fixed +- Fix typo in installer. +- Fix API url for weather API. + +### Updated +- Force fullscreen when kioskmode is active. ## [2.0.4] - 2016-08-07 From 1ea7ce25890f35d256ea14298e92b061322fe6c4 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Tue, 6 Sep 2016 10:09:11 +0200 Subject: [PATCH 29/52] Fix typo. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac4cee5..dbd244a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. - Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included). - Added CII Badge (we are compliant with the CII Best Practices) -- + ### Fixed - Fix typo in installer. - Fix API url for weather API. From af279df5c9845b3063d906b441ddcddef9a4493c Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Tue, 6 Sep 2016 19:23:52 -0400 Subject: [PATCH 30/52] Closes #374. ARMv6 is not supported by recent versions of Chrome, and by extent, this means recent versions of Electron as well. --- installers/raspberry.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/installers/raspberry.sh b/installers/raspberry.sh index f10c0ddc..ce37e86f 100644 --- a/installers/raspberry.sh +++ b/installers/raspberry.sh @@ -28,6 +28,7 @@ ARM=$(uname -m) if [ "$ARM" != "armv7l" ]; then echo -e "\e[91mSorry, your Raspberry Pi is not supported." echo -e "\e[91mPlease run MagicMirror on a Raspberry Pi 2 or 3." + echo -e "\e[91mIf this is a Pi Zero, you are in the same boat as the original Raspberry Pi. You must run in server only mode." exit; fi From c01c882081e6a6972713217a710bc3867d88ce19 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Tue, 6 Sep 2016 19:25:16 -0400 Subject: [PATCH 31/52] Update the Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd244a5..e402e066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fix typo in installer. +- Add message to unsupported Pi error to mention that Pi Zeros must use server only mode, as ARMv6 is unsupported. Closes #374. - Fix API url for weather API. ### Updated @@ -20,7 +21,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Brazilian Portuguese Translation. -- Option to enable Kios mode. +- Option to enable Kiosk mode. - Added ability to start the app with Dev Tools. - Added ability to turn off the date display in `clock.js` when in analog mode. - Greek Translation From 3cc186f7e4dcd9ba77d197efdfdb0aac7d528c9d Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:10:17 -0400 Subject: [PATCH 32/52] Clean Up the Contributing Documentation and Process: Part I * Remove the HTML Validator * Replace JSCS with ESLint * Replace `npm` commands with equivalent `grunt` commands --- .github/CONTRIBUTING.md | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7025dd7c..49c00ccb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,34 +5,21 @@ Thanks for contributing to MagicMirror²! We hold our code to standard, and these standards are documented below. -First, before you run the linters, you will need to install them all **and** install the development dependencies: +### JavaScript: Run ESLint -```bash -(sudo) npm install -g jscs stylelint html-validator-cli -npm install -``` +We use [ESLint](http://eslint.org) on our JavaScript files. -### JavaScript: Run JSCS +Our ESLint configuration is in our .eslintrc.json and .eslintignore files. -We use [JSCS](http://jscs.info) on our JavaScript files. - -Our JSCS configuration is in our .jscsrc file. - -To run JSCS, use `npm run jscs`. +To run ESLint, use `grunt eslint`. ### CSS: Run StyleLint We use [StyleLint](http://stylelint.io) to lint our CSS. Our configuration is in our .stylelintrc file. -To run StyleLint, use `npm run stylelint`. +To run StyleLint, use `grunt postcss:lint`. -### HTML: Run HTML Validator - -We use [NU Validator](https://validator.w3.org/nu) to validate our HTML. The configuration is in the command in the package.json file. - -To run HTML Validator, use `npm run htmlvalidator`. - -## Submitting Issues +### Submitting Issues Please only submit reproducible issues. From 1a54bafdd55505675dca2d080d463217dadde902 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:14:00 -0400 Subject: [PATCH 33/52] Clean Up the Contributing Documentation and Process: Part II * Add `grunt-stylelint` over the complicated PostCSS method previously used. * Remove PostCSS dependencies. --- package.json | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 8c2b226b..977a4bb1 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,6 @@ "main": "js/electron.js", "scripts": { "start": "electron js/electron.js", - "jscs": "jscs **/**/**/**/*.js", - "stylelint": "stylelint css/main.css fonts/roboto.css", - "htmlvalidator": "html-validator --file=index.html", "test": "snyk test", "snyk-protect": "snyk protect", "prepublish": "npm run snyk-protect" @@ -33,11 +30,9 @@ "electron-prebuilt": "latest", "grunt": "latest", "grunt-eslint": "latest", - "grunt-postcss": "latest", - "postcss-reporter": "latest", - "stylelint": "latest", "stylelint-config-standard": "latest", - "time-grunt": "latest" + "time-grunt": "latest", + "grunt-stylelint": "latest" }, "dependencies": { "express": "^4.14.0", @@ -52,4 +47,4 @@ "walk": "latest" }, "snyk": true -} \ No newline at end of file +} From a90f2cb1560956ab3354a370ad881a61f5bc91dc Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:17:20 -0400 Subject: [PATCH 34/52] Clean Up the Contributing Documentation and Process: Part III * Remove PostCSS from Grunt. * Add StyleLint to Grunt. --- Gruntfile.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ac499fe3..ff1552a8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,21 +8,16 @@ module.exports = function(grunt) { }, target: ["js/*.js", "modules/default/*.js", "serveronly/*.js", "*.js"] }, - postcss: { - lint: { + stylelint: { + simple: { options: { - processors: [ - require("stylelint")({"extends": "stylelint-config-standard", "font-family-name-quotes": "double-where-recommended"}), - require("postcss-reporter")({ clearMessages: true }) - ] + configFile: ".stylelintrc" }, - dist: { - src: "**/**/**/**/**/**/**/**.css" - } + src: "**/**/**/**/**/**/**/**/*.css" } } }); grunt.loadNpmTasks("grunt-eslint"); - grunt.loadNpmTasks("grunt-postcss"); - grunt.registerTask("default", ["eslint", "postcss:lint"]); -}; \ No newline at end of file + grunt.loadNpmTasks("grunt-stylelint"); + grunt.registerTask("default", ["eslint", "stylelint"]); +}; From 83ed298eba1c8827c34733b8777a16fa9f7d2987 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:22:40 -0400 Subject: [PATCH 35/52] Clean Up the Contributing Documentation and Process: Part IV * Replace `postcss:lint` with `stylelint`. * Update the contribution instructions. --- .github/CONTRIBUTING.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 49c00ccb..ee3b7219 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -3,7 +3,9 @@ Contribution Policy for MagicMirror² Thanks for contributing to MagicMirror²! -We hold our code to standard, and these standards are documented below. +We hold our code to standard, and these standards are documented below. + +If you wish to run both linters, use `grunt` without any arguments. ### JavaScript: Run ESLint @@ -17,30 +19,31 @@ To run ESLint, use `grunt eslint`. We use [StyleLint](http://stylelint.io) to lint our CSS. Our configuration is in our .stylelintrc file. -To run StyleLint, use `grunt postcss:lint`. +To run StyleLint, use `grunt stylelint`. ### Submitting Issues Please only submit reproducible issues. -If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting +If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: [https://forum.magicmirror.builders/category/15/bug-hunt](https://forum.magicmirror.builders/category/15/bug-hunt) +Problems installing or configuring your MagicMirror? Check out: [https://forum.magicmirror.builders/category/10/troubleshooting](https://forum.magicmirror.builders/category/10/troubleshooting) When submitting a new issue, please supply the following information: -**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]: +**Platform**: Place your platform here... give us your web browser/Electron version *and* your hardware (Raspberry Pi 2/3, Windows, Mac, Linux, System V UNIX). -**Node Version** [ 0.12.13 or later ]: +**Node Version**: Make sure it's version 0.12.13 or later. -**MagicMirror Version** [ V1 / V2-Beta ]: +**MagicMirror Version**: Now that the versions have split, tell us if you are using the PHP version (v1) or the newer JavaScript version (v2). -**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem. +**Description**: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem. -**Steps to Reproduce:** List the step by step process to reproduce the issue. +**Steps to Reproduce**: List the step by step process to reproduce the issue. -**Expected Results:** Describe what you expected to see. +**Expected Results**: Describe what you expected to see. -**Actual Results:** Describe what you actually saw. +**Actual Results**: Describe what you actually saw. -**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.) +**Configuration**: What does the used config.js file look like? Don't forget to remove any sensitive information! -**Additional Notes:** Provide any other relevant notes not previously mentioned (optional) +**Additional Notes**: Provide any other relevant notes not previously mentioned. This is optional. From 504d3cd13148558aa647f6ca603b718f6917aa39 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:23:45 -0400 Subject: [PATCH 36/52] Clean Up the Contributing Documentation and Process: Part V * Replace the contribution instructions with the ones from CONTRIBUTING.md. --- .github/ISSUE_TEMPLATE.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 6d039bf1..736795d7 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,21 +1,24 @@ Please only submit reproducible issues. -If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting +If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: [https://forum.magicmirror.builders/category/15/bug-hunt](https://forum.magicmirror.builders/category/15/bug-hunt) +Problems installing or configuring your MagicMirror? Check out: [https://forum.magicmirror.builders/category/10/troubleshooting](https://forum.magicmirror.builders/category/10/troubleshooting) -**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]: +When submitting a new issue, please supply the following information: -**Node Version** [ 0.12.13 or later ]: +**Platform**: Place your platform here... give us your web browser/Electron version *and* your hardware (Raspberry Pi 2/3, Windows, Mac, Linux, System V UNIX). -**MagicMirror Version** [ V1 / V2-Beta ]: +**Node Version**: Make sure it's version 0.12.13 or later. -**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem. +**MagicMirror Version**: Now that the versions have split, tell us if you are using the PHP version (v1) or the newer JavaScript version (v2). -**Steps to Reproduce:** List the step by step process to reproduce the issue. +**Description**: Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem. -**Expected Results:** Describe what you expected to see. +**Steps to Reproduce**: List the step by step process to reproduce the issue. -**Actual Results:** Describe what you actually saw. +**Expected Results**: Describe what you expected to see. -**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.) +**Actual Results**: Describe what you actually saw. -**Additional Notes:** Provide any other relevant notes not previously mentioned (optional) +**Configuration**: What does the used config.js file look like? Don't forget to remove any sensitive information! + +**Additional Notes**: Provide any other relevant notes not previously mentioned. This is optional. From 8549aeb466781393cec1af0cc93fee2de475a7a8 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:24:52 -0400 Subject: [PATCH 37/52] Clean Up the Contributing Documentation and Process: Part VI * Alter the pull request template to look a little better. --- .github/PULL_REQUEST_TEMPLATE.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1ac9aaa1..215950e0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,7 @@ -> Please send your PR's the develop branch. -> Don't forget to add the change to changelog.md. +> Please send your pull requests the develop branch. +> Don't forget to add the change to CHANGELOG.md. -* Does the pull request solve a **related** issue? [yes | no] +* Does the pull request solve a **related** issue? * If so, can you reference the issue? -* What does the pull request accomplish? (please list) +* What does the pull request accomplish? Use a list if needed. * If it includes major visual changes please add screenshots. - - From 0ec5371b617c1106438cfccf4f485518f555ed14 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:26:50 -0400 Subject: [PATCH 38/52] Clean Up the Contributing Documentation and Process: Part VII * Update the changelog to mention my changes. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e402e066..5659ae66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Updated - Force fullscreen when kioskmode is active. +- Update the .github templates and information with more modern information. +- Update the Gruntfile with a more functional StyleLint implementation. ## [2.0.4] - 2016-08-07 From 90207f9b68bab127f2df1f83d1367b8de415c193 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 8 Sep 2016 17:36:30 +0200 Subject: [PATCH 39/52] add support for http basic auth for calendars --- CHANGELOG.md | 1 + modules/default/calendar/README.md | 8 ++++++++ modules/default/calendar/calendar.js | 8 +++++--- modules/default/calendar/calendarfetcher.js | 13 +++++++++++-- modules/default/calendar/node_helper.js | 6 +++--- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e402e066..1e787e90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'. - Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included). - Added CII Badge (we are compliant with the CII Best Practices) +- Add support for doing http basic auth when loading calendars ### Fixed - Fix typo in installer. diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md index 3189d92c..936abdde 100644 --- a/modules/default/calendar/README.md +++ b/modules/default/calendar/README.md @@ -183,5 +183,13 @@ config: { 'Birthday' + + user + The username for HTTP Basic authentication. + + + pass + The password for HTTP Basic authentication. + diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index d4871338..3151467a 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -64,7 +64,7 @@ Module.register("calendar",{ for (var c in this.config.calendars) { var calendar = this.config.calendars[c]; calendar.url = calendar.url.replace("webcal://", "http://"); - this.addCalendar(calendar.url); + this.addCalendar(calendar.url, calendar.user, calendar.pass); } this.calendarData = {}; @@ -285,12 +285,14 @@ Module.register("calendar",{ * * argument url sting - Url to add. */ - addCalendar: function(url) { + addCalendar: function(url, user, pass) { this.sendSocketNotification("ADD_CALENDAR", { url: url, maximumEntries: this.config.maximumEntries, maximumNumberOfDays: this.config.maximumNumberOfDays, - fetchInterval: this.config.fetchInterval + fetchInterval: this.config.fetchInterval, + user: user, + pass: pass }); }, diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index f7f68b7e..214e2e5a 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -8,7 +8,7 @@ var ical = require("./vendor/ical.js"); var moment = require("moment"); -var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumberOfDays) { +var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumberOfDays, user, pass) { var self = this; var reloadTimer = null; @@ -29,7 +29,16 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe headers: { 'User-Agent': 'Mozilla/5.0 (Node.js 6.0.0) MagicMirror/v2 (https://github.com/MichMich/MagicMirror/)' } + }; + + if (user && pass) { + opts.auth = { + user: user, + pass: pass, + sendImmediately: true + } } + ical.fromURL(url, opts, function(err, data) { if (err) { fetchFailedCallback(self, err); @@ -239,4 +248,4 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe }; -module.exports = CalendarFetcher; \ No newline at end of file +module.exports = CalendarFetcher; diff --git a/modules/default/calendar/node_helper.js b/modules/default/calendar/node_helper.js index 47a0231b..a1b8db09 100644 --- a/modules/default/calendar/node_helper.js +++ b/modules/default/calendar/node_helper.js @@ -25,7 +25,7 @@ module.exports = NodeHelper.create({ socketNotificationReceived: function(notification, payload) { if (notification === "ADD_CALENDAR") { //console.log('ADD_CALENDAR: '); - this.createFetcher(payload.url, payload.fetchInterval, payload.maximumEntries, payload.maximumNumberOfDays); + this.createFetcher(payload.url, payload.fetchInterval, payload.maximumEntries, payload.maximumNumberOfDays, payload.user, payload.pass); } }, @@ -37,7 +37,7 @@ module.exports = NodeHelper.create({ * attribute reloadInterval number - Reload interval in milliseconds. */ - createFetcher: function(url, fetchInterval, maximumEntries, maximumNumberOfDays) { + createFetcher: function(url, fetchInterval, maximumEntries, maximumNumberOfDays, user, pass) { var self = this; if (!validUrl.isUri(url)) { @@ -48,7 +48,7 @@ module.exports = NodeHelper.create({ var fetcher; if (typeof self.fetchers[url] === "undefined") { console.log("Create new calendar fetcher for url: " + url + " - Interval: " + fetchInterval); - fetcher = new CalendarFetcher(url, fetchInterval, maximumEntries, maximumNumberOfDays); + fetcher = new CalendarFetcher(url, fetchInterval, maximumEntries, maximumNumberOfDays, user, pass); fetcher.onReceive(function(fetcher) { //console.log('Broadcast events.'); From c76f2c8483b3f9fee80f020927d086f9a2087d71 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:41:12 -0400 Subject: [PATCH 40/52] Clean Up the Contributing Documentation and Process: Part VII * Fix the globbing error in the previous commits. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index ff1552a8..3c7c00cc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,7 @@ module.exports = function(grunt) { options: { configFile: ".stylelintrc" }, - src: "**/**/**/**/**/**/**/**/*.css" + src: ["css/custom.css", "css/main.css", "modules/default/calendar/calendar.css", "modules/default/clock/clock_styles.css", "modules/default/currentweather/currentweather.css", "modules/default/weatherforcast/weatherforcast.css"] } } }); From 17452cd5b65bc9d1e23da42a984ec93c9ba2a1b2 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:44:43 -0400 Subject: [PATCH 41/52] Clean Up the Contributing Documentation and Process: Part VII.XXXIII * Fix the css/custom.css issues. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3c7c00cc..38f7247b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,7 @@ module.exports = function(grunt) { options: { configFile: ".stylelintrc" }, - src: ["css/custom.css", "css/main.css", "modules/default/calendar/calendar.css", "modules/default/clock/clock_styles.css", "modules/default/currentweather/currentweather.css", "modules/default/weatherforcast/weatherforcast.css"] + src: ["css/main.css", "modules/default/calendar/calendar.css", "modules/default/clock/clock_styles.css", "modules/default/currentweather/currentweather.css", "modules/default/weatherforcast/weatherforcast.css"] } } }); From e023a68780745239c077d020f243264ddaff712c Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:47:16 -0400 Subject: [PATCH 42/52] Clean Up the Contributing Documentation and Process: Part VII.LXVI * Fix the issues in css/main.css. --- css/main.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/css/main.css b/css/main.css index 93d6a7ee..7ae902d6 100644 --- a/css/main.css +++ b/css/main.css @@ -1,10 +1,10 @@ html { cursor: none; - overflow:hidden; + overflow: hidden; } -::-webkit-scrollbar { - display: none; +::-webkit-scrollbar { + display: none; } body { From 4e919199907b87f022d92c24cdd251dc4d3fc350 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:49:24 -0400 Subject: [PATCH 43/52] Clean Up the Contributing Documentation and Process: Part VII.LXVI.I * Fix the StyleLint config to allow the empty blocks in the clock module CSS. --- .stylelintrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index 02300404..db05c713 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,4 +1,5 @@ { "extends": "stylelint-config-standard", - "font-family-name-quotes": "double-where-recommended" -} \ No newline at end of file + "font-family-name-quotes": "double-where-recommended", + "block-no-empty": false +} From 0ca903a146a5ba94ab164fce5857c5337a4e2fb2 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:51:58 -0400 Subject: [PATCH 44/52] Clean Up the Contributing Documentation and Process: Part VII.LXVI.II * Fix the indentation in the clock CSS. --- modules/default/clock/clock_styles.css | 102 ++++++++++++------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/modules/default/clock/clock_styles.css b/modules/default/clock/clock_styles.css index 6020e579..b6eba047 100644 --- a/modules/default/clock/clock_styles.css +++ b/modules/default/clock/clock_styles.css @@ -5,70 +5,70 @@ } .clockCircle { - margin: 0 auto; - position: relative; - border-radius: 50%; - background-size: 100%; + margin: 0 auto; + position: relative; + border-radius: 50%; + background-size: 100%; } .clockFace { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } .clockFace:after { - position: absolute; - top: 50%; - left: 50%; - width: 6px; - height: 6px; - margin: -3px 0 0 -3px; - background: white; - border-radius: 3px; - content: ""; - display: block; + position: absolute; + top: 50%; + left: 50%; + width: 6px; + height: 6px; + margin: -3px 0 0 -3px; + background: white; + border-radius: 3px; + content: ""; + display: block; } .clockHour { - width: 0; - height: 0; - position: absolute; - top: 50%; - left: 50%; - margin: -2px 0 -2px -25%; /* numbers much match negative length & thickness */ - padding: 2px 0 2px 25%; /* indicator length & thickness */ - background: white; - -webkit-transform-origin: 100% 50%; - -ms-transform-origin: 100% 50%; - transform-origin: 100% 50%; - border-radius: 3px 0 0 3px; + width: 0; + height: 0; + position: absolute; + top: 50%; + left: 50%; + margin: -2px 0 -2px -25%; /* numbers much match negative length & thickness */ + padding: 2px 0 2px 25%; /* indicator length & thickness */ + background: white; + -webkit-transform-origin: 100% 50%; + -ms-transform-origin: 100% 50%; + transform-origin: 100% 50%; + border-radius: 3px 0 0 3px; } .clockMinute { - width: 0; - height: 0; - position: absolute; - top: 50%; - left: 50%; - margin: -35% -2px 0; /* numbers must match negative length & thickness */ - padding: 35% 2px 0; /* indicator length & thickness */ - background: white; - -webkit-transform-origin: 50% 100%; - -ms-transform-origin: 50% 100%; - transform-origin: 50% 100%; - border-radius: 3px 0 0 3px; + width: 0; + height: 0; + position: absolute; + top: 50%; + left: 50%; + margin: -35% -2px 0; /* numbers must match negative length & thickness */ + padding: 35% 2px 0; /* indicator length & thickness */ + background: white; + -webkit-transform-origin: 50% 100%; + -ms-transform-origin: 50% 100%; + transform-origin: 50% 100%; + border-radius: 3px 0 0 3px; } .clockSecond { - width: 0; - height: 0; - position: absolute; - top: 50%; - left: 50%; - margin: -38% -1px 0 0; /* numbers must match negative length & thickness */ - padding: 38% 1px 0 0; /* indicator length & thickness */ - background: #888888; - -webkit-transform-origin: 50% 100%; - -ms-transform-origin: 50% 100%; - transform-origin: 50% 100%; + width: 0; + height: 0; + position: absolute; + top: 50%; + left: 50%; + margin: -38% -1px 0 0; /* numbers must match negative length & thickness */ + padding: 38% 1px 0 0; /* indicator length & thickness */ + background: #888888; + -webkit-transform-origin: 50% 100%; + -ms-transform-origin: 50% 100%; + transform-origin: 50% 100%; } From 5ab4b5741150675f124a1114c50a187432b6cf24 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 15:57:25 -0400 Subject: [PATCH 45/52] Clean Up the Contributing Documentation and Process: Part VII.LXVI.III * Fix the errors that popped up out of the blue from Stylelint. --- modules/default/clock/clock_styles.css | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/default/clock/clock_styles.css b/modules/default/clock/clock_styles.css index b6eba047..7dc2d2a8 100644 --- a/modules/default/clock/clock_styles.css +++ b/modules/default/clock/clock_styles.css @@ -1,9 +1,3 @@ -#analog { -} - -#digital { -} - .clockCircle { margin: 0 auto; position: relative; @@ -16,7 +10,7 @@ height: 100%; } -.clockFace:after { +.clockFace::after { position: absolute; top: 50%; left: 50%; @@ -31,6 +25,7 @@ .clockHour { width: 0; + height: 0; position: absolute; top: 50%; @@ -67,7 +62,7 @@ left: 50%; margin: -38% -1px 0 0; /* numbers must match negative length & thickness */ padding: 38% 1px 0 0; /* indicator length & thickness */ - background: #888888; + background: #888; -webkit-transform-origin: 50% 100%; -ms-transform-origin: 50% 100%; transform-origin: 50% 100%; From c87c588c799ecafe5dfe0db4f4715d2328fa5055 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 8 Sep 2016 16:00:48 -0400 Subject: [PATCH 46/52] Clean Up the Contributing Documentation and Process: Part VII.LXVI.IV * Fix yet another out-of-the-blue error that Stylelint found. --- modules/default/clock/clock_styles.css | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/default/clock/clock_styles.css b/modules/default/clock/clock_styles.css index 7dc2d2a8..1df9bf83 100644 --- a/modules/default/clock/clock_styles.css +++ b/modules/default/clock/clock_styles.css @@ -25,7 +25,6 @@ .clockHour { width: 0; - height: 0; position: absolute; top: 50%; From 88572e90d48333ddf0c64f4839bf985766d7d68f Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Sat, 10 Sep 2016 16:41:57 -0400 Subject: [PATCH 47/52] Add all the linters --- .eslintignore | 1 - CHANGELOG.md | 2 +- Gruntfile.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- README.md | 16 ++++++++-------- package.json | 13 ++++++++----- 5 files changed, 63 insertions(+), 17 deletions(-) diff --git a/.eslintignore b/.eslintignore index 25422889..2e1f92d3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,5 @@ vendor/ !/vendor/vendor.js -/modules/** !/modules/default/** !/modules/node_helper !/modules/node_helper/** diff --git a/CHANGELOG.md b/CHANGELOG.md index 5659ae66..efb93cd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,4 +88,4 @@ It includes (but is not limited to) the following features: ## [1.0.0] - 2014-02-16 ### Initial release of MagicMirror. -This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the +This was part of the blogpost: [http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the](http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the) diff --git a/Gruntfile.js b/Gruntfile.js index 38f7247b..e5bc690b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,9 +15,53 @@ module.exports = function(grunt) { }, src: ["css/main.css", "modules/default/calendar/calendar.css", "modules/default/clock/clock_styles.css", "modules/default/currentweather/currentweather.css", "modules/default/weatherforcast/weatherforcast.css"] } + }, + jsonlint: { + main: { + src: ["package.json", ".eslintrc.json", ".stylelint"], + options: { + reporter: "jshint" + } + } + }, + markdownlint: { + all: { + options: { + config: { + "default": true, + "line-length": false, + "blanks-around-headers": false, + "no-duplicate-header": false, + "no-inline-html": false, + "MD010": false, + "MD001": false, + "MD031": false, + "MD040": false, + "MD002": false, + "MD029": false, + "MD041": false, + "MD032": false, + "MD036": false, + "MD037": false, + "MD009": false, + "MD018": false, + "MD012": false, + "MD026": false, + "MD036": false, + "MD038": false + } + }, + src: ["README.md", "CHANGELOG.md", "LICENSE.md", "modules/README.md", "modules/default/**/*.md", "!modules/default/calendar/vendor/ical.js/readme.md"] + } + }, + yamllint: { + all: [".travis.yml"] } }); grunt.loadNpmTasks("grunt-eslint"); grunt.loadNpmTasks("grunt-stylelint"); - grunt.registerTask("default", ["eslint", "stylelint"]); -}; + grunt.loadNpmTasks("grunt-jsonlint"); + grunt.loadNpmTasks("grunt-yamllint"); + grunt.loadNpmTasks("grunt-markdownlint"); + grunt.registerTask("default", ["eslint", "stylelint", "jsonlint", "markdownlint", "yamllint"]); +}; \ No newline at end of file diff --git a/README.md b/README.md index 0b9e00ed..d86cca7c 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,17 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec ## Usage -#### Raspberry Pi Support +### Raspberry Pi Support Electron, the app wrapper around MagicMirror², only supports the Raspberry Pi 2 & 3. The Raspberry Pi 1 is currently **not** supported. If you want to run this on a Raspberry Pi 1, use the [server only](#server-only) feature and setup a fullscreen browser yourself. -#### Automatic Installer (Raspberry Pi Only!) +### Automatic Installer (Raspberry Pi Only!) Execute the following command on your Raspberry Pi to install MagicMirror²: ```` curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash ```` -#### Manual Installation +### 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` @@ -45,23 +45,23 @@ curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installer **Note:** if you want to debug on Raspberry Pi you can use `npm start dev` which will start the MagicMirror app with Dev Tools enabled. -#### Server Only +### Server Only In some cases, you want to start the application without an actual app window. In this case, execute the following command from the MagicMirror folder: `node serveronly`. This will start the server, after which you can open the application in your browser of choice. -#### Raspberry Configuration & Auto Start. +### Raspberry Configuration & Auto Start. The following wiki links are helpful in the configuration of your MagicMirror² operating system: - [Configuring the Raspberry Pi](https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi) - [Auto Starting MagicMirror](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror) -#### Updating you 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 git pull -```` +``` If you changed nothing more than the config or the modules, this should work without any problems. Type `git status` to see your changes, if there are any, you can reset them with `git reset --hard`. After that, git pull should be possible. diff --git a/package.json b/package.json index 977a4bb1..ad2c0109 100644 --- a/package.json +++ b/package.json @@ -27,24 +27,27 @@ }, "homepage": "https://github.com/MichMich/MagicMirror#readme", "devDependencies": { - "electron-prebuilt": "latest", "grunt": "latest", "grunt-eslint": "latest", + "grunt-jsonlint": "latest", + "grunt-markdownlint": "^1.0.4", + "grunt-stylelint": "latest", + "grunt-yamllint": "latest", "stylelint-config-standard": "latest", - "time-grunt": "latest", - "grunt-stylelint": "latest" + "time-grunt": "latest" }, "dependencies": { + "electron-prebuilt": "latest", "express": "^4.14.0", "feedme": "latest", "iconv-lite": "latest", "moment": "latest", "request": "^2.74.0", "rrule": "latest", - "snyk": "^1.14.1", "socket.io": "^1.4.6", "valid-url": "latest", - "walk": "latest" + "walk": "latest", + "snyk": "^1.14.1" }, "snyk": true } From f468dbf4271204685bdfaef5d433fa4ed9b5b18e Mon Sep 17 00:00:00 2001 From: Andrew Chumchal Date: Sun, 11 Sep 2016 08:04:33 -0700 Subject: [PATCH 48/52] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e787e90..65239356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included). - Added CII Badge (we are compliant with the CII Best Practices) - Add support for doing http basic auth when loading calendars +- Add the abilty to turn off and on the date display in the Clock Module ### Fixed - Fix typo in installer. From 747e1a818d36a0c831207d2f9f5f81c336391dd8 Mon Sep 17 00:00:00 2001 From: Andrew Chumchal Date: Sun, 11 Sep 2016 08:14:28 -0700 Subject: [PATCH 49/52] Able to turn off and on the clock module --- modules/default/clock/README.md | 9 ++++++++- modules/default/clock/clock.js | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/default/clock/README.md b/modules/default/clock/README.md index c7ec6bcb..6eca1efb 100644 --- a/modules/default/clock/README.md +++ b/modules/default/clock/README.md @@ -66,6 +66,13 @@ The following properties can be configured:
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.
@@ -109,4 +116,4 @@ The following properties can be configured: - + \ No newline at end of file diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index e3415375..db41d7e0 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -15,6 +15,7 @@ Module.register("clock",{ showPeriod: true, showPeriodUpper: false, clockBold: false, + showDate: true, /* specific to the analog clock */ analogSize: '200px', @@ -85,7 +86,9 @@ Module.register("clock",{ timeString = moment().format("h:mm"); } } + if(this.config.showDate){ dateWrapper.innerHTML = moment().format("dddd, LL"); + } timeWrapper.innerHTML = timeString; secondsWrapper.innerHTML = moment().format("ss"); if (this.config.showPeriodUpper) { @@ -224,4 +227,4 @@ Module.register("clock",{ // Return the wrapper to the dom. return wrapper; } -}); +}); \ No newline at end of file From 5dfecfdee3e205bc825158e4114c25fbdb6b0c31 Mon Sep 17 00:00:00 2001 From: contra Date: Sat, 17 Sep 2016 17:54:38 -0400 Subject: [PATCH 50/52] fix typo --- modules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/README.md b/modules/README.md index 39072db5..f4a8debd 100644 --- a/modules/README.md +++ b/modules/README.md @@ -4,7 +4,7 @@ This document describes the way to develop your own MagicMirror² modules. ## Module structure -All modules are loaded in de `modules` folder. The default modules are grouped together in the `modules/default` folder. Your module should be placed in a subfolder of `modules`. Note that any file or folder your create in the `modules` folder will be ignored by git, allowing you to upgrade the MagicMirror² without the loss of your files. +All modules are loaded in the `modules` folder. The default modules are grouped together in the `modules/default` folder. Your module should be placed in a subfolder of `modules`. Note that any file or folder your create in the `modules` folder will be ignored by git, allowing you to upgrade the MagicMirror² without the loss of your files. A module can be placed in one single folder. Or multiple modules can be grouped in a subfoler. Note that name of the module must be unique. Even when a module with a similar name is placed in a different folder, they can't be loaded at the same time. From 749475799ad1d6f860e02360dc0a7fc59563ebcb Mon Sep 17 00:00:00 2001 From: valmassoi Date: Sun, 18 Sep 2016 10:54:20 -0700 Subject: [PATCH 51/52] Fix default weather forecast module api URL --- modules/default/weatherforecast/weatherforecast.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index 706da252..a8a8ca6c 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -102,7 +102,7 @@ Module.register("weatherforecast",{ } if (!this.loaded) { - wrapper.innerHTML = this.translate('LOADING'); + wrapper.innerHTML = this.translate("LOADING"); wrapper.className = "dimmed light small"; return wrapper; } @@ -161,7 +161,7 @@ Module.register("weatherforecast",{ * Calls processWeather on succesfull response. */ updateWeather: function() { - var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.forecastEndpoint + '/' + this.getParams(); + var url = this.config.apiBase + this.config.apiVersion + "/" + this.config.forecastEndpoint + this.getParams(); var self = this; var retry = true; From c916472b2263f4940c8f200af9a42f917c00c603 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Tue, 20 Sep 2016 16:32:45 +0200 Subject: [PATCH 52/52] Release 2.0.5 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f75d45ab..20f95c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## Unpublished +## [2.0.5] - 2016-09-20 ### Added - Added ability to remove tags from the beginning or end of newsfeed items in 'newsfeed.js'.