Script to intelligently extract multiple archive types
"Do The Right eXtraction" - don't remember what set of
tar flags or where
to pipe the output to extract it? no worries!
pip install dtrx dtrx yolo.tar.gz
This is a copy-paste of the original dtrx repo, and all credit for this software should be attributed to the original author, Brett Smith @brettcs:
See the original
README for more details on what this does!
Changes in this repo
This repo contains some patches on top of the original source to enable using
dtrx with python3. The original motivation was to enable
dtrx on Ubuntu
20.04+, where the
dtrx apt package was removed from the default ppas (likely
due to being python2 only).
I attempted to get the tests all working via
tox , for which I used a
Dockerfile to try to get some kind of environment consistency. You can run the
tests by running (requires Docker installed):
Contributions are gladly welcomed! Feel free to open a Pull Request with any changes.
When posting an issue, it can be very handy to provide any example files (for example, the archive that failed to extract) or reproduction steps so we can address the problem quickly.
Releases are tagged in this repo and published to pypi.org. The release process for maintainers is the below steps:
update the version specifier:
# update the VERSION value in dtrx/dtrx.py, then: ❯ git add dtrx/dtrx.py ❯ git commit # fill in the commit message
create an annotated tag for the release. usually good to put a list of new commits since the previous tag, for example by listing them with:
❯ git log $(git describe --tags --abbrev=0)..HEAD --oneline # create the annotated tag ❯ git tag -a <version number>
be sure to push the tag,
git push --tags.
make publish-releasecommand to build and publish to GitHub and PyPi
Makefile for details on what that rule does.
There is a suite of tests that can be run either on the local python environment, or across all the supported python environments via docker:
# run the suite from the current python environment pip install pyyaml # test dependency python tests/compare.py # run the tests in docker across all supported python versions (takes a while) ./test.sh # run the tests in docker on one python version RUN_JOB=quick-test ./test.sh
Linting is provided by pre-commit. To use it, first install the pre-commit hook:
pip install pre-commit pre-commit install
pre-commit will run anytime
git commit runs (disable with
can manually run it with
It's also run in CI.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.