Add Requirements to rst template, ansible-doc

tweak position & look of Requirements in rst
tweak APT's notes as per anhj's wish
This commit is contained in:
Jan-Piet Mens
2013-05-11 16:31:47 +02:00
parent 4ead6ee4fc
commit eeb80c695f
3 changed files with 23 additions and 2 deletions

View File

@@ -86,6 +86,11 @@ def print_man(doc):
subsequent_indent=opt_indent)
if 'requirements' in doc and len(doc['requirements']) > 0:
req = ", ".join(doc['requirements'])
print "Requirements:%s\n" % textwrap.fill(tty_ify(req), initial_indent=" ",
subsequent_indent=opt_indent)
if 'examples' in doc and len(doc['examples']) > 0:
print "Example%s:\n" % ('' if len(doc['examples']) < 2 else 's')
for ex in doc['examples']:
@@ -94,6 +99,7 @@ def print_man(doc):
if 'plainexamples' in doc and doc['plainexamples'] is not None:
print doc['plainexamples']
def print_snippet(doc):
desc = tty_ify("".join(doc['short_description']))