Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : openlmi-tools-lmiwbem
---------------------------------------------------------------
commit 118b6d8efedfc9704da778911c60505cd4dae639
Author: Peter Hatina <phatina(a)redhat.com>
Date: Tue May 27 13:08:04 2014 +0200
reorder API documentation links
---------------------------------------------------------------
doc/src/shell/generate_code.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/doc/src/shell/generate_code.py b/doc/src/shell/generate_code.py
index bb7aa24..1790b46 100755
--- a/doc/src/shell/generate_code.py
+++ b/doc/src/shell/generate_code.py
@@ -5,7 +5,12 @@ import sys
mod_path = os.path.abspath("../../../cli/lmi/shell/")
-filenames = os.listdir(mod_path)
+filt = lambda p: \
+ p.endswith(".py") and \
+ not p.startswith("_") and \
+ p != "LMIShellVersion.py"
+filenames = filter(filt, os.listdir(mod_path))
+filenames.sort()
if not os.path.exists("_code"):
os.mkdir("_code")
@@ -17,8 +22,6 @@ code_fout.write(
" :maxdepth: 2\n\n")
for filename in filenames:
- if not filename.endswith(".py") or filename.startswith("_"):
- continue
module = str(filename[:-3])
code_fout.write(" _code/code_%s\n" % module)
@@ -26,7 +29,8 @@ for filename in filenames:
code_module_fout = open("_code/code_"+module+".rst",
"w")
code_module_fout.write("%s Package\n" % module)
code_module_fout.write("=" * (len(module)+8) + "\n\n")
- code_module_fout.write(".. automodule:: lmi.shell.%s\n :members:\n" %
module)
+ code_module_fout.write(
+ ".. automodule:: lmi.shell.%s\n :members:\n" % module)
code_module_fout.close()
code_fout.close()