Files
herolib/research/openrpc/convert.py
despiegk cb125e8114 ...
Co-authored-by: Omdanii <mahmmoud.hassanein@gmail.com>
2025-09-07 15:15:41 +04:00

17 lines
267 B
Python

import json
from jinja2 import Template
# load OpenRPC spec
with open("openrpc.json") as f:
spec = json.load(f)
# load template
with open("openrpc_to_md.j2") as f:
tmpl = Template(f.read())
# render markdown
output = tmpl.render(spec=spec)
print(output)