Skip to main content

A small command line utility to help extract compressed archives.

Project description

simple_extract

Simple File Extraction

Description

A small command line file extraction utility written in Python. It uses external tools to optionally fetch from an url and decompress archives.

Getting started

Python 3.9+ needed

External tools that can be used:

* tar
* gzip
* bzip2
* unrar
* lha
* 7z
* unzip
* rpm2cpio
* cpio
* ar
* xz
* zstd
* curl
* wget
* fetch

Installing

* clone the git repository from https://github.com/berrym/simple_extract.git
or:
* python -m pip install simple-extract
or:
* python -m pip install --user simple-extract

Executing program

* python simple_extract.py some-archive.tar.gz some-other-archive.lzma
or if installed via pip:
* simple-extract https://github.com/ibara/mg/releases/download/mg-6.8.1/mg-6.8.1.tar.gz

Authors

Copyright 2021 Michael Berry trismegustis@gmail.com

Version History

  • 0.1.0
    • Initial Release
  • 0.1.1
    • Change the way paths are handled if stdout is used
  • 0.1.2
    • Updated setup.py
  • 0.1.3
    • Fixed setup.py issue preventing proper builds
  • 0.1.4
    • Added a simple noclobber option for non piped commands
  • 0.1.5
    • Added a command line switch to silence archive downloads
  • 0.1.6
    • Stop splitting text at common extensions
  • 0.1.7
    • Split archive paths only at valid extensions
  • 0.1.8
    • Changed imports, check for local archive existence in should_fetch archive
  • 0.1.9
    • Improved url validation and error handling
  • 0.2.0
    • Use subprocess.run instead of Popen and check for errors
  • 0.2.1
    • Use a dictionary command mapping instead of if else control flow
  • 0.2.2
    • Removed glob_multiple_extensions, deprecated
  • 0.2.3
    • Refactored main()
  • 0.2.4
    • Added logging
  • 0.2.5
    • New control switch --force_download bypasses should_fetch_url() check

License

This project is licensed under the MIT License - see the LICENSE file for details.

License: MIT Code style: black

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

simple_extract-0.2.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

simple_extract-0.2.5-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file simple_extract-0.2.5.tar.gz.

File metadata

  • Download URL: simple_extract-0.2.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for simple_extract-0.2.5.tar.gz
Algorithm Hash digest
SHA256 90034c76e40ecad3eb391d6c53d5fa05a8ef049a8635c37f9ef6cc1c5c3708ce
MD5 977b5afa0d27d1d3d735c25642461ec9
BLAKE2b-256 73941139b1642d4c67dfcf061e0621775009fefe33353786fa727e76d8a196af

See more details on using hashes here.

File details

Details for the file simple_extract-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: simple_extract-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for simple_extract-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 afaf26ff0353d0e12f953c3d51ca4e58efc0350b7c9b31b87b0a75fbff6de9d3
MD5 7a014597d29cf3fd489b33507cb2ab2a
BLAKE2b-256 63c10b1f5a196abde96cfed7fa87cc0b386d8aa14d543ce31675c00f06337f3b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page