npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

httrackdoxy

v0.1.0

Published

Fix WinHTTrack issues and download missing JS files for Doxygen documentation

Downloads

186

Readme

httrackdoxy

Fix WinHTTrack issues and download missing JS files for Doxygen documentation.

Background

WinHTTrack is a tool for downloading websites to browse offline. However, when used with Doxygen-generated documentation sites, several issues arise that break the offline copy.

Problems

  • Directory path rewriting — A directory URL (e.g. /doc/) and its default file URL (/doc/index.html) are two distinct server resources. When WinHTTrack crawls the directory URL, it rewrites directory paths to file paths for saving (search/ → search/index.html) and uses the saved file URL to replace the original directory URL. This breaks Doxygen's search system, which uses search/ as a prefix to construct JS file URLs. Additionally, the directory file and the actual index.html collide on the same filename — WinHTTrack renames the latter to index-2.html and rewrites all internal references accordingly (e.g. initNavTree('index.html', …) → initNavTree('index-2.html', …)), breaking navigation.

    Tip: Always specify the full file URL when crawling (e.g. /doc/index.html instead of /doc/).

  • Character encoding — Special characters in filenames (like ~) may be altered during download.

  • Missing auxiliary files — WinHTTrack may not download all JavaScript files that Doxygen needs, particularly:

    • navtreeindex{0..N}.js — navigation tree index shards
    • search/{prefix}_{hex}.js — search data shards partitioned by first character
    • JS files for in-page navtree data

How httrackdoxy helps

This tool addresses the above problems:

  • Fix directory rewriting — Globally replaces WinHTTrack's path rewrites in all local HTML/JS files:

    • search/index.html → search/ (restores Doxygen search)
    • index-2.html → index.html (restores navigation references)
  • Auto-detect renames via crawl comparison — Fetches the original crawl page from the server, compares its links with the local doxygen_crawl.html, and uses Levenshtein distance to find mangled filenames.

  • Download missing JS files — Reconstructs the complete list of required JS files by parsing doxygen_crawl.html, navtreedata.js, and search/searchdata.js.

Usage

npx httrackdoxy <command> [options]

Commands

| Command | Description | | ---------- | ----------------------------------------------------- | | download | Download missing JS files from the documentation site | | fixpath | Fix WinHTTrack path rewriting issues |

Download Options

| Flag | Description | | --------------------- | --------------------------------------------------------------------------------------- | | -f, --force | Overwrite existing local files | | -c, --concurrency N | Max concurrent downloads (default: 5) | | -l, --limit N | Limit the number of files to process | | -n, --dry-run | Only show what would be downloaded | | --check | Send HEAD requests to verify remote file existence | | -g, --glob PATTERN | Filter file names by glob pattern(s), space-separated (e.g. "search/* navtreeindex*") | | --detect-renames | Detect mangled HTML filenames in crawl file by comparing with server version |

General Options

| Flag | Description | | --------------- | ---------------------------------------------- | | -d, --dir DIR | Working directory (default: current directory) | | -h, --help | Show help message and exit |

Example

# Fix path rewriting issues in the current directory
npx httrackdoxy fixpath

# Download missing JS files with rename detection
npx httrackdoxy download --detect-renames

# Dry run: see what would be downloaded, limited to search files
npx httrackdoxy download -n -g "search/*"

Tested With

  • WinHTTrack 3.50
  • Doxygen 1.16.1

License

MIT