HostGrady/simplify-dmscripts: Begin resolving (most) issues in _dm-helper.sh
This merge request makes a few basic changes to _dm-helper.sh and some related files:
dm-template: Added 2 new templates:
- simple-experimental: like simple but with new experimental features from _dm-helper.sh
- contrib-experimental: like contrib but with new experimental features from _dm-helper.sh
once the features in these templates are more thoroughly tested they will become the default and the old ones will be removed.
dm-youtube: Recieved a new function:
- parse_rss is dead in favour of parse_youtube_feed
- xmlgetnext was kept in _dm-helper.sh because it is simple and generally useful if we ever have a need to parse html or other tag based formats
- xmlgetnext internals were changed slightly
config: Now has 2 additional configuration variables:
- DM_SHUTUP: once configured, the experimental diff checker will stop sending notify notifications
- DM_CONFIG_DIFF_LOGFILE: presented as an alternative to users who want DMSCRIPTS to shutup, any log messages get sent to that file
- the default is /dev/stderr, if you want to shut it up (because you already have the notify messages chirping at you) send it to /dev/null.
_dm-helper.sh: Added 2 new functions:
- source_dmscripts_configs: a simple function which sources each configuration file 1 at a time. if the git repository config is found it uses that and then immediately exits
- configs_are_different: returns 0 or true if the configs are different, 1 or false if the configs are the same
Thus far I have done some basic tests and after debugging the results seem to be positive. The only real negative is that by default a notification daemon is now required however that can easily be resolved simply by setting DM_SHUTUP to a nonempty value.
Feedback and further testing is still required which is why they are labeled experimental. I would be interested in seeing a proper script be written with the new contrib-experimental template format and the associated configuration changes. So any script ideas (or of course, if you want to do it yourself) would be greatly appreciated.