diff --git a/client/brain.py b/client/brain.py index fc4b3b8..442854d 100644 --- a/client/brain.py +++ b/client/brain.py @@ -34,7 +34,11 @@ def get_plugins(cls): """ logger = logging.getLogger(__name__) - locations = [dingdangpath.PLUGIN_PATH, dingdangpath.CONTRIB_PATH] + locations = [ + dingdangpath.PLUGIN_PATH, + dingdangpath.CONTRIB_PATH, + dingdangpath.CUSTOM_PATH + ] logger.debug("Looking for plugins in: %s", ', '.join(["'%s'" % location for location in locations])) plugins = [] diff --git a/client/dingdangpath.py b/client/dingdangpath.py index c127d51..1e39fd0 100755 --- a/client/dingdangpath.py +++ b/client/dingdangpath.py @@ -10,10 +10,15 @@ TEMP_PATH = os.path.join(APP_PATH, "temp") PLUGIN_PATH = os.path.join(LIB_PATH, "plugins") -CONFIG_PATH = os.path.expanduser(os.getenv - ('DINGDANG_CONFIG', '~/.dingdang')) -CONTRIB_PATH = os.path.expanduser(os.getenv - ('DINGDANG_CONFIG', '~/.dingdang/contrib')) +CONFIG_PATH = os.path.expanduser( + os.getenv('DINGDANG_CONFIG', '~/.dingdang') +) +CONTRIB_PATH = os.path.expanduser( + os.getenv('DINGDANG_CONFIG', '~/.dingdang/contrib') +) +CUSTOM_PATH = os.path.expanduser( + os.getenv('DINGDANG_CONFIG', '~/.dingdang/custom') +) def config(*fname):