Dust
Dust is a Sphinx extension that emits warnings when a document hasn’t been proofread in a while.
It prevents your doc from accumulating dust!
Setting up
Install dust from pip:
$ pip install sphinx-dust
Then add it as an extension to your project’s conf.py:
# conf.py
extensions = [
'sphinx_dust',
]
Using dust
Dust introduces a new directive: reviewer-meta.
It takes two arguments:
written-on, the date the document was redacted; and,
proofread-on, the date the document was proofread.
dust-days-limit, overrides the global dust_days_limit to customize the day the document can live without review.
Both dates must respect the yyyy-mm-dd format.
Here it is in context:
.. index.rst
Rubik's Cube Tutorial
---------------------
.. reviewer-meta::
:written-on: 1974-05-19
:proofread-on: 1974-06-20
:dust-days-limit: 25
This directive will be replaced by a note reading:
.. note::
Written on 19 May 1974, proofread on 20 June 1974
Running sphinx-build will output a warning if the number of days spanning between written-on and proofread-on is greater than dust_days_limit. In this case, with dust_days_limit = 30, Sphinx will emit a warning:
/path/to/your/doc/index.rst:2: WARNING: This document hasn't been proofread for 32 days
Using Sphinx’s -W option, warnings will be turned into errors, useful to make CI builds fail and be notified of outdated docs.
The warning and note content are exported using sphinx.locale so you can translate them in your language if you see fit.
Configuration
Various parameters can be tweaked to your convenience. You can alter any of them in your project’s conf.py file, they’re simple Python variables.
You can assign any value to these settings, however you should respect their typing, the extension could crash otherwise.
Here’s an exhaustive list of every parameter:
dust_days_limit (default: 30), the number of days a document can live since its last reviewing without emitting warnings,
dust_emit_warnings (default: True), controls whether the extension emits a warning when a document needs reviewing,
dust_include_output (default: True), controls whether to include an HTML output in the monitored documents,
dust_output_format (default: "Written on {written_on}, proofread on {proofread_on}"), the content of the HTML output, needs to include two format variables: written_on and proofread_on, which will get replaced by the result of strftime-formatting written-on and proofread-on values,
dust_datetime_format (default: "%d %B %Y"), the format datetimes (written-on and proofread-on values) take in HTML output; and,
dust_node_classes (default: ['note']), a list of Sphinx admonition classes to apply to the node used to generate HTML.
Metadata
Release files for sphinx-dust 1.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx_dust-1.2.5.tar.gz | 5.1 kB | Without provenance | Details for sphinx_dust-1.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_dust-1.2.5-py3-none-any.whl | Python 3 | none | any | Details for sphinx_dust-1.2.5-py3-none-any.whl |
Total release size: 10.5 kB
Release files / sphinx_dust-1.2.5.tar.gz
| Download URL | sphinx_dust-1.2.5.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48f670ad93065e3da4be54ff4df288b814c5ee39a039da5304c4a9c18967eb10
|
|
BLAKE2b-256 checksum How to use checksums |
b67ec2cdf3bc33d6b9cd69732fdbc2444ddba762b21f6a32520dc41f861c08e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Release files / sphinx_dust-1.2.5-py3-none-any.whl
| Download URL | sphinx_dust-1.2.5-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23cbb252284d0a196f9d68e217c22d776cc3ca1cc64d67eba8ff496a170c0800
|
|
BLAKE2b-256 checksum How to use checksums |
62bf0bcb487a9238c87fcad63eef09dfaa82ab78d052b8b70b44914212c18478
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Security for sphinx-dust 1.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.