e190302018
\<foo\> will often be displayed like \<foo>, for example by mkdocs. I've tested a number of markdown renderers and they render html escape sequences fine.
27 lines
727 B
Python
27 lines
727 B
Python
import json
|
|
import sys
|
|
|
|
options = json.load(sys.stdin)
|
|
for (name, value) in options.items():
|
|
print('##', name.replace('<', '<').replace('>', '>'))
|
|
print(value['description'])
|
|
print()
|
|
if 'type' in value:
|
|
print('*_Type_*:')
|
|
print(value['type'])
|
|
print()
|
|
print()
|
|
if 'default' in value:
|
|
print('*_Default_*')
|
|
print('```')
|
|
print(json.dumps(value['default'], ensure_ascii=False, separators=(',', ':')))
|
|
print('```')
|
|
print()
|
|
print()
|
|
if 'example' in value:
|
|
print('*_Example_*')
|
|
print('```')
|
|
print(json.dumps(value['example'], ensure_ascii=False, separators=(',', ':')))
|
|
print('```')
|
|
print()
|
|
print()
|