One magic word to unpack archive.


License
MIT
Install
pip install extrac==0.7.0

Documentation

extrac

PyPI version License Static Badge PyPI - Downloads

Homepage: https://github.com/belingud/python_extrac

One magic word to unpack archive, pure python implementation, no command-line tools required.

一个命令解压所有压缩文件,纯Python实现,不依赖任何命令行工具。

Support 7z(.7z),AR(.a,.ar),RAR(.rar),ZIP(.zip,.jar),TAR(.tar.gz,.tgz,.tar.bz ,.tar.bz2,.tbz,.tbz2,.tar.xz,.txz),GZIP(.gz),compress(.Z),CAB(.cab),XZ(.xz,. lzma),BZIP2(.bz2),BZIP(.bz),ZSTD(.zstd,.zst),DEB(deb) archives for now.

目前支持7z(.7z),AR(.a,.ar),RAR(.rar),ZIP(.zip,.jar),TAR(.tar.gz,.tgz,.tar.bz ,.tar.bz2,.tbz,.tbz2,.tar.xz,.txz),GZIP(.gz),compress(.Z),CAB(.cab),XZ(.xz,. lzma),BZIP2(.bz2),BZIP(.bz),ZSTD(.zstd,.zst),DEB(deb) 后缀的压缩文件。

Install

Recommended installation with pipx:

$ pipx install extrac
  installed package extrac x.x.x, installed using Python 3.12.3
  These apps are now globally available
    - extrac
    - x
done! ✨ 🌟 ✨

Support Format:

  • .ar/.a
  • .bz2/.bz/.dmg
  • .cab
  • .gz
  • .xz
  • .7z
  • .Z
  • .tar.gz/.tgz
  • .tar.bz/.tbz
  • .tar.xz/.txz
  • .tar
  • .rar
  • .zip/.jar
  • .zstd/.zst
  • .deb
  • .xz/.lzma
  • .arj
  • .rp
  • .pkg

Usage:

Contains two commands x and extrac.

Not support specified output filename yet

# Auto extract to current directory as sample/
x test/archives/sample.zip
extrac test/archives/sample.zip
# Specified output directory as test/sample/
x test/archives/sample.tar.bz test/
extrac test/archives/sample.tar.bz test/

TO BE CONTINUE

未完待续