Replace update-docs-help.py with cog, closes #1598

This commit is contained in:
Simon Willison 2022-01-13 16:47:53 -08:00
commit 3664ddd400
9 changed files with 28 additions and 189 deletions

View file

@ -26,6 +26,8 @@ This page lists the ``--help`` for every ``datasette`` CLI command.
cog.out("\n")
for command in commands:
title = "datasette " + " ".join(command)
ref = "_cli_help_" + ("_".join(command).replace("-", "_"))
cog.out(".. {}:\n\n".format(ref))
cog.out(title + "\n")
cog.out(("=" * len(title)) + "\n\n")
cog.out("::\n\n")
@ -35,6 +37,8 @@ This page lists the ``--help`` for every ``datasette`` CLI command.
cog.out("\n\n")
.. ]]]
.. _cli_help___help:
datasette --help
================
@ -61,6 +65,8 @@ datasette --help
uninstall Uninstall plugins and Python packages from the Datasette...
.. _cli_help_serve___help:
datasette serve --help
======================
@ -114,6 +120,8 @@ datasette serve --help
--help Show this message and exit.
.. _cli_help_serve___help_settings:
datasette serve --help-settings
===============================
@ -165,6 +173,8 @@ datasette serve --help-settings
.. _cli_help_plugins___help:
datasette plugins --help
========================
@ -180,6 +190,8 @@ datasette plugins --help
--help Show this message and exit.
.. _cli_help_publish___help:
datasette publish --help
========================
@ -198,6 +210,8 @@ datasette publish --help
heroku Publish databases to Datasette running on Heroku
.. _cli_help_publish_cloudrun___help:
datasette publish cloudrun --help
=================================
@ -242,6 +256,8 @@ datasette publish cloudrun --help
--help Show this message and exit.
.. _cli_help_publish_heroku___help:
datasette publish heroku --help
===============================
@ -281,6 +297,8 @@ datasette publish heroku --help
--help Show this message and exit.
.. _cli_help_package___help:
datasette package --help
========================
@ -317,6 +335,8 @@ datasette package --help
--help Show this message and exit.
.. _cli_help_inspect___help:
datasette inspect --help
========================
@ -335,6 +355,8 @@ datasette inspect --help
--help Show this message and exit.
.. _cli_help_install___help:
datasette install --help
========================
@ -349,6 +371,8 @@ datasette install --help
--help Show this message and exit.
.. _cli_help_uninstall___help:
datasette uninstall --help
==========================