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.1.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.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_filter-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 8b4b320fafe8941984e5bb89693e144e7b1afab329b6d4083a23c1221b83aeba
MD5 6d230394c52581b86901b2a92bf83d21
BLAKE2b-256 9046376d3697c7f23380d046d57d4a3b376740dd7ac777fed53864cda2d4065b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filter-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: sphinx_filter-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8e187bf41332413b1a10e29d4247b2d43a7e521290d74acb4c8ff8d8caf61dd
MD5 aa2cd897e5010cb19786cde5c3926682
BLAKE2b-256 3e4cccf531a6ccf3840a704a8c59d1f1438eaa09a2a842c0ea98f22f8ed9b77a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_filter-0.1.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