|
@@ -9,7 +9,8 @@ class DiscoverPlugin(lodel_script.LodelScript):
|
9
|
9
|
|
10
|
10
|
@classmethod
|
11
|
11
|
def argparser_config(cls, parser):
|
12
|
|
- parser.add_argument('-d', '--directory',
|
|
12
|
+ #parser.add_argument('-d', '--directory',
|
|
13
|
+ parser.add_argument('PLUGIN_PATH',
|
13
|
14
|
help="Directory to walk through looking for lodel2 plugins",
|
14
|
15
|
nargs='+')
|
15
|
16
|
parser.add_argument('-l', '--list-only', default=False,
|
|
@@ -20,11 +21,11 @@ without modifying existing cache")
|
20
|
21
|
@classmethod
|
21
|
22
|
def run(cls, args):
|
22
|
23
|
from lodel.plugin.plugins import Plugin
|
23
|
|
- if args.directory is None or len(args.directory) == 0:
|
|
24
|
+ if args.PLUGIN_PATH is None or len(args.PLUGIN_PATH) == 0:
|
24
|
25
|
cls.help_exit("Specify a least one directory")
|
25
|
26
|
no_cache = args.list_only
|
26
|
|
- res = Plugin.discover(args.directory, no_cache)
|
27
|
|
- print("Found plugins in : %s" % ', '.join(args.directory))
|
|
27
|
+ res = Plugin.discover(args.PLUGIN_PATH, no_cache)
|
|
28
|
+ print("Found plugins in : %s" % ', '.join(args.PLUGIN_PATH))
|
28
|
29
|
for pname, pinfos in res['plugins'].items():
|
29
|
30
|
print("\t- %s(%s) in %s" % (
|
30
|
31
|
pname, pinfos['version'], pinfos['path']))
|