dita-cleanup
dita-cleanup is a command-line utility that allows you to clean up DITA topics after conversion from AsciiDoc.
In combination with asciidoctor-dita-vale, asciidoctor-dita-topic, and dita-convert, this project can be used to rapidly convert AsciiDoc content to DITA:
-
Identify incompatible markup in the AsciiDoc source file:
vale source_file.adoc -
Convert the AsciiDoc file to a generic DITA topic:
dita-topic source_file.adoc -
Convert the generic DITA topic to a specialized DITA concept, reference, or task:
dita-convert -g source_file.dita -o output_file.dita -
Clean up the resulting DITA file:
dita-cleanup -i -D ../images -X . output_file.dita
Installation
Install the dita-cleanup Python package:
python3 -m pip install --upgrade dita-cleanup
Usage
-
Remove unresolved AsciiDoc attribute references from element IDs:
dita-cleanup --prune-ids *.dita -
Replace unresolved AsciiDoc attribute references with reusable content references:
dita-cleanup --conref-target 'topic.dita#topic-id' *.dita -
List any unresoved AsciiDoc attribute references:
dita-cleanup --verbose *.dita -
Update all image paths:
dita-cleanup --images-dir ../images/ *.dita -
Update invlid cross references based on DITA files present in the supplied directory:
dita-cleanup --xref-dir . *.dita -
Print the updates to standard output instead of overwriting the supplied files:
dita-cleanup --prune-ids --output - *.dita -
For a complete list of available command-line options and their short versions, run
dita-cleanupwith the--helpoption:dita-cleanup --help
Copyright
Copyright © 2025, 2026 Jaromir Hradilek
This program is free software, released under the terms of the MIT license. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Metadata
Release files for dita-cleanup 0.9.13
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 |
|---|---|---|---|---|
| dita_cleanup-0.9.13.tar.gz | 12.9 kB | Without provenance | Details for dita_cleanup-0.9.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dita_cleanup-0.9.13-py3-none-any.whl | Python 3 | none | any | Details for dita_cleanup-0.9.13-py3-none-any.whl |
Total release size: 24.9 kB
Release files / dita_cleanup-0.9.13.tar.gz
| Download URL | dita_cleanup-0.9.13.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3dc62c7636acccd22311cb315e41aee71d785736c184e91d5eb510c4cc4a4d1c
|
|
BLAKE2b-256 checksum How to use checksums |
4b5eb567d2d09365d564f82675b8c132426abc98b854cb2343a34bea443a7428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.7
|
Release files / dita_cleanup-0.9.13-py3-none-any.whl
| Download URL | dita_cleanup-0.9.13-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5adcee535f4d289c6e369e9d8c6c1c8318d1f270f19604c135e30e756922bd9b
|
|
BLAKE2b-256 checksum How to use checksums |
afad2318395e33f79b1b37bff9d29ad820643860f81488d90372bf26e5fe3800
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.7
|
Security for dita-cleanup 0.9.13
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.