Skip to main content

dartdoc-advanced

This project provides tools for cleaning, repairing, and packaging HTML documentation generated by Dartdoc. It removes unnecessary stub files, fixes broken or invalid links, normalizes class sidebar paths, and produces a clean ZIP archive ready for distribution or publishing.

The project includes:

  • cleaning pipeline that processes Dartdoc output

  • command-line interface for automation

  • `a simple GUI for non-technical users

a modular internal architecture suitable for further development and integration with Dart or Pub.dev

Features

  • Removes small or empty HTML “stub” files based on configurable size thresholds

  • Fixes duplicated folder prefixes inside class sidebars

  • Disables dead, invalid, or trivial links (for example javascript: URLs)

  • Normalizes links inside root index pages, library index pages, sidebars, and regular HTML pages

  • Packages the cleaned documentation into a single ZIP file

  • Includes a Tkinter GUI for easy use by non-technical users

  • Provides a modular Python codebase organized by responsibility

Project Structure

src/dartdoc_advanced/

  • cleaner/
  • core.py: main cleaning engine, tree copy, stub removal, HTML rewriting
  • stubs.py: detection logic for stub files
  • links.py: helpers for analyzing and classifying href values
  • sidebar_fix.py: normalization and cleanup for class sidebar HTML files
  • pipeline/
  • runner.py: orchestrates the full process (cleaning, fixing, zipping)
  • cli/
  • cli.py: command-line interface entrypoint
  • gui/
  • app.py: Tkinter desktop application

Pipeline Description

The pipeline performs the following steps:

  1. Copies the original Dartdoc output directory into a temporary workspace.

  2. Identifies and removes stub HTML files.

  3. Processes remaining HTML files to fix or disable problematic links.

  4. Applies specialized rules for root index pages, library index pages, and class sidebars.

  5. Produces a final ZIP file containing the cleaned documentation.

CLI Usage

The command-line interface can be executed with:

python -m dartdoc_advanced.cli.cli INPUT_DIR OUTPUT_ZIP --min-chars 350 --tiny-chars 150

Arguments:

  • INPUT_DIR: path to the Dartdoc “doc/api” directory
  • OUTPUT_ZIP: destination of the final ZIP file (with or without .zip extension)
  • --min-chars: minimum number of characters required for sidebar/library HTML files
  • --tiny-chars: minimum number of characters for all other HTML files

GUI Usage

The GUI can be launched with:

python -m dartdoc_advanced.gui.app

The application allows users to:

  • select the source Dartdoc directory
  • choose where the ZIP file should be saved
  • configure stub detection thresholds
  • run the cleaning process in a background thread

Developer Notes

The codebase is divided into small, purpose-specific modules, which makes it easy to test and extend. The command-line entrypoint is stable and suitable for being called from other languages, such as Dart. The project is prepared for packaging as a Python package and can easily expose an executable script.

Stub rules:

  • “-library-sidebar.html” is always removed
  • “-class-sidebar.html” and similar sidebar files are always kept
  • other HTML files are removed if their textual content is below the configured thresholds

Sidebar normalization:

Paths with duplicated folders such as:

example/example/MyClass.html are rewritten to: example/MyClass.html

Link disabling:

  • anchor links are kept
  • external links are kept
  • javascript: links are disabled
  • links to missing or deleted HTML files are disabled

License

MIT

Contribution

Contributions and suggestions are welcome.

Metadata

Release files for dartdoc-advanced 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dartdoc-advanced 0.1.0
File Size Uploaded Provenance Actions
dartdoc_advanced-0.1.0.tar.gz 17.3 kB Without provenance Details for dartdoc_advanced-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dartdoc-advanced 0.1.0
File Interpreter ABI Platform Actions
dartdoc_advanced-0.1.0-py3-none-any.whl Python 3 none any Details for dartdoc_advanced-0.1.0-py3-none-any.whl

Total release size: 37.2 kB

Release files / dartdoc_advanced-0.1.0.tar.gz

Download URL dartdoc_advanced-0.1.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bbfba0544fdb36c0bd3484b8dd051d794b2098f26bc5f5063e37898a0773d2d1
BLAKE2b-256 checksum
How to use checksums
9ece7d5d4f2a954d09e9e26d020fea84002a3e572bdfbf741e33b1dee867b690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / dartdoc_advanced-0.1.0-py3-none-any.whl

Download URL dartdoc_advanced-0.1.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a55832c1b32e58cc03a168db9ccc5de062c0ed04ffb1fcd942d214d6c7cc12b
BLAKE2b-256 checksum
How to use checksums
a71a7c5d02e3aeff53d4ead8466dcbddd2a84ecad89fc879a581284afd8bd6c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for dartdoc-advanced 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page