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.
This commit is contained in:
Valentin Lorentz 2021-04-17 17:58:47 +02:00
parent ab99fac88d
commit 008b183f28
2 changed files with 19 additions and 1 deletions

View File

@ -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
=====================

View File

@ -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:
"""
)