51
52
53
54
55
56
57
58
59
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
+
+
+
+
+
+
+
|
# config:
# { arg: -D, name: debug, type: bool, description: enable debugging }
# { arg: -e, name: enable[], type: str*, description: add plugin }
It's basically just the extra <kbd>arg:</kbd> field which discerns such entries from standard options. And the <kbd>type:</kbd> may carry an optional quantifier (mapped to argparses' nargs= flag). Or the <kbd>name:</kbd> can indicate a list property with `[]` attached (maps to argparses' append instead of store). Not every argparse peculiarity is provided for though. And using a docopt section would probably be a better option anyway.
### Plugin list
The purpose of this scheme is feeding the plugin management in the settings window of course:
<img src="raw/st2-plugins.png?name=946c0e32c868a22facd7498250451723a50ab00a" style="margin:10pt">
And this may now even become a Python package of its own, [http://pypi.python.org/pypi/pluginconf/](http://pypi.python.org/pypi/pluginconf/). Not quite
|