diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-09-16 14:13:03 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-09-16 14:13:03 +0000 |
commit | aee08a1bf2142c4cee59563db59db53d9454ece4 (patch) | |
tree | 9fd87a1accd9849b87b0e824b08c92363ecf9ead | |
parent | f0b2943aabb2e1c326b72988c70954428d033703 (diff) | |
download | msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar.gz msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar.bz2 msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar.xz msec-aee08a1bf2142c4cee59563db59db53d9454ece4.zip |
sorting man according to plugin
-rwxr-xr-x | src/msec/man.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/msec/man.py b/src/msec/man.py index d00838a..adffae6 100755 --- a/src/msec/man.py +++ b/src/msec/man.py @@ -268,8 +268,18 @@ msec = MSEC(log) print header -for variable in config.SETTINGS: - callback, params = config.SETTINGS[variable] +# sorting settings according to plugin +callbacks = [] +settings_rev = {} +for entry in config.SETTINGS.keys(): + callback, params = config.SETTINGS[entry] + callbacks.append(callback) + settings_rev[callback] = (entry, params) +callbacks.sort() + +# generating man in correct order +for callback in callbacks: + variable, params = settings_rev[callback] func = msec.get_action(callback) if func: print function_str % (callback, func.__doc__.strip(), variable, ", ".join(params)) |