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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d6f3107ad9c19d768a1d1bb06533cbc7aee6fe7ed635acc9a3f28a66be78be6
|
|
| MD5 |
d6828b6424071731fd3096c923faf5a4
|
|
| BLAKE2b-256 |
18542d8553441d531c3f3b0a876db5e64d0548461d0173177a3fe74a6a8b8b7b
|
Provenance
The following attestation bundles were made for py_tardiff-0.1.tar.gz:
Publisher:
publish.yaml on kurt-cb/tardiff
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_tardiff-0.1.tar.gz -
Subject digest:
7d6f3107ad9c19d768a1d1bb06533cbc7aee6fe7ed635acc9a3f28a66be78be6 - Sigstore transparency entry: 1596828980
- Sigstore integration time:
-
Permalink:
kurt-cb/tardiff@17a111b84b3ff6349b256e2050736be4734103f3 -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/kurt-cb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@17a111b84b3ff6349b256e2050736be4734103f3 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f9badbc582f4d64b4837c12620af629a72822d08380e296b0a19339c6d458fd
|
|
| MD5 |
a89ecd21145d8197b96ab2cdc1c97800
|
|
| BLAKE2b-256 |
5523f91109f2d107ec84337112cbf5f3e58065f08788e3c95fdc167f1feccc56
|
Provenance
The following attestation bundles were made for py_tardiff-0.1-py3-none-any.whl:
Publisher:
publish.yaml on kurt-cb/tardiff
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_tardiff-0.1-py3-none-any.whl -
Subject digest:
7f9badbc582f4d64b4837c12620af629a72822d08380e296b0a19339c6d458fd - Sigstore transparency entry: 1596829061
- Sigstore integration time:
-
Permalink:
kurt-cb/tardiff@17a111b84b3ff6349b256e2050736be4734103f3 -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/kurt-cb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@17a111b84b3ff6349b256e2050736be4734103f3 -
Trigger Event:
release
-
Statement type: