Go to file
a1346054 71275332a9 use license file from gnu.org
Downloaded from:
https://www.gnu.org/licenses/gpl-3.0.txt
2021-09-13 13:23:30 +00:00
doc Added examples of using password settings 2020-11-04 13:08:37 +03:00
patoolib Merge pull request #93 from Swich1987/master 2021-02-18 09:32:54 -05:00
scripts remove unused files 2015-12-09 21:22:54 +01:00
tests Merge pull request #93 from Swich1987/master 2021-02-18 09:32:54 -05:00
.gitattributes Add web page source. 2013-03-29 11:12:37 +01:00
.gitignore Build distribution package as wheel (.whl) file for Python 2015-12-07 20:16:28 +01:00
.travis.yml RF: return back a bit more cumbersome invocation -- python is not found, heh 2021-02-17 14:17:32 -05:00
COPYING use license file from gnu.org 2021-09-13 13:23:30 +00:00
MANIFEST.in Remove unused file patterns 2015-12-10 20:19:25 +01:00
Makefile Specify files to check for copyright year 2016-01-09 21:14:46 +01:00
README.md Add readme 2012-12-13 21:34:57 +01:00
install-rpm.sh Fix RPM installation. 2012-04-11 18:21:22 +02:00
patool Added password support for all archivers, which support work with password: arc, arj, p7zip, py_zipfile, rar, unace, unalz, unzip, xdms. Added tests for those, which support creation and test files in data folder for it. 2020-11-04 12:43:12 +03:00
patool.bash-completion Use python-argcompletion. 2013-02-27 20:55:24 +01:00
requirements.txt Add travis CI info. 2013-02-21 17:53:16 +01:00
setup.cfg Build distribution package as wheel (.whl) file for Python 2015-12-07 20:16:28 +01:00
setup.py Declare python 3.5 to be the minimal version 2021-02-17 11:57:18 -05:00

README.md

Patool

Patool is an archive file manager.

Various archive formats can be created, extracted, tested, listed, searched, repacked and compared with patool. The advantage of patool is its simplicity in handling archive files without having to remember a myriad of programs and options.

The archive format is determined by the file(1) program and as a fallback by the archive file extension.

patool supports 7z (.7z, .cb7), ACE (.ace, .cba), ADF (.adf), ALZIP (.alz), APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr), RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz), ZIP (.zip, .jar, .cbz) and ZOO (.zoo) archive formats. It relies on helper applications to handle those archive formats (for example bzip2 for BZIP2 archives).

The archive formats TAR, ZIP, BZIP2 and GZIP are supported natively and do not require helper applications to be installed.

Examples

# Extract several archives with different formats
patool extract archive.zip otherarchive.rar

# Extract archive with password
patool extract --password somepassword archive.rar

# Test archive integrity
patool test --verbose dist.tar.gz

# List files stored in an archive
patool list package.deb

# Create a new archive
patool create --verbose /path/to/myfiles.zip file1.txt dir/

# Create a new archive with password
patool create --verbose --password somepassword /path/to/myfiles.zip file1.txt dir/

# Show differences between two archives
patool diff release1.0.tar.gz release2.0.zip

# Search for text inside archives
patool search "def urlopen" python-3.3.tar.gz

# Repackage an archive in a different format
patool repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2

Website

See http://wummel.github.io/patool/ for more info and downloads.

API

You can use patool functions from other Python applications. Log output will be on sys.stdout and sys.stderr. On errors, PatoolError will be raised. Note that extra options such as password input or customization for specific archive programs are not supported.

import patoolib
patoolib.extract_archive("archive.zip", outdir="/tmp")
patoolib.test_archive("dist.tar.gz", verbosity=1)
patoolib.list_archive("package.deb")
patoolib.create_archive("/path/to/myfiles.zip", ("file1.txt", "dir/"))
patoolib.diff_archives("release1.0.tar.gz", "release2.0.zip")
patoolib.search_archive("def urlopen", "python3.3.tar.gz")
patoolib.repack_archive("linux-2.6.33.tar.gz", "linux-2.6.33.tar.bz2")

Test suite status

Patool has extensive unit tests to ensure the code quality. Travis CI is used for continuous build and test integration.

Build Status