Previously, the default configuration file was only provided in a form
that was not included in distributions. This could potentially
frustrate users by making it difficult to find a configuration file
example. To remedy this, I moved it to be a package resource, imported
pkg_resources (setuptools is now a dependancy!), and made Kaylee load
both the default and the local configuration files, with the local of
course overriding the default.
After listening to HPR 1284 today, I realized that it's important to
keep configuration of what Kaylee *does* separate from other
configuration. Specifically, once TTS integration is done, voice
configuration will need to be separate from configuration of actions,
because it's common to have several computers with the same actions but
different voices. Therefore, I've moved all configuration about plugins
into a new file called plugins.json.
Previously, the order of elements in dicts in the configuration file was
not retained. The most notable consequence of this is that plugins
would be loaded in an arbitrary order, which may have led to unexpected
or inconsistent results. Now order is retained, so plugins will be
loaded in the order specified, and all is well in the world.
Since Kaylee now supports Python plugins that can do arbitrary things
with spoken words, the pass_words option for shell commands seems
somewhat less necessary than before. I never liked it in the first
place, because it was all-or-nothing: there was no non-hackish way to
pass the spoken words to only specific commands. If I ever see a
compelling reason for this feature to come back, it may be
re-implemented in the form of a second shell plugin that passes words to
its commands.
Commands aren't stored in a special file anymore, and Kaylee never tries
to look at that file. Therefore, there's no need for the Config object
to keep that file's path, and so the path has been removed.
Added some blank lines and wrapped some long lines to be closer to PEP 8
compliance.
Improved docstrings in NumberParser class. Added docstrings for
undocumented code and removed a TODO message that no longer applies.