Skip to main content

A Sphinx extension to include or exclude sections based on a filter configuration.

Project description

Sphinx Filter Extension

This is an extension to filter the content of a Sphinx documentation to generate documentation for different audiences from the same source files. The directives work on the section in which they are placed. For example, you can exclude a section while including a subsection. Please see test/test_source and test/test_passed for examples.

The modes are

  • exclude Default: everything is included in the document; you have to exclude content that you don't want to publish with directives.

  • include Default: nothing in your document will be included in the output document unless you include it.

The directives are

  • filter-exclude Exclude the section in which the directive is placed.

  • filter-exclude-content-only Exclude only the paragraphs, etc., that belong to this section; keep the heading of the section and keep its subsections.

  • filter-include Include the section in which the directive is placed.

  • filter-include-heading-only Only include the heading of the section and include its subsections, but don't include content that directly belongs to the section.

  • filter-valid-tags If you place this directive in the document (it makes sense to do that at the beginning to make other editors aware of it), tags that are not in the argument list of this directive will throw an exception.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_filter-0.2.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_filter-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_filter-0.2.0.tar.gz.

File metadata

  • Download URL: sphinx_filter-0.2.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sphinx_filter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5c07cf5875f5695cc5b327253ee489df24b847c05bd4600fc7243f4955711be6
MD5 218564544fbab9af69358284679ad3f2
BLAKE2b-256 07d6e5e116ab1d51e48711a9f7869f7ebf040e1e9f23717983442aa62fc2b53d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filter-0.2.0.tar.gz:

Publisher: release.yml on fs570714/sphinx-filter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_filter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sphinx_filter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sphinx_filter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 089a2d5daaccbfbf7966ebfcd6bfd3dc54033a90b5e42bce5033fc90150e3f93
MD5 8388f9360c14794bcba2b43c915ddca8
BLAKE2b-256 c154c9e7f450c83bb436472009bba1ce57000eb3d4dbb3410a959d92a003072d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filter-0.2.0-py3-none-any.whl:

Publisher: release.yml on fs570714/sphinx-filter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page