Read the statement by Michael Teeuw here.
Compliments module external file
-
@sdetweil Thanks, that’s very helpful. I imagine I can simply edit that compliments.js file, since I can always download another one if I want to return to default.
Alternatively, I could copy/paste a second set of those lines, edit them, and “no comment” the defaults. (I think that’s the correct term.) However, that would add/leave in unnecessary lines of code, which strikes me as inefficient.
-
@cheapdad i don’t understand
in config.js
{ module:"compliments", position:".....", config: { compliments: { anytime: ["Hey there sexy!"], morning: ["Good morning, handsome!", "Enjoy your day!", "How was your sleep?"], afternoon: ["Hello, beauty!", "You look sexy!", "Looking good today!"], evening: ["Wow, you look hot!", "You look nice!", "Hi, sexy!"], "....-01-01": ["Happy new year!"] }, } }
edit away
never touch the source file…
this is the MM model,
what ever is in a modules defaults:{} section
can be overridden in config.js
usually that is all in the module README.md file as part of the instructions -
@sdetweil I’m not logged into my pi ATM so I can’t post code, but that’s not what’s in my config.js. My config.js has only two lines for “compliments” - that it exists and position.
This is not my actual file, but it looks essentially like this:
{ module: "compliments", position: "lower_third", }
In having this conversation, it looks like I have to add the config header and lines to do what I want and then edit that.
-
@cheapdad right…
if you DON’T add things to config.js then the DEFAULTS apply
(whatever is in the module) -
@cheapdad read the links in my signature below