summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-08-22 09:46:05 +0200
committerJan Safranek <jsafrane@redhat.com>2013-08-22 09:46:05 +0200
commit1046a4fd140be28bf9e8372aa060e86831e9ec01 (patch)
tree228416ebdde33bc901bd22ac64fba9502b47cef7 /tools
parent90410433ab5718f68b3714d27382425de2076e8b (diff)
downloadopenlmi-scripts-1046a4fd140be28bf9e8372aa060e86831e9ec01.tar.gz
openlmi-scripts-1046a4fd140be28bf9e8372aa060e86831e9ec01.tar.xz
openlmi-scripts-1046a4fd140be28bf9e8372aa060e86831e9ec01.zip
Documentation updates
and minor 're' speedup.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/help2rst41
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/help2rst b/tools/help2rst
index a72e196..452109a 100755
--- a/tools/help2rst
+++ b/tools/help2rst
@@ -33,6 +33,47 @@
Script to generate REstructured text from 'lmi help XYZ' output.
It's highly tailored to docopt help style and expect the help
to be formatted nicely.
+
+Requirements:
+
+- The help output must have following structure:
+
+ <description>
+ <another line of description>
+
+ Usage:
+ <all possible invocations of a cmd>
+
+ Commands:
+ <cmd name> <description>
+ <another line of description>
+
+ <another paragraph of description
+
+ Options:
+ <option name> <description>
+ <another line of description>
+
+ <another paragraph of description
+
+- The 'Options:' section is optional
+- For 'Options:' and 'Commands:'
+ - There must be *exactly* 4 spaces before <cmd name>
+ - There must be *at least* 5 spaces (8 recommended) before
+ <another line of description>
+ - Paragraphs are separated by one empty line
+ - Applies also to '*' lists.
+ - '*' lists must be indented accordingly:
+
+ <another line of description>
+
+ * List item 1.
+ Second line of list item description.
+
+ * List item 2.
+ Second line of list item description.
+
+ <another line of description>
"""
import sys