From 008b183f28fa41802ba262f433e1916adc0fabde Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 17 Apr 2021 17:58:47 +0200 Subject: [PATCH] Make the plugin list a definition-list instead of the raw toctree to show a short description of each plugin, instead of just the long list of names. --- develop/architecture.rst | 2 +- generate_plugin_doc.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/develop/architecture.rst b/develop/architecture.rst index aeb3a24..3e10bc3 100644 --- a/develop/architecture.rst +++ b/develop/architecture.rst @@ -19,7 +19,7 @@ You should also be somewhat familiar with the .. note:: This document is a work in progress and is still incomplete. - As usually, feel free to ask any questions in #limnoria @ freenode. + As usual, feel free to ask any questions in #limnoria @ freenode. Main loop and drivers ===================== diff --git a/generate_plugin_doc.py b/generate_plugin_doc.py index a3a37b6..4cef831 100755 --- a/generate_plugin_doc.py +++ b/generate_plugin_doc.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import importlib import os import pkgutil import subprocess @@ -40,8 +41,25 @@ with open(os.path.join(OUTPUT_DIR, "index.rst"), "w") as fd: .. _Limnoria.net's plugin page: https://limnoria.net/plugins.xhtml + """ + ) + ) + + for plugin in plugins: + if plugin == "Alias": + # Deprecated + continue + plugin_module = importlib.import_module(f"supybot.plugins.{plugin}") + fd.write(f":doc:`{plugin} <{plugin}>`\n") + fd.write(textwrap.indent(plugin_module.__doc__, " ")) + fd.write("\n") + + fd.write( + textwrap.dedent( + """ .. toctree:: :maxdepth: 1 + :hidden: """ )