yunohost/doc/generate_resource_doc.py
2023-02-01 17:10:08 +00:00

11 lines
316 B
Python

from yunohost.utils.resources import AppResourceClassesByType
resources = sorted(AppResourceClassesByType.values(), key=lambda r: r.priority)
for klass in resources:
doc = klass.__doc__.replace("\n ", "\n")
print("")
print(f"## {klass.type.replace('_', ' ').title()}")
print("")
print(doc)