diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fec8cfa..1f92538 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,3 +41,6 @@ jobs: run: flake8 - name: Check formatting run: black . --check + - name: Check if cog needs to be run + run: | + cog --check README.md docs/*.rst diff --git a/docs/cli.rst b/docs/cli.rst index e9d2218..497e00e 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -176,7 +176,41 @@ You can use the ``--fmt`` option to specify different table formats, for example 2 2 Pancakes ==== ===== ======== -For a full list of table format options, run ``sqlite-utils query --help``. +Available ``--fmt`` options are: + +.. [[[cog + import tabulate + cog.out("\n" + "\n".join('- ``{}``'.format(t) for t in tabulate.tabulate_formats) + "\n\n") +.. ]]] + +- ``fancy_grid`` +- ``fancy_outline`` +- ``github`` +- ``grid`` +- ``html`` +- ``jira`` +- ``latex`` +- ``latex_booktabs`` +- ``latex_longtable`` +- ``latex_raw`` +- ``mediawiki`` +- ``moinmoin`` +- ``orgtbl`` +- ``pipe`` +- ``plain`` +- ``presto`` +- ``pretty`` +- ``psql`` +- ``rst`` +- ``simple`` +- ``textile`` +- ``tsv`` +- ``unsafehtml`` +- ``youtrack`` + +.. [[[end]]] + +This list can also be found by running ``sqlite-utils query --help``. .. _cli_query_raw: diff --git a/docs/contributing.rst b/docs/contributing.rst index ec1a4a7..c2d20ba 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -44,6 +44,10 @@ Then run ``make livehtml`` from the ``docs/`` directory to start a server on por cd docs make livehtml +The `cog `__ tool is used to maintain portions of the documentation. You can run it like so:: + + cog -r docs/*.rst + .. _contributing_linting: Linting and formatting diff --git a/setup.py b/setup.py index 1c05f3e..901725d 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup( "python-dateutil", ], extras_require={ - "test": ["pytest", "black", "hypothesis"], + "test": ["pytest", "black", "hypothesis", "cogapp"], "docs": ["sphinx_rtd_theme", "sphinx-autobuild", "codespell"], "mypy": [ "mypy",