LukeSkywalker92 / TeleFrame

TeleFrame - a digital picture frame for telegram
MIT License
93 stars 28 forks source link

Improve install_raspberry.sh #150

Closed thoschneider closed 3 years ago

thoschneider commented 3 years ago

copy config.example.json to config.json and insert token

as proposed in issue #149

LukeSkywalker92 commented 3 years ago

Thank you :+1:

gegu commented 3 years ago

Sorry, but this merge was not optimal.

Since a long time the config.example.json is used as a guide how to specify the parameters. Values that match the default values in defaultConfig.js are removed when saving the config from TeleFrame.

We should remove the note about copying the config.example.json.

I think the merge should be reverted. We should also follow the contributing guidelines, the merge was only added to the master branch.

LukeSkywalker92 commented 3 years ago

Sorry guys, my mistake...

LukeSkywalker92 commented 3 years ago

Can you revert it? I don't have access to a computer at the moment :)

gegu commented 3 years ago

I can do that, but also not immediately, I am currently quite busy.

LukeSkywalker92 commented 3 years ago

Ok then let's see who is faster :)

gegu commented 3 years ago

😏

thoschneider commented 3 years ago

Just to ensure my understanding: copying config.example.json to config.json is not necessary for default functionality? Teleframe uses default values and I am fine when only my personal token is stored in config.json? Then of course the merge can be reverted. But then again the note to copy config.example.json to config.json should be removed or clarified.

gegu commented 3 years ago

yes 👍

thoschneider commented 3 years ago

First thanks a lot for your effort and all the work you put into TeleFrame!

I work with younger students (14 y.o.) and we build TeleFrames as a nice project to get started with Raspberry Pi. You stated that the purpose of the file config.example.json was a guide how to specify the parameters. My students and I consider specifying parameters this way really unhandy! For example: we want to set a whitelist or set playVideoAudio, then we have to look in config.example.json how the parameter is written, remember correctly or copy and go back and forth between config.example.json and config.json several times. This is very impractical. From a "consumer's point of view" it would be more convenient to have ONE single config-file where default values for all parameters are set and can be seen and changed.

This was the idea behind my pull request. I guess there is a good reason why you prefer the current procedure. Maybe you could explain the background why copying config.example.json to config.json is undesirable. Would it do any harm? In my opinion getting rid of config.example.json would simplify a lot.

I wasn't aware of the file defaultConfig.js . All parameters are explained nicely there! Is there something that could be said against editing that file directly to specify parameters? Or is this a bad idea? Why are there two places where parameters can be set? (config.json and defaultConfig.js)

Thanks for your time! I am just trying to make this great project even better and more convenient for my students.

thoschneider commented 3 years ago

I found the discussion #66 which throws some light on the evolution of all those config-files. I didn't consider the problem of updating. Nevertheless the current configuration workflow leaves me unsatisfied. Probably I suggest my students to just copy the whole config.example.json file to config.json paying attention not to loose the botToken entry. Thanks to all contributors who put a lot of thoughts into this project!