It is used to extract the specified tabs content from the RST (reStructuredText) document.
Project description
sphinx_tabs_selector
This plugin is created based on the sphinx_tabs plugin and supports all formats supported by sphinx_tabs v3.4.7.
Features
- Supports all formats supported by
sphinx_tabswith v3.4.7. - Supports showing tabs in switching mode or flat mode.
- Supports Unix glob pattern for
tabs_includeandtabs_excludeconfiguration. You can use Unix glob pattern to select multiple tabs. For example:tabs_include = ["tab1_*", "tab2_*", "tab3_*"]will select all tabs that start withtab1_,tab2_,tab3_.tabs_exclude = ["tab4_*", "tab5_*", "tab6_*"]to exclude all tabs that start withtab4_,tab5_,tab6_.
- When
tabs_flatis set toTrue, and builder islatex, the tabs will be displayed in flat mode, and pdf will show the tab with blue,bold tab name and the tab contents will be surrounded by a box. The non-nested tabs are displayed very well. But the nested tabs are displayed not very well.
Installation
pip install sphinx-tabs-selector
Usage
Add the following configuration to conf.py:
extensions = [
...
'sphinx_tabs_selector.selector',
...
]
# tabs_include is used to configure the tabs to be selected. Support Unix glob pattern.
# The configuration item is a list. Each element in the list is a string, which is the name of the tab to be selected.
# If the tab is nested, you need to write down all the names of the tabs in the nesting path.
tabs_include = ["tab1_name", "tab2_name", "tab3_*"]
# tabs_exclude is used to configure the tabs to be skipped. Support Unix glob pattern.
# The configuration item is a list. Each element in the list is a string, which is the name of the tab to be skipped.
tabs_exclude = ["tab4_name", "tab5_name", "tab6_*"]
# default is False. If True, the tabs will be displayed in flat mode. Otherwise, the tabs will be displayed in switching mode.
tabs_flat = True
For the way of writing tabs in RST files, you can refer to the documentation of the sphinx_tabs plugin. Thanks for the author of the sphinx_tabs plugin.
Notes
- If you want to use this plugin. You must add the
tabs_includeortabs_excludeconfiguration toconf.py; Otherwise, the plugin will not take effect. Therefore, you can use thetabs_includeortabs_excludeconfiguration to control the activation of the plugin.- If any of the
tabs_includeortabs_excludeconfiguration is added, the plugin will be activated. - If either of the
tabs_includeortabs_excludeconfiguration is not added, the plugin will not be activated. - If only
tabs_includeis added, the plugin will only select the tabs in thetabs_includeconfiguration. - If only
tabs_excludeis added, the plugin will select all tabs except the tabs in thetabs_excludeconfiguration. - If both
tabs_includeandtabs_excludeare added, the plugin will select the tabs in thetabs_includeconfiguration, and exclude the tabs in thetabs_excludeconfiguration. But excluding takes precedence over selecting.
- If any of the
- You need add the
tabs_flatconfiguration toconf.pyto control the display mode of the tabs.- If the
tabs_flatconfiguration is not added, the tabs will be displayed in switching mode. - If the
tabs_flatconfiguration is added and set toTrue, the tabs will be displayed in flat mode. - If the
tabs_flatconfiguration is added and set toFalse, the tabs will be displayed in switching mode.
- If the
- If both the
sphinx_tabsplugin and thesphinx_tabs_selectorplugin are added to theextensionsinconf.py, for thesphinx_tabs_selectorplugin to work, it must be added aftersphinx_tabs. - The
sphinx_tabs_selectorplugin can be used independently even if thesphinx_tabsplugin is not added toconf.py. - If only set the
sphinx_tabs_selectorplugin inconf.pyand not set thesphinx_tabsplugin, andtabs_flatis set toFalseor not set, and not set thetabs_includeortabs_excludeconfiguration, the plugin will work as thesphinx_tabsplugin with v3.4.7.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_tabs_selector-1.0.9.tar.gz.
File metadata
- Download URL: sphinx_tabs_selector-1.0.9.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b719a9e2355536adf825620576f86d1bb2b13d0e636eab1c5538876426f882d
|
|
| MD5 |
1e4805eb55799dbf85b4e734b452cb25
|
|
| BLAKE2b-256 |
5e65cd250a300ace9d05baafff2145484168b8ff45e487a276051afc747b21e3
|
Provenance
The following attestation bundles were made for sphinx_tabs_selector-1.0.9.tar.gz:
Publisher:
python-publish.yml on TerraJuly/sphinx_tabs_selector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_tabs_selector-1.0.9.tar.gz -
Subject digest:
9b719a9e2355536adf825620576f86d1bb2b13d0e636eab1c5538876426f882d - Sigstore transparency entry: 686034481
- Sigstore integration time:
-
Permalink:
TerraJuly/sphinx_tabs_selector@9446c7c9270482f609974de31ce1b963646eb8b6 -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/TerraJuly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9446c7c9270482f609974de31ce1b963646eb8b6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sphinx_tabs_selector-1.0.9-py3-none-any.whl.
File metadata
- Download URL: sphinx_tabs_selector-1.0.9-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39213329f062cfc8949946ff7411d7a5889abafa50bfc5ed1787be25758beed7
|
|
| MD5 |
0f90fdeb888f245f9047628e73cdb605
|
|
| BLAKE2b-256 |
728683599708881482f23206a73c87f45e1b053a28fa3952ee5dd28fc883eca2
|
Provenance
The following attestation bundles were made for sphinx_tabs_selector-1.0.9-py3-none-any.whl:
Publisher:
python-publish.yml on TerraJuly/sphinx_tabs_selector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_tabs_selector-1.0.9-py3-none-any.whl -
Subject digest:
39213329f062cfc8949946ff7411d7a5889abafa50bfc5ed1787be25758beed7 - Sigstore transparency entry: 686034483
- Sigstore integration time:
-
Permalink:
TerraJuly/sphinx_tabs_selector@9446c7c9270482f609974de31ce1b963646eb8b6 -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/TerraJuly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9446c7c9270482f609974de31ce1b963646eb8b6 -
Trigger Event:
release
-
Statement type: