From af827b5645b0dce5ad92e888457d7bf0a226b9c2 Mon Sep 17 00:00:00 2001
From: Paul-Vincent Roll
Date: Sun, 24 Apr 2016 22:33:30 +0200
Subject: [PATCH 01/24] Added getTranslations() to the documentation
---
modules/README.md | 37 ++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)
diff --git a/modules/README.md b/modules/README.md
index 965051b0..a622b1e9 100644
--- a/modules/README.md
+++ b/modules/README.md
@@ -97,7 +97,7 @@ start: function() {
####`getScripts()`
**Should return: Array**
-The getScripts method is called to request any additional scripts that need to be loaded. This method should therefor return an array with strings. If you want to return a full path to a file in the module folder, use the `this.file('filename.js')` method. In all cases the loader will only load a file once. It even checks if the file is available in the default vendor folder.
+The getScripts method is called to request any additional scripts that need to be loaded. This method should therefore return an array with strings. If you want to return a full path to a file in the module folder, use the `this.file('filename.js')` method. In all cases the loader will only load a file once. It even checks if the file is available in the default vendor folder.
**Example:**
````javascript
@@ -117,7 +117,7 @@ getScripts: function() {
####`getStyles()`
**Should return: Array**
-The getStyles method is called to request any additional scripts that need to be loaded. This method should therefor return an array with strings. If you want to return a full path to a file in the module folder, use the `this.file('filename.css')` method. In all cases the loader will only load a file once. It even checks if the file is available in the default vendor folder.
+The getStyles method is called to request any additional stylesheets that need to be loaded. This method should therefore return an array with strings. If you want to return a full path to a file in the module folder, use the `this.file('filename.css')` method. In all cases the loader will only load a file once. It even checks if the file is available in the default vendor folder.
**Example:**
````javascript
@@ -133,6 +133,22 @@ getStyles: function() {
````
**Note:** If a file can not be loaded, the boot up of the mirror will stall. Therefore it's advised not to use any external urls.
+####`getTranslations()`
+**Should return: Dictionary**
+
+The getTranslations method is called to request translation files that need to be loaded. This method should therefore return a dictionary with the files to load, identified by the country's short name.
+
+**Example:**
+````javascript
+getTranslations: function() {
+ return {
+ en: "translations/en.json",
+ de: "translations/de.json"
+ }
+}
+
+````
+
####`getDom()`
**Should return:** Dom Object
@@ -448,6 +464,21 @@ Module.register("modulename",{
//...
});
````
+## MagicMirror Translation
+
+The Magic Mirror contains a convenience wrapper for `l18n`. You can use this to automatically serve different translations for your modules based on the user's `language` configuration.
+
+**Example:**
+````javascript
+this.translate("INFO") //Will return a translated string for the identifier INFO
+````
+
+**Example json file:**
+````javascript
+{
+ "INFO": "Really important information!"
+}
+````
## MagicMirror Logger
@@ -458,4 +489,4 @@ The Magic Mirror contains a convenience wrapper for logging. Currently, this log
Log.info('error');
Log.log('log');
Log.error('info');
-```
\ No newline at end of file
+````
From fd3676067a6a385e6da500fdc8f0ea5872fca9e3 Mon Sep 17 00:00:00 2001
From: Paul-Vincent Roll
Date: Sun, 24 Apr 2016 23:06:49 +0200
Subject: [PATCH 02/24] Added translation fallback note to documentation
---
modules/README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/README.md b/modules/README.md
index a622b1e9..9d6be2cd 100644
--- a/modules/README.md
+++ b/modules/README.md
@@ -480,6 +480,8 @@ this.translate("INFO") //Will return a translated string for the identifier INFO
}
````
+**Note:** Currently there is no fallback if a translation identifier does not exist in one language. Right now you always have to add all identifier to all your translations even if they are not translated yet (see [#191](https://github.com/MichMich/MagicMirror/issues/191)).
+
## MagicMirror Logger
The Magic Mirror contains a convenience wrapper for logging. Currently, this logger is a simple proxy to the original `console.log` methods. But it might get additional features in the future. The Loggers is currently only available in the core module file (not in the node_helper).
From 1ab00ac804530eec3ba91608f207ea8af03c35a2 Mon Sep 17 00:00:00 2001
From: Paul-Vincent Roll
Date: Sun, 24 Apr 2016 23:14:24 +0200
Subject: [PATCH 03/24] Moved this.translate() to the instance methods
---
modules/README.md | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/modules/README.md b/modules/README.md
index 9d6be2cd..b2caa2af 100644
--- a/modules/README.md
+++ b/modules/README.md
@@ -277,6 +277,25 @@ To show a module, you can call the `show(speed, callback)` method. You can call
**Note 2:** If the show animation is hijacked (an other method calls show on the same module), the callback will not be called.
**Note 3:** If the dom is not yet created, the show method won't work. Wait for the `DOM_OBJECTS_CREATED` [notification](#notificationreceivednotification-payload-sender).
+####`this.translate(identifier)`
+***identifier* String** - Identifier of the string that should be translated.
+
+The Magic Mirror contains a convenience wrapper for `l18n`. You can use this to automatically serve different translations for your modules based on the user's `language` configuration.
+
+**Example:**
+````javascript
+this.translate("INFO") //Will return a translated string for the identifier INFO
+````
+
+**Example json file:**
+````javascript
+{
+ "INFO": "Really important information!"
+}
+````
+
+**Note:** Currently there is no fallback if a translation identifier does not exist in one language. Right now you always have to add all identifier to all your translations even if they are not translated yet (see [#191](https://github.com/MichMich/MagicMirror/issues/191)).
+
## The Node Helper: node_helper.js
@@ -464,23 +483,6 @@ Module.register("modulename",{
//...
});
````
-## MagicMirror Translation
-
-The Magic Mirror contains a convenience wrapper for `l18n`. You can use this to automatically serve different translations for your modules based on the user's `language` configuration.
-
-**Example:**
-````javascript
-this.translate("INFO") //Will return a translated string for the identifier INFO
-````
-
-**Example json file:**
-````javascript
-{
- "INFO": "Really important information!"
-}
-````
-
-**Note:** Currently there is no fallback if a translation identifier does not exist in one language. Right now you always have to add all identifier to all your translations even if they are not translated yet (see [#191](https://github.com/MichMich/MagicMirror/issues/191)).
## MagicMirror Logger
From 4e86de7fc2ff64b9b1cd691dd76ea0899b80ad4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mona=20Sch=C3=BCch?=
Date: Tue, 26 Apr 2016 22:34:12 +0200
Subject: [PATCH 04/24] calendar events repeating count title for birthdayd etc
---
modules/default/calendar/README.md | 15 +++++
modules/default/calendar/calendar.js | 39 +++++++++++-
modules/default/calendar/calendarfetcher.js | 3 +-
nohup.out | 68 +++++++++++++++++++++
4 files changed, 122 insertions(+), 3 deletions(-)
create mode 100644 nohup.out
diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md
index cfe4e2b8..00378263 100644
--- a/modules/default/calendar/README.md
+++ b/modules/default/calendar/README.md
@@ -112,6 +112,14 @@ The following properties can be configured:
+
+
displayRepeatingCountTitle
+
Show count title for yearly repeating events (e.g. "X. Birthday", "X. Anniversary")
+
+ Possible values:true or false
+ Default value:false
+
+
@@ -154,5 +162,12 @@ config: {
Possible values: See Font Awsome website.
+
+
repeatingCountTitle
+
The count title for yearly repating events in this calendar.
+ Example:
+ 'Birthday'
+
+
diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js
index 5e315586..8bad8277 100644
--- a/modules/default/calendar/calendar.js
+++ b/modules/default/calendar/calendar.js
@@ -15,6 +15,8 @@ Module.register("calendar",{
maximumNumberOfDays: 365,
displaySymbol: true,
defaultSymbol: "calendar", // Fontawsome Symbol see http://fontawesome.io/cheatsheet/
+ displayRepeatingCountTitle: false,
+ defaultRepeatingCountTitle: '',
maxTitleLength: 25,
fetchInterval: 5 * 60 * 1000, // Update every 5 minutes.
animationSpeed: 2000,
@@ -113,8 +115,24 @@ Module.register("calendar",{
eventWrapper.appendChild(symbolWrapper);
}
- var titleWrapper = document.createElement("td");
- titleWrapper.innerHTML = this.titleTransform(event.title);
+ var titleWrapper = document.createElement("td"),
+ repeatingCountTitle = '';
+
+
+ if (this.config.displayRepeatingCountTitle) {
+
+ repeatingCountTitle = this.countTitleForUrl(event.url)
+
+ if(repeatingCountTitle != '') {
+
+ var thisYear = new Date().getFullYear(),
+ yearDiff = thisYear - event.firstYear;
+
+ repeatingCountTitle = ', '+ yearDiff + '. ' + repeatingCountTitle;
+ }
+ }
+
+ titleWrapper.innerHTML = this.titleTransform(event.title) + repeatingCountTitle;
titleWrapper.className = "title bright";
eventWrapper.appendChild(titleWrapper);
@@ -239,6 +257,23 @@ Module.register("calendar",{
return this.config.defaultSymbol;
},
+ /* countTitleForUrl(url)
+ * Retrieves the name for a specific url.
+ *
+ * argument url sting - Url to look for.
+ *
+ * return string - The Symbol
+ */
+ countTitleForUrl: function(url) {
+ for (var c in this.config.calendars) {
+ var calendar = this.config.calendars[c];
+ if (calendar.url === url && typeof calendar.repeatingCountTitle === "string") {
+ return calendar.repeatingCountTitle;
+ }
+ }
+
+ return this.config.defaultRepeatingCountTitle;
+ },
/* shorten(string, maxLength)
* Shortens a sting if it's longer than maxLenthg.
diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js
index ac558e2f..4675f4c0 100644
--- a/modules/default/calendar/calendarfetcher.js
+++ b/modules/default/calendar/calendarfetcher.js
@@ -84,7 +84,8 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
title: (typeof event.summary.val !== "undefined") ? event.summary.val : event.summary,
startDate: startDate.format("x"),
endDate: endDate.format("x"),
- fullDayEvent: isFullDayEvent(event)
+ fullDayEvent: isFullDayEvent(event),
+ firstYear: event.start.getFullYear()
});
}
}
diff --git a/nohup.out b/nohup.out
new file mode 100644
index 00000000..6a8c47df
--- /dev/null
+++ b/nohup.out
@@ -0,0 +1,68 @@
+
+> magicmirror@2.0.0 start /home/pi/MagicMirror
+> electron js/electron.js
+
+Loading config ...
+Loading module helpers ...
+No helper found for module: alert.
+No helper found for module: clock.
+Initializing new module helper ...
+No helper found for module: compliments.
+No helper found for module: currentweather.
+No helper found for module: weatherforecast.
+Initializing new module helper ...
+All module helpers loaded.
+Starting server op port 8080 ...
+Server started ...
+Connecting socket for: calendar
+Starting node helper for: calendar
+Connecting socket for: newsfeed
+Starting module: newsfeed
+Sockets connected & modules started ...
+[1m[47m[31mA JavaScript error occurred in the main process
+[30mUncaught Exception:
+Error: listen EADDRINUSE :::8080
+ at Object.exports._errnoException (util.js:890:11)
+ at exports._exceptionWithHostPort (util.js:913:20)
+ at Server._listen2 (net.js:1234:14)
+ at listen (net.js:1270:10)
+ at Server.listen (net.js:1366:5)
+ at new Server (/home/pi/MagicMirror/js/server.js:17:9)
+ at /home/pi/MagicMirror/js/app.js:112:17
+ at loadConfig (/home/pi/MagicMirror/js/app.js:33:4)
+ at start (/home/pi/MagicMirror/js/app.js:98:3)
+ at Object. (/home/pi/MagicMirror/js/electron.js:64:6)[0m
+Launching application.
+
+> magicmirror@2.0.0 start /home/pi/MagicMirror
+> electron js/electron.js
+
+Loading config ...
+Loading module helpers ...
+No helper found for module: clock.
+Initializing new module helper ...
+No helper found for module: currentweather.
+No helper found for module: weatherforecast.
+No helper found for module: voice.
+Initializing new module helper ...
+All module helpers loaded.
+Starting server op port 8080 ...
+Server started ...
+Connecting socket for: custom-calendar
+Starting node helper for: custom-calendar
+Connecting socket for: MMM-Wunderlist
+Sockets connected & modules started ...
+[1m[47m[31mA JavaScript error occurred in the main process
+[30mUncaught Exception:
+Error: listen EADDRINUSE :::8080
+ at Object.exports._errnoException (util.js:890:11)
+ at exports._exceptionWithHostPort (util.js:913:20)
+ at Server._listen2 (net.js:1234:14)
+ at listen (net.js:1270:10)
+ at Server.listen (net.js:1366:5)
+ at new Server (/home/pi/MagicMirror/js/server.js:17:9)
+ at /home/pi/MagicMirror/js/app.js:112:17
+ at loadConfig (/home/pi/MagicMirror/js/app.js:33:4)
+ at start (/home/pi/MagicMirror/js/app.js:98:3)
+ at Object. (/home/pi/MagicMirror/js/electron.js:64:6)[0m
+Launching application.
From f12125f2a4cc46ef7beeef44c3f1a864d46efe11 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Wed, 27 Apr 2016 09:37:44 +0200
Subject: [PATCH 05/24] Update to node 6.0.0
---
installers/raspberry.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/installers/raspberry.sh b/installers/raspberry.sh
index 4f1d2e2c..3c1687c0 100644
--- a/installers/raspberry.sh
+++ b/installers/raspberry.sh
@@ -18,7 +18,7 @@
echo "Installing helper tools ..."
sudo apt-get install curl wget build-essential unzip || exit
ARM=$(uname -m) # Determine which Pi is running.
-NODE_LATEST="v5.11.0" # Set the latest version here.
+NODE_LATEST="v6.0.0" # Set the latest version here.
DOWNLOAD_URL="https://nodejs.org/dist/latest/node-$NODE_LATEST-linux-$ARM.tar.gz" # Construct the download URL.
echo "Installing Latest Node.js ..."
From 08bc644de1b80ea8ca821125fc753da4b210581d Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Wed, 27 Apr 2016 09:42:12 +0200
Subject: [PATCH 06/24] Fix #245
---
.jscsrc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.jscsrc b/.jscsrc
index bc1fcea6..4638b44f 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -4,5 +4,6 @@
"validateQuoteMarks": "\"",
"maximumLineLength": 250,
"requireCurlyBraces": [],
- "requireCamelCaseOrUpperCaseIdentifiers": false
+ "requireCamelCaseOrUpperCaseIdentifiers": false,
+ "excludeFiles": [".jscsrc"],
}
\ No newline at end of file
From 7cbc8a0edee8fc320323439c083580e5878b00fd Mon Sep 17 00:00:00 2001
From: djsunrise19
Date: Wed, 27 Apr 2016 10:45:15 +0200
Subject: [PATCH 07/24] Update de.json
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cause ´morgen um ***` and other words are written lowercased, it makes sense to write ´noch` lowercased too. Days und whole day events have to be as they are.
---
modules/default/calendar/translations/de.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/default/calendar/translations/de.json b/modules/default/calendar/translations/de.json
index 2e5de572..cea5588d 100644
--- a/modules/default/calendar/translations/de.json
+++ b/modules/default/calendar/translations/de.json
@@ -1,7 +1,7 @@
{
"TODAY": "Heute"
, "TOMORROW": "Morgen"
- , "RUNNING": "Noch"
+ , "RUNNING": "noch"
, "LOADING": "Lade Termine …"
, "EMPTY": "Keine Termine."
}
From ab2c91ba2023b33c93e40a4f8c843749e8c94c07 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Wed, 27 Apr 2016 14:37:11 +0200
Subject: [PATCH 08/24] Add slack channel (experimental)
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 4c935d31..e461cf90 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,7 @@
+
**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](http://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MichMich/MagicMirror/graphs/contributors).
From f1841168245ecb904110240ca16acfc415b39786 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Wed, 27 Apr 2016 14:39:21 +0200
Subject: [PATCH 09/24] Remove slack.
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index e461cf90..4c935d31 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,6 @@
-
**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant. **MagicMirror²** is built by the creator of [the original MagicMirror](http://michaelteeuw.nl/tagged/magicmirror) with the incredible help of a [growing community of contributors](https://github.com/MichMich/MagicMirror/graphs/contributors).
From 8b792c5fe0d25fce66cdb4047703903c1d1bbd69 Mon Sep 17 00:00:00 2001
From: Nicholas Hubbard
Date: Fri, 29 Apr 2016 11:24:14 -0400
Subject: [PATCH 10/24] clockBold's Re-Incarnation: Part I
---
modules/default/clock/clock.js | 35 ++++++++++++++--------------------
1 file changed, 14 insertions(+), 21 deletions(-)
diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js
index 611170f4..7f76324f 100644
--- a/modules/default/clock/clock.js
+++ b/modules/default/clock/clock.js
@@ -1,41 +1,34 @@
/* global Log, Module, moment, config */
-
/* Magic Mirror
* Module: Clock
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*/
-
Module.register("clock",{
-
// Module config defaults.
defaults: {
timeFormat: config.timeFormat,
displaySeconds: true,
showPeriod: true,
showPeriodUpper: false,
+ clockBold: false
},
-
// Define required scripts.
getScripts: function() {
return ["moment.js"];
},
-
// Define start sequence.
start: function() {
Log.info("Starting module: " + this.name);
-
// Schedule update interval.
var self = this;
setInterval(function() {
self.updateDom();
}, 1000);
-
// Set locale.
moment.locale(config.language);
},
-
// Override dom generator.
getDom: function() {
// Create wrappers.
@@ -44,35 +37,36 @@ Module.register("clock",{
var timeWrapper = document.createElement("div");
var secondsWrapper = document.createElement("sup");
var periodWrapper = document.createElement("span");
-
// Style Wrappers
dateWrapper.className = "date normal medium";
timeWrapper.className = "time bright large light";
secondsWrapper.className = "dimmed";
-
// Set content of wrappers.
- // The moment().format('h') method has a bug on the Raspberry Pi.
+ // The moment().format("h") method has a bug on the Raspberry Pi.
// So we need to generate the timestring manually.
// See issue: https://github.com/MichMich/MagicMirror/issues/181
- var timeString = moment().format('HH:mm');
+ if (this.config.clockBold === true) {
+ var timeString = moment().format("HH[]mm[]");
+ } else {
+ var timeString = moment().format("HH:mm");
+ }
if (this.config.timeFormat !== 24) {
var now = new Date();
var hours = now.getHours() % 12 || 12;
- timeString = hours + moment().format(':mm');
+ if (this.config.clockBold === true) {
+ timeString = hours + moment().format("[]mm[]");
+ } else {
+ timeString = hours + moment().format(":mm");
+ }
}
-
dateWrapper.innerHTML = moment().format("dddd, LL");
timeWrapper.innerHTML = timeString;
secondsWrapper.innerHTML = moment().format("ss");
-
-
if (this.config.showPeriodUpper) {
- periodWrapper.innerHTML = moment().format('A');
+ periodWrapper.innerHTML = moment().format("A");
} else {
- periodWrapper.innerHTML = moment().format('a');
+ periodWrapper.innerHTML = moment().format("a");
}
-
-
// Combine wrappers.
wrapper.appendChild(dateWrapper);
wrapper.appendChild(timeWrapper);
@@ -82,7 +76,6 @@ Module.register("clock",{
if (this.config.showPeriod && this.config.timeFormat !== 24) {
timeWrapper.appendChild(periodWrapper);
}
-
// Return the wrapper to the dom.
return wrapper;
}
From ab3f585a2baffef30cbeec3364a85b02b86803e5 Mon Sep 17 00:00:00 2001
From: Nicholas Hubbard
Date: Fri, 29 Apr 2016 11:25:05 -0400
Subject: [PATCH 11/24] clockBold's Re-Incarnation: Part II
---
modules/default/clock/README.md | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/modules/default/clock/README.md b/modules/default/clock/README.md
index 522b1ad2..8808825c 100644
--- a/modules/default/clock/README.md
+++ b/modules/default/clock/README.md
@@ -47,14 +47,21 @@ The following properties can be configured:
showPeriod
-
Show the period (am/pm) with 12 hour format
+
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
+
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
From 3f040e77443b8561c24511cd50c6978f77e66bfc Mon Sep 17 00:00:00 2001
From: "Ashley M. Kirchner"
Date: Fri, 29 Apr 2016 12:52:10 -0600
Subject: [PATCH 12/24] Update weatherforecast.js
Added the option to change the amount of forecasted days returned by the OpenWeatherAPI.
---
modules/default/weatherforecast/weatherforecast.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js
index c1e79828..c5b8762b 100644
--- a/modules/default/weatherforecast/weatherforecast.js
+++ b/modules/default/weatherforecast/weatherforecast.js
@@ -14,6 +14,7 @@ Module.register("weatherforecast",{
location: "",
appid: "",
units: config.units,
+ maxNumberOfDays: 7,
updateInterval: 10 * 60 * 1000, // every 10 minutes
animationSpeed: 1000,
timeFormat: config.timeFormat,
@@ -189,6 +190,12 @@ Module.register("weatherforecast",{
params += "q=" + this.config.location;
params += "&units=" + this.config.units;
params += "&lang=" + this.config.lang;
+ /*
+ * Submit a specific number of days to forecast, between 1 to 16 days.
+ * The OpenWeatherMap API properly handles values outside of the 1 - 16 range and returns 7 days by default.
+ * This is simply being pedantic and doing it ourselves.
+ */
+ params += "&cnt=" + (((this.config.maxNumberOfDays < 1) || (this.config.maxNumberOfDays > 16)) ? 7 : this.config.maxNumberOfDays);
params += "&APPID=" + this.config.appid;
return params;
From 4d0a93fc3b2e6a4d1aeb3768216a8bee87639532 Mon Sep 17 00:00:00 2001
From: "Ashley M. Kirchner"
Date: Fri, 29 Apr 2016 12:58:03 -0600
Subject: [PATCH 13/24] Update README.md
Added the maxNumberOfDays config option to change the amount of forecasted days returned by the OpenWeatherAPI.
---
modules/default/weatherforecast/README.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/default/weatherforecast/README.md b/modules/default/weatherforecast/README.md
index c5be33ce..9e93bd14 100644
--- a/modules/default/weatherforecast/README.md
+++ b/modules/default/weatherforecast/README.md
@@ -55,6 +55,14 @@ The following properties can be configured:
Default value:config.units
+
+
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.
+
+
updateInterval
How often does the content needs to be fetched? (Milliseconds)
From f627c5e5a1d10633d145801380823306837ec84b Mon Sep 17 00:00:00 2001
From: Nicholas Hubbard
Date: Sun, 1 May 2016 13:46:41 -0400
Subject: [PATCH 14/24] Extend the Logger
Add Timing, Grouping, and Warning to the logger.
---
js/logger.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/js/logger.js b/js/logger.js
index 994fe534..dd094458 100644
--- a/js/logger.js
+++ b/js/logger.js
@@ -21,6 +21,27 @@ var Log = (function() {
},
error: function(message) {
console.error(message);
+ },
+ warn: function(message) {
+ console.warn(message);
+ },
+ group: function(message) {
+ console.group(message);
+ },
+ groupCollapsed: function(message) {
+ console.groupCollapsed(message);
+ }
+ groupEnd: function() {
+ console.groupEnd();
+ },
+ time: function(message) {
+ console.time(message);
+ },
+ timeEnd: function(message) {
+ console.timeEnd(message);
+ },
+ timeStamp: function(message) {
+ console.timeStamp(message);
}
};
})();
From 0252495ecad031afb87df9c0afbb9c39f521e8bc Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Sun, 1 May 2016 23:30:01 +0200
Subject: [PATCH 15/24] Missing ,
---
js/logger.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/logger.js b/js/logger.js
index dd094458..5b2df990 100644
--- a/js/logger.js
+++ b/js/logger.js
@@ -30,7 +30,7 @@ var Log = (function() {
},
groupCollapsed: function(message) {
console.groupCollapsed(message);
- }
+ },
groupEnd: function() {
console.groupEnd();
},
From df31b56cf380a5554f2566ba881ebead1158e7f9 Mon Sep 17 00:00:00 2001
From: Paul-Vincent Roll
Date: Mon, 2 May 2016 17:02:03 +0200
Subject: [PATCH 16/24] Added forum to README.
---
README.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/README.md b/README.md
index 4c935d31..12dada9a 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec
- [Configuration](#configuration)
- [Modules](#modules)
- [Known Issues](#known-issues)
+- [community](#community)
- [Contributing Guidelines](#contributing-guidelines)
## Usage
@@ -110,6 +111,10 @@ For more available modules, check out out the wiki page: [MagicMirror² Modules]
- Electron seems to have some issues on certain Raspberry Pi 2's. See [#145](https://github.com/MichMich/MagicMirror/issues/145).
- MagicMirror² (Electron) sometimes quits without an error after an extended period of use. See [#150](https://github.com/MichMich/MagicMirror/issues/150).
+## Community
+
+The community around the MagicMirror² is constantly growing. We even have a [forum](https://forum.magicmirror.builders) now where you can share your ideas, ask questions, help others and get inspired by other builders. We would love to see you there!
+
## Contributing Guidelines
Contributions of all kinds are welcome, not only in the form of code but also with regards bug reports and documentation.
From 2a3a942b8e73965311d1b7366fb8b8f3a7fe5b47 Mon Sep 17 00:00:00 2001
From: momo13292
Date: Mon, 2 May 2016 19:32:18 +0200
Subject: [PATCH 17/24] Delete nohup.out
---
nohup.out | 68 -------------------------------------------------------
1 file changed, 68 deletions(-)
delete mode 100644 nohup.out
diff --git a/nohup.out b/nohup.out
deleted file mode 100644
index 6a8c47df..00000000
--- a/nohup.out
+++ /dev/null
@@ -1,68 +0,0 @@
-
-> magicmirror@2.0.0 start /home/pi/MagicMirror
-> electron js/electron.js
-
-Loading config ...
-Loading module helpers ...
-No helper found for module: alert.
-No helper found for module: clock.
-Initializing new module helper ...
-No helper found for module: compliments.
-No helper found for module: currentweather.
-No helper found for module: weatherforecast.
-Initializing new module helper ...
-All module helpers loaded.
-Starting server op port 8080 ...
-Server started ...
-Connecting socket for: calendar
-Starting node helper for: calendar
-Connecting socket for: newsfeed
-Starting module: newsfeed
-Sockets connected & modules started ...
-[1m[47m[31mA JavaScript error occurred in the main process
-[30mUncaught Exception:
-Error: listen EADDRINUSE :::8080
- at Object.exports._errnoException (util.js:890:11)
- at exports._exceptionWithHostPort (util.js:913:20)
- at Server._listen2 (net.js:1234:14)
- at listen (net.js:1270:10)
- at Server.listen (net.js:1366:5)
- at new Server (/home/pi/MagicMirror/js/server.js:17:9)
- at /home/pi/MagicMirror/js/app.js:112:17
- at loadConfig (/home/pi/MagicMirror/js/app.js:33:4)
- at start (/home/pi/MagicMirror/js/app.js:98:3)
- at Object. (/home/pi/MagicMirror/js/electron.js:64:6)[0m
-Launching application.
-
-> magicmirror@2.0.0 start /home/pi/MagicMirror
-> electron js/electron.js
-
-Loading config ...
-Loading module helpers ...
-No helper found for module: clock.
-Initializing new module helper ...
-No helper found for module: currentweather.
-No helper found for module: weatherforecast.
-No helper found for module: voice.
-Initializing new module helper ...
-All module helpers loaded.
-Starting server op port 8080 ...
-Server started ...
-Connecting socket for: custom-calendar
-Starting node helper for: custom-calendar
-Connecting socket for: MMM-Wunderlist
-Sockets connected & modules started ...
-[1m[47m[31mA JavaScript error occurred in the main process
-[30mUncaught Exception:
-Error: listen EADDRINUSE :::8080
- at Object.exports._errnoException (util.js:890:11)
- at exports._exceptionWithHostPort (util.js:913:20)
- at Server._listen2 (net.js:1234:14)
- at listen (net.js:1270:10)
- at Server.listen (net.js:1366:5)
- at new Server (/home/pi/MagicMirror/js/server.js:17:9)
- at /home/pi/MagicMirror/js/app.js:112:17
- at loadConfig (/home/pi/MagicMirror/js/app.js:33:4)
- at start (/home/pi/MagicMirror/js/app.js:98:3)
- at Object. (/home/pi/MagicMirror/js/electron.js:64:6)[0m
-Launching application.
From a1b3e0778a9a45b2dfe5d57ecfbd17fc623b6248 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Tue, 3 May 2016 11:18:06 +0200
Subject: [PATCH 18/24] Add info about malformed config files. Fix: #249
---
js/defaults.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/js/defaults.js b/js/defaults.js
index 28cc2613..8129bff9 100644
--- a/js/defaults.js
+++ b/js/defaults.js
@@ -38,6 +38,14 @@ var defaults = {
text: "See README for more information."
}
},
+ {
+ module: "helloworld",
+ position: "middle_center",
+ classes: "xsmall",
+ config: {
+ text: "If you get this message while your config file is already created, your config file probably contains an error. Use a javascript linter to validate your file."
+ }
+ },
{
module: "helloworld",
position: "bottom_bar",
From 05a946e2bfd3f8427f30754c4d56eedf4bdaa205 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Tue, 3 May 2016 11:19:01 +0200
Subject: [PATCH 19/24] Formatting.
---
js/defaults.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/defaults.js b/js/defaults.js
index 8129bff9..1d81252c 100644
--- a/js/defaults.js
+++ b/js/defaults.js
@@ -43,7 +43,7 @@ var defaults = {
position: "middle_center",
classes: "xsmall",
config: {
- text: "If you get this message while your config file is already created, your config file probably contains an error. Use a javascript linter to validate your file."
+ text: "If you get this message while your config file is already created, your config file probably contains an error. Use a JavaScript linter to validate your file."
}
},
{
From 37f8c0783d56d35ed7bb2d727766645022803f15 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Tue, 3 May 2016 11:56:24 +0200
Subject: [PATCH 20/24] Fix facebook dates. #271
---
modules/default/calendar/calendar.js | 5 ++---
modules/default/calendar/calendarfetcher.js | 10 ++++++----
modules/default/calendar/vendor/ical.js/node-ical.js | 2 +-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js
index 8bad8277..ea881007 100644
--- a/modules/default/calendar/calendar.js
+++ b/modules/default/calendar/calendar.js
@@ -121,10 +121,9 @@ Module.register("calendar",{
if (this.config.displayRepeatingCountTitle) {
- repeatingCountTitle = this.countTitleForUrl(event.url)
+ repeatingCountTitle = this.countTitleForUrl(event.url);
- if(repeatingCountTitle != '') {
-
+ if(repeatingCountTitle !== '') {
var thisYear = new Date().getFullYear(),
yearDiff = thisYear - event.firstYear;
diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js
index 4675f4c0..00a17fd9 100644
--- a/modules/default/calendar/calendarfetcher.js
+++ b/modules/default/calendar/calendarfetcher.js
@@ -55,14 +55,16 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
if (event.type === "VEVENT") {
- //console.log(event);
-
var startDate = (event.start.length === 8) ? moment(event.start, "YYYYMMDD") : moment(new Date(event.start));
var endDate;
if (typeof event.end !== "undefined") {
endDate = (event.end.length === 8) ? moment(event.end, "YYYYMMDD") : moment(new Date(event.end));
} else {
- endDate = startDate;
+ if (!isFacebookBirthday) {
+ endDate = startDate;
+ } else {
+ endDate = moment(startDate).add(1, 'days');
+ }
}
// calculate the duration f the event for use with recurring events.
@@ -92,7 +94,7 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
} else {
// console.log("Single event ...");
// Single event.
- var fullDayEvent = isFullDayEvent(event);
+ var fullDayEvent = (isFacebookBirthday) ? true : isFullDayEvent(event);
var title = (typeof event.summary.val !== "undefined") ? event.summary.val : event.summary;
if (!fullDayEvent && endDate < new Date()) {
diff --git a/modules/default/calendar/vendor/ical.js/node-ical.js b/modules/default/calendar/vendor/ical.js/node-ical.js
index 294908ea..2f6ef3ef 100644
--- a/modules/default/calendar/vendor/ical.js/node-ical.js
+++ b/modules/default/calendar/vendor/ical.js/node-ical.js
@@ -32,7 +32,7 @@ ical.objectHandlers['END'] = function(val, params, curr, stack){
if (curr.start.length === 8) {
var comps = /^(\d{4})(\d{2})(\d{2})$/.exec(curr.start);
if (comps) {
- curr.start = new Date (comps[1], comps[2], comps[3]);
+ curr.start = new Date (comps[1], comps[2] - 1, comps[3]);
}
}
From 14d3bb273cbdfff672db48314a8e3c35d00f5acc Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Tue, 3 May 2016 16:42:09 +0200
Subject: [PATCH 21/24] Load custom.css after the modules. Fix: #284
---
index.html | 2 +-
js/loader.js | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index d08291cc..26972810 100644
--- a/index.html
+++ b/index.html
@@ -6,8 +6,8 @@
-
+
diff --git a/js/loader.js b/js/loader.js
index 2dbd40b2..da75908e 100644
--- a/js/loader.js
+++ b/js/loader.js
@@ -34,7 +34,15 @@ var Loader = (function() {
loadNextModule();
});
} else {
- startModules();
+ // All modules loaded. Load custom.css
+ // This is done after all the moduels so we can
+ // overwrite all the defined styls.
+
+ loadFile('css/custom.css', function() {
+ // custom.css loaded. Start all modules.
+ startModules();
+ });
+
}
};
From a6da9e8943490dfd25f9a8ec8ef58075da646c1a Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Tue, 3 May 2016 16:59:18 +0200
Subject: [PATCH 22/24] Fix #283
---
modules/default/alert/alert.js | 2 +-
modules/default/alert/notificationFx.js | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js
index bff91504..084161ac 100644
--- a/modules/default/alert/alert.js
+++ b/modules/default/alert/alert.js
@@ -18,7 +18,7 @@ Module.register("alert",{
//Position
position: "center",
//shown at startup
- welcome_message: true,
+ welcome_message: false,
},
getScripts: function() {
return ["classie.js", "modernizr.custom.js", "notificationFx.js"];
diff --git a/modules/default/alert/notificationFx.js b/modules/default/alert/notificationFx.js
index b74c9d14..ca77208d 100644
--- a/modules/default/alert/notificationFx.js
+++ b/modules/default/alert/notificationFx.js
@@ -144,7 +144,10 @@
if (ev.target !== self.ntf) return false;
this.removeEventListener(animEndEventName, onEndAnimationFn);
}
- self.options.wrapper.removeChild(this);
+
+ if (this.parentNode === self.options.wrapper) {
+ self.options.wrapper.removeChild(this);
+ }
};
if (support.animations) {
From 744f9316a9ce9c5af646a35edf2c316bf32ab641 Mon Sep 17 00:00:00 2001
From: Daniel nix
Date: Tue, 3 May 2016 17:01:48 +0200
Subject: [PATCH 23/24] Create fr.json
adding fr translation
---
modules/default/calendar/translations/fr.json | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 modules/default/calendar/translations/fr.json
diff --git a/modules/default/calendar/translations/fr.json b/modules/default/calendar/translations/fr.json
new file mode 100644
index 00000000..45f48b8b
--- /dev/null
+++ b/modules/default/calendar/translations/fr.json
@@ -0,0 +1,7 @@
+{
+ "TODAY": "Aujourd'hui"
+ , "TOMORROW": "Demain"
+ , "RUNNING": "Se termine dans"
+ , "LOADING": "Chargement des RDV …"
+ , "EMPTY": "Aucun RDV."
+}
From 2e5a5812a9194ddc0e3e68e233e5d9d02f126e03 Mon Sep 17 00:00:00 2001
From: Daniel nix
Date: Tue, 3 May 2016 17:04:45 +0200
Subject: [PATCH 24/24] Update calendar.js
add fr translation for calendar
---
modules/default/calendar/calendar.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js
index ea881007..2d494499 100644
--- a/modules/default/calendar/calendar.js
+++ b/modules/default/calendar/calendar.js
@@ -48,7 +48,8 @@ Module.register("calendar",{
return {
en: "translations/en.json",
de: "translations/de.json",
- nl: "translations/nl.json"
+ nl: "translations/nl.json",
+ fr: "translations/fr.json"
};
},