This PR adds a module whitelist in the environment variable $STAMPY_MODULES.
move module-finding code to config.py
add getenv_unique_list() function that checks for duplicates before returning
only load modules in $STAMPY_MODULES, log the skipped modules
add cases allowing $YOUTUBE_API_KEY to be empty (since this was needed to make Stampy function at all without it, if this should be separated let me know)
I decided to make a whitelist rather than a blacklist, since it means less surprises down the road for server admins updating their local Stampys. To get the original default-all behavior, set the variable to "ALL"
I've really only been testing with the paper search module, but I plan to go down the list of other modules and see what can be re-enabled. As I do so I may have more small changes to make in other modules.
This PR adds a module whitelist in the environment variable
$STAMPY_MODULES
.getenv_unique_list()
function that checks for duplicates before returning$STAMPY_MODULES
, log the skipped modules$YOUTUBE_API_KEY
to be empty (since this was needed to make Stampy function at all without it, if this should be separated let me know)I decided to make a whitelist rather than a blacklist, since it means less surprises down the road for server admins updating their local Stampys. To get the original default-all behavior, set the variable to "ALL"
I've really only been testing with the paper search module, but I plan to go down the list of other modules and see what can be re-enabled. As I do so I may have more small changes to make in other modules.