Skip to content

Commit 66e9d12

Browse files
authored
refs #93 documentation for sphinx-intl comman-line options (#94)
1 parent 2c2d06e commit 66e9d12

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
# -- General configuration ---------------------------------------------------
1414

1515
extensions = [
16+
"sphinx_click",
1617
]
1718

1819
source_suffix = '.rst'
1920
master_doc = 'index'
20-
language = None
21+
language = 'en'
2122
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
2223
pygments_style = 'sphinx'
2324

doc/refs.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ Commands
1010

1111
Type `sphinx-intl` without arguments, options to show command help.
1212

13+
.. click:: sphinx_intl.commands:main
14+
:prog: sphinx-intl
15+
:nested: full
16+
1317

1418
Environment Variables
1519
=====================
1620

1721
All command-line options can be set with environment variables using the
18-
format SPHINXINTL_<UPPER_LONG_NAME> . Dashes (-) have to be replaced with
22+
format ``SPHINXINTL_<UPPER_LONG_NAME>``. Dashes (-) have to be replaced with
1923
underscores (_).
2024

2125
For example, to set the languages::

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sphinx
22
sphinx_rtd_theme
3+
sphinx-click

sphinx_intl/commands.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,20 +162,6 @@ def convert(self, value, param, ctx):
162162
@option_tag
163163
@click.pass_context
164164
def main(ctx, config, tag):
165-
"""
166-
Environment Variables:
167-
All command-line options can be set with environment variables using the
168-
format SPHINXINTL_<UPPER_LONG_NAME> . Dashes (-) have to replaced with
169-
underscores (_).
170-
171-
For example, to set the languages:
172-
173-
export SPHINXINTL_LANGUAGE=de,ja
174-
175-
This is the same as passing the option to txutil directly:
176-
177-
sphinx-intl update --language=de --language=ja
178-
"""
179165
# load conf.py
180166
ctx.config = config
181167
if ctx.config is None:

0 commit comments

Comments
 (0)