It adds command line arguments: --debug so we don't have to modify the config file (though we can still set debug there) and --config CONFIGFILE so we can set multiple alarm styles.
It merges the state of the Pi (whether or not this or that module is loaded, whether we are connected to the internet, whether DNS is working, etc cetera) and the local configuration into one class -- alarmEnv. The instance of this class in sound_the_alarm.py is called AlmEnv.
It adds config file section types ([content] -- all prior sections were of this type, [effect] -- music and light were moved from [main] to their own sections which are of this type, and [tts] -- trygoogle and tryivona were moved from [main] into their own sections of this type.)
It pulled some of the various API specifics into the config file to allow many interface changes to be corrected in the config file rather than in the code.
It abstract the behavior of the various sections into their own sections. e.g. trygoogle's code has been moved from sound_the_alarm.py to a trygoogle class defined in get_trygoogle.py
This is a major refactoring of the code.
--debug
so we don't have to modify the config file (though we can still set debug there) and--config CONFIGFILE
so we can set multiple alarm styles.alarmEnv
. The instance of this class insound_the_alarm.py
is calledAlmEnv
.[content]
-- all prior sections were of this type,[effect]
--music
andlight
were moved from[main]
to their own sections which are of this type, and[tts]
--trygoogle
andtryivona
were moved from[main]
into their own sections of this type.)trygoogle
's code has been moved fromsound_the_alarm.py
to atrygoogle
class defined inget_trygoogle.py
That and some housekeeping.