dartdoc_advanced 0.1.0 copy "dartdoc_advanced: ^0.1.0" to clipboard
dartdoc_advanced: ^0.1.0 copied to clipboard

Dart CLI wrapper around the Python dartdoc-advanced tool. Cleans Dartdoc HTML output and produces a single ZIP with fixed docs.

dartdoc_advanced #

Advanced documentation cleaner for Dart projects. #

This tool provides a Dart CLI wrapper around the Python package dartdoc-advanced

It cleans raw Dartdoc HTML output, removes unnecessary stubs, fixes internal links, normalizes class sidebars, and generates a final ZIP archive with polished documentation.

This package is published on Pub.dev only as a CLI frontend.

The actual processing logic lives in the Python package.

Features #

  • Remove tiny HTML "stub" pages generated by Dartdoc (customizable thresholds).

  • Fix dead or broken internal links.

  • Normalize sidebar links for classes, enums, mixins, extensions, typedefs.

  • Clean index.html pages (root and library indexes).

  • Produce a clean, optimized ZIP ready for publishing.

  • Works consistently across macOS, Linux, and Windows through Python.

  • Includes automatic installation of the Python backend if missing.

Installation #

Install the package globally:

dart pub global activate dartdoc_advanced

This exposes the CLI:

dartdoc_advanced --help

Requirements #

Python 3.9+

This Dart CLI wraps a Python tool, so you must have:

  • Python 3.9+

  • pip installed and available in PATH

You can verify:

python3 --version
pip --version

How it works #

When you run the Dart CLI:

  1. It checks whether the Python CLI dartdoc-advanced is installed.

  2. If not, it tries to install it automatically using:

python3 -m pip install --upgrade dartdoc-advanced
  1. It forwards your arguments to the Python backend.

The Python tool cleans the documentation folder and produces a ZIP file.

Usage #

Clean a Dartdoc output folder (doc/api) and generate a ZIP:

dartdoc_advanced \
  --input path/to/doc/api \
  --output output/CleanDocs.zip \
  --min-chars 350 \
  --tiny-chars 150

Parameters #

Flag Description Default
--input, -i Path to Dartdoc doc/api folder required
--output, -o Output ZIP path required
--min-chars Threshold for *-sidebar.html and *-library.html stubs 350
--tiny-chars Threshold for other small stubs 150
--help, -h Show usage -

Example #

Example command:

dartdoc_advanced \
  --input ./doc/api \
  --output ./build/docs.zip \
  --min-chars 300 \
  --tiny-chars 120

After completion you get:

build/docs.zip

containing the cleaned and optimized HTML documentation.

Troubleshooting #

"Python not found"

Install Python:

sudo apt install python3 python3-pip - Linux

brew install python - macOS

"pip: command not found"

Install pip:

sudo apt install python3-pip

"dartdoc-advanced: command not found"

Run:

python3 -m pip install --upgrade dartdoc-advanced

or just run the Dart CLI again, as it will attempt installation automatically.

Problems on Windows PowerShell #

Ensure pip installs into a path included in the user PATH:

python -m pip install --upgrade dartdoc-advanced

Project Structure #

This Dart package contains:

bin/dartdoc_advanced.dart - CLI wrapper

pubspec.yaml - package configuration

README.md - this file

The actual logic runs inside the Python package:

PyPI: https://pypi.org/project/dartdoc-advanced/

Source: https://github.com/M-P-IT-SOLUTIONS/auto_flutter_docs

License #

This project is released under the MIT License, which allows commercial and open-source use.

Contributing #

Pull requests and issues are welcome! Please file issues at:

https://github.com/M-P-IT-SOLUTIONS/auto_flutter_docs/issues

6
likes
130
points
16
downloads

Publisher

verified publishermpitsol.com

Weekly Downloads

Dart CLI wrapper around the Python dartdoc-advanced tool. Cleans Dartdoc HTML output and produces a single ZIP with fixed docs.

Documentation

API reference

License

MIT (license)

Dependencies

args

More

Packages that depend on dartdoc_advanced