Metadata-Version: 2.4
Name: py-tardiff
Version: 0.1
Summary: Compare two tarballs and emit a markdown diff report.
Project-URL: Homepage, https://github.com/kurt-cb/tardiff
Project-URL: Repository, https://github.com/kurt-cb/tardiff
Project-URL: Issues, https://github.com/kurt-cb/tardiff/issues
Author-email: Kurt Godwin <kurtgo@hotmail.com>
License: MIT License
        
        Copyright (c) 2026 Kurt Godwin <kurt-cb@github>. All rights reserved.
        All derivations of this work must include this copyright notice.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: archive,comparison,diff,markdown,report,tar,tarball
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Archiving
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# 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:

```bash
pip install py-tardiff
```

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

From source:

```bash
pip install .
```

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

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

## Usage

```bash
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

```python
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](LICENSE).
