[BACKEND] Custom autodocs
This commit is contained in:
parent
c0e2ded1ae
commit
d6840b05e0
1 changed files with 20 additions and 0 deletions
20
tools/docgen/test.py
Normal file
20
tools/docgen/test.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import inspect
|
||||
|
||||
from ytdl_sub.config.plugin.plugin_mapping import PluginMapping
|
||||
from ytdl_sub.config.validators.options import OptionsValidator
|
||||
|
||||
|
||||
def generate_docs(name: str, plugin_options: OptionsValidator):
|
||||
|
||||
docs = ""
|
||||
docs += f"{name}\n{len(name) * '-'}\n"
|
||||
|
||||
docs += inspect.cleandoc(plugin_options.__doc__)
|
||||
|
||||
print(docs)
|
||||
|
||||
|
||||
generate_docs(
|
||||
"output_directory_nfo_tags",
|
||||
PluginMapping._MAPPING["output_directory_nfo_tags"].plugin_options_type,
|
||||
)
|
||||
Loading…
Reference in a new issue