Skip to main content

Script to intelligently extract multiple archive types

Project description

GitHub PyPI version PyPI pyversions GitHub Workflow Status

dtrx

"Do The Right eXtraction" - don't remember what set of tar flags or where to pipe the output to extract it? no worries!

TL;DR

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:

https://github.com/brettcs/dtrx

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).

Development

Contributions

Contributions are gladly welcomed! Feel free to open a Pull Request with any changes.

Issues

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.

Running Tests

The tests are most easily run from Docker. Check out the Dockerfile for how that's set up.

We push a pre-built image to Docker Hub as dtrx-py/dtrx:latest, so you can pull that image and run the tests like so:

docker run --rm -it --volume $(pwd):/workspace ghcr.io/dtrx-py/dtrx:latest \
   bash -c "cp -r /workspace ~/scratch && cd ~/scratch && uv run -- tests/compare.py"

Releases

Releases are tagged in this repo and published to pypi.org. The release process for maintainers is the below steps:

  1. update the version specifier:

    # update the version appropriately uv version X.Y.Z
    ❯ git add pyproject.toml uv.lock
    ❯ git commit  # fill in the commit message
    
  2. create an annotated tag for the release.

     git tag -a {,-m}X.Y.Z
    

    be sure to push the tag, git push --tags.

  3. use the make publish-release command to build and publish to GitHub and PyPi

See the Makefile for details on what that rule does.

Project details


Download files

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

Source Distribution

dtrx-8.7.1.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

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

dtrx-8.7.1-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file dtrx-8.7.1.tar.gz.

File metadata

  • Download URL: dtrx-8.7.1.tar.gz
  • Upload date:
  • Size: 31.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.0

File hashes

Hashes for dtrx-8.7.1.tar.gz
Algorithm Hash digest
SHA256 d3be625ce7860c82d5159a551bbd215eada8a11cf4f82557e4f77eabc0986e43
MD5 afa6c4e81cbdd78295cb82f26f248c54
BLAKE2b-256 12c2e678320a0051cbbe5de91d1836998bac858086852a135441d7d0bfddc1c1

See more details on using hashes here.

File details

Details for the file dtrx-8.7.1-py3-none-any.whl.

File metadata

  • Download URL: dtrx-8.7.1-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.0

File hashes

Hashes for dtrx-8.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f52f022d8b35b286a62122e7a30524b06c2fcf53bf3f2e0386f1617ce4c0c99e
MD5 2d689a9c496713a2f3dc7c7624e61d79
BLAKE2b-256 539692e459e0ee61c765ca48725cdb110151b745f9b02c4580237d77838bb07f

See more details on using hashes here.

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