Skip to main content

Compare two tarballs and emit a markdown diff report.

Project description

tardiff

Compare two tarballs and emit a markdown diff report.

Reports:

  • Files present only in A (removed in B)
  • Files present only in B (added in B)
  • Files in both whose size changed (with absolute and percentage delta)
  • Per-tarball totals (file count + total bytes) and the net delta

Supported formats: .tar, .tar.gz/.tgz, .tar.bz2/.tbz2, .tar.xz/.txz (compression is auto-detected).

Install

From PyPI:

pip install py-tardiff

(The distribution name on PyPI is py-tardiff; the import name and CLI are both tardiff.)

From source:

pip install .

Or run without installing, using a one-off environment:

pipx run --spec py-tardiff tardiff OLD.tar.gz NEW.tar.gz

Usage

tardiff OLD.tar.gz NEW.tar.gz              # writes diff.md
tardiff OLD.tar.gz NEW.tar.gz -o report.md # custom output path
python -m tardiff OLD.tar.gz NEW.tar.gz    # equivalent

A short summary is printed to stderr so the command composes in pipelines:

Wrote diff.md: -3 +5 ~12 files, Δ +4096 B

Library use

from pathlib import Path
from tardiff import read_tar, compute_diff, render_report

a = read_tar(Path("old.tar.gz"))
b = read_tar(Path("new.tar.gz"))
diff = compute_diff(a, b)
print(render_report(a, b, diff))

Status

Could be lots better. Filters, ignore small changes, file content diffs, etc.

— Kurt

License

MIT — see LICENSE.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_tardiff-0.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_tardiff-0.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file py_tardiff-0.1.tar.gz.

File metadata

  • Download URL: py_tardiff-0.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_tardiff-0.1.tar.gz
Algorithm Hash digest
SHA256 7d6f3107ad9c19d768a1d1bb06533cbc7aee6fe7ed635acc9a3f28a66be78be6
MD5 d6828b6424071731fd3096c923faf5a4
BLAKE2b-256 18542d8553441d531c3f3b0a876db5e64d0548461d0173177a3fe74a6a8b8b7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_tardiff-0.1.tar.gz:

Publisher: publish.yaml on kurt-cb/tardiff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_tardiff-0.1-py3-none-any.whl.

File metadata

  • Download URL: py_tardiff-0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_tardiff-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f9badbc582f4d64b4837c12620af629a72822d08380e296b0a19339c6d458fd
MD5 a89ecd21145d8197b96ab2cdc1c97800
BLAKE2b-256 5523f91109f2d107ec84337112cbf5f3e58065f08788e3c95fdc167f1feccc56

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_tardiff-0.1-py3-none-any.whl:

Publisher: publish.yaml on kurt-cb/tardiff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page