mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user