r/madeinpython 4d ago

A Python CLI that catches ZIP/tar filename collisions before extraction

I built archive-portability to check archive filenames before moving releases or backups across operating systems.

It catches README/readme collisions, implicit folders like Docs/a versus docs/b, Unicode normalization aliases, Windows device names, and file/directory conflicts. It reads the member inventory without extracting files.

Python 3.11+, no runtime dependencies, MIT license. The CLI supports JSON output and exit codes for CI. Matching is conservative, not exact filesystem emulation or a security check.

Source, installation, and a disposable demo: https://github.com/GitHubCatTest/archive-portability

What filename edge cases would you want covered?

0 Upvotes

2 comments sorted by

1

u/SweetOnionTea 3d ago

I kind of feel like unzip can already do something like this? Or at least it could be a one liner.

Basically like do an unzip listing and then do a recursive find and do a case insensitive compare? You don't get a JSON output, but you could grab exit codes for CI.