Skip to content

Contributing

Harsimran Sidhu edited this page Jul 15, 2026 · 1 revision

Contributing

Contributions are welcome — the codebase is intentionally small and modular, with most features living in a single focused module.

Development setup

git clone https://github.com/PKHarsimran/website-downloader.git
cd website-downloader

python -m venv .venv
.venv\Scripts\activate        # macOS/Linux: source .venv/bin/activate
pip install -e ".[dev]"

Run the checks

pytest
black . --check
isort . --check-only
ruff check .

The test suite runs against a small local HTTP fixture server, so no network access is required.

Project layout

Path Purpose
website_downloader/cli.py Argument parsing, validation, logging, entry point
website_downloader/crawler.py Crawl coordination, page/asset workers, robots, stats
website_downloader/http.py Sessions, HTML/binary fetches, CSS/JS post-processing
website_downloader/rewrite.py HTML/CSS/JS/srcset reference rewriting
website_downloader/paths.py Filesystem-safe path mapping
website_downloader/render.py Optional Playwright rendering
website_downloader/cache.py Update-mode ETag / Last-Modified metadata
website_downloader/sitemap.py Sitemap and sitemap-index loading
website_downloader/progress.py Optional Rich progress dashboard
website_downloader/exports.py Zip and WARC export
tests/ pytest suite + fixture server

Pull request tips

  • Keep changes focused; one topic per PR.
  • Add or update tests for behavior changes — every bug fix should ship with a regression test.
  • Run black, isort, and ruff before pushing; CI enforces them.

Contributor License Agreement

By submitting a contribution you agree to the project's Contributor License Agreement: you keep the copyright to your work and license it to the project so it can be maintained and distributed.

See also: How It Works.

Clone this wiki locally