mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Starting to refactor module formatter script.
Rename "jpfunc" to something more explanatory
This commit is contained in:
parent
c44b876c82
commit
10009b0d3f
8 changed files with 24 additions and 24 deletions
|
@ -264,25 +264,25 @@ def main():
|
|||
env.globals['xline'] = rst_xline
|
||||
|
||||
if options.type == 'latex':
|
||||
env.filters['jpfunc'] = latex_ify
|
||||
env.filters['convert_symbols_to_format'] = latex_ify
|
||||
template = env.get_template('latex.j2')
|
||||
outputname = "%s.tex"
|
||||
includecmt = ""
|
||||
includefmt = "%s\n"
|
||||
if options.type == 'html':
|
||||
env.filters['jpfunc'] = html_ify
|
||||
env.filters['convert_symbols_to_format'] = html_ify
|
||||
template = env.get_template('html.j2')
|
||||
outputname = "%s.html"
|
||||
includecmt = ""
|
||||
includefmt = ""
|
||||
if options.type == 'man':
|
||||
env.filters['jpfunc'] = man_ify
|
||||
env.filters['convert_symbols_to_format'] = man_ify
|
||||
template = env.get_template('man.j2')
|
||||
outputname = "ansible.%s.3"
|
||||
includecmt = ""
|
||||
includefmt = ""
|
||||
if options.type == 'rst':
|
||||
env.filters['jpfunc'] = rst_ify
|
||||
env.filters['convert_symbols_to_format'] = rst_ify
|
||||
env.filters['html_ify'] = html_ify
|
||||
env.filters['fmt'] = rst_fmt
|
||||
env.filters['xline'] = rst_xline
|
||||
|
@ -291,16 +291,16 @@ def main():
|
|||
includecmt = ".. Generated by module_formatter\n"
|
||||
includefmt = ".. include:: modules/%s.rst\n"
|
||||
if options.type == 'json':
|
||||
env.filters['jpfunc'] = json_ify
|
||||
env.filters['convert_symbols_to_format'] = json_ify
|
||||
outputname = "%s.json"
|
||||
includecmt = ""
|
||||
includefmt = ""
|
||||
if options.type == 'js':
|
||||
env.filters['jpfunc'] = js_ify
|
||||
env.filters['convert_symbols_to_format'] = js_ify
|
||||
template = env.get_template('js.j2')
|
||||
outputname = "%s.js"
|
||||
if options.type == 'markdown':
|
||||
env.filters['jpfunc'] = markdown_ify
|
||||
env.filters['convert_symbols_to_format'] = markdown_ify
|
||||
env.filters['html_ify'] = html_ify
|
||||
template = env.get_template('markdown.j2')
|
||||
outputname = "%s.md"
|
||||
|
@ -320,7 +320,8 @@ def main():
|
|||
category_names.sort()
|
||||
|
||||
for category in category_names:
|
||||
module_map = categories[category]
|
||||
|
||||
module_map = categories[category]
|
||||
|
||||
category = category.replace("_"," ")
|
||||
category = category.title()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue