Skip to content

refs #93 documentation for sphinx-intl comman-line options #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
6 changes: 5 additions & 1 deletion doc/refs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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_<UPPER_LONG_NAME> . Dashes (-) have to be replaced with
format ``SPHINXINTL_<UPPER_LONG_NAME>``. Dashes (-) have to be replaced with
underscores (_).

For example, to set the languages::
Expand Down
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx
sphinx_rtd_theme
sphinx-click
14 changes: 0 additions & 14 deletions sphinx_intl/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_<UPPER_LONG_NAME> . 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:
Expand Down