cgal icon indicating copy to clipboard operation
cgal copied to clipboard

CGAL docs: broken-links check + version comparison

Open SaillantNicolas opened this issue 6 months ago • 1 comments

Summary of Changes

This PR adds two Python scripts for validating CGAL documentation. They only require requests and beautifulsoup4.

Included scripts

  • analyse_cgal_doc.py

    • Crawls a documentation entry point (e.g., Manual/index.html) and checks internal links.
    • Multi-threaded. Reports: console output + broken_links_report.txt.
    • Optional filtering: only check Manual/ and a subset of packages (provided via text file).
  • compare_docs_versions.py

    • Compares two documentation trees (n-1 vs n) and lists .html pages present in n-1 but missing in n.
    • Inputs: local paths or auto-download of doc_html archives from GitHub Releases.
    • Output report: missing_pages_report.txt.

Dependencies

pip install requests beautifulsoup4

(for compare_docs_versions.py, only requests is required)

Usage

Check links:

python Scripts/developer_scripts/analyse_cgal_doc.py https://doc.cgal.org/latest/Manual/index.html
# or, with package filtering
python Scripts/developer_scripts/analyse_cgal_doc.py https://cgal.github.io/8186/v12/ allowed_packages.txt

Compare two doc versions:

# Local paths
python Scripts/developer_scripts/compare_docs_versions.py --old-path /path/to/5.6.2 --new-path /path/to/6.0.1

# Auto-download from GitHub Releases
python Scripts/developer_scripts/compare_docs_versions.py --old-version 5.6.2 --new-version 6.0.1 --download-dir ~/cgal-docs

Release Management

  • Affected package(s): Scripts

SaillantNicolas avatar Jun 16 '25 10:06 SaillantNicolas

The script is actually not that useful. It only checks in a documentation that all links pointing to the cgal.org domain are not broken. What would have been useful is a script that checks that all .html files of release n-1 are still pointing to something in release n so that we can adapt the apache config file to redirect those queries.

sloriot avatar Aug 05 '25 06:08 sloriot