From 39e1804d56895cfb9e0e5c1dec1c1c28d1fb9d3c Mon Sep 17 00:00:00 2001 From: Takayuki SHIMIZUKAWA Date: Sun, 17 Sep 2023 09:10:12 +0000 Subject: [PATCH] refs #93 documentation for sphinx-intl comman-line options --- doc/conf.py | 3 ++- doc/refs.rst | 6 +++++- doc/requirements.txt | 1 + sphinx_intl/commands.py | 14 -------------- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 386b99d..74d214d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -13,11 +13,12 @@ # -- General configuration --------------------------------------------------- extensions = [ + "sphinx_click", ] source_suffix = '.rst' master_doc = 'index' -language = None +language = 'en' exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] pygments_style = 'sphinx' diff --git a/doc/refs.rst b/doc/refs.rst index 379bba3..db16c89 100644 --- a/doc/refs.rst +++ b/doc/refs.rst @@ -10,12 +10,16 @@ Commands Type `sphinx-intl` without arguments, options to show command help. +.. click:: sphinx_intl.commands:main + :prog: sphinx-intl + :nested: full + Environment Variables ===================== All command-line options can be set with environment variables using the -format SPHINXINTL_ . Dashes (-) have to be replaced with +format ``SPHINXINTL_``. Dashes (-) have to be replaced with underscores (_). For example, to set the languages:: diff --git a/doc/requirements.txt b/doc/requirements.txt index 8213302..e9e4245 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,2 +1,3 @@ sphinx sphinx_rtd_theme +sphinx-click diff --git a/sphinx_intl/commands.py b/sphinx_intl/commands.py index b4fdc53..0753bee 100644 --- a/sphinx_intl/commands.py +++ b/sphinx_intl/commands.py @@ -162,20 +162,6 @@ def convert(self, value, param, ctx): @option_tag @click.pass_context def main(ctx, config, tag): - """ - Environment Variables: - All command-line options can be set with environment variables using the - format SPHINXINTL_ . Dashes (-) have to replaced with - underscores (_). - - For example, to set the languages: - - export SPHINXINTL_LANGUAGE=de,ja - - This is the same as passing the option to txutil directly: - - sphinx-intl update --language=de --language=ja - """ # load conf.py ctx.config = config if ctx.config is None: