Commit Graph

248 Commits

Author SHA1 Message Date
Bastian Kleineidam df8f0841f3 Support bsdtar. 2012-05-23 18:22:16 +02:00
Bastian Kleineidam 4a7db8c161 Fix output directory for ar archives. 2012-05-23 05:53:07 +02:00
Bastian Kleineidam 5e43aaffb7 Make cpio more platform compatible. 2012-05-23 05:39:39 +02:00
Bastian Kleineidam 9a8ef2678d Make cpio listing more platform compatible. 2012-05-23 05:34:41 +02:00
Bastian Kleineidam 40639cb172 Fix tar compression options. 2012-05-23 05:19:27 +02:00
Bastian Kleineidam 1c0c3d9b61 xz and lzma are not native for tar programs. 2012-05-23 05:00:13 +02:00
Bastian Kleineidam 087b7e100e Init the MIME db correct on all platforms. 2012-05-23 04:47:26 +02:00
Bastian Kleineidam edb528dc88 Add .flac extension mime type. 2012-05-18 21:12:58 +02:00
Bastian Kleineidam 36c2be760d Add support for flac files. 2012-05-17 21:22:56 +02:00
Bastian Kleineidam 52762df5c6 Add flac file detection. 2012-05-17 14:59:33 +02:00
Bastian Kleineidam de18ff9ca3 Support SHN (.shn) files with shorten. 2012-05-17 14:28:12 +02:00
Bastian Kleineidam 448eb7c720 Add mime type for .shn files. 2012-05-17 14:11:36 +02:00
Bastian Kleineidam 1cb49aa296 Add support for APE format. 2012-05-17 11:01:06 +02:00
Bastian Kleineidam 66001fde36 Add boilerplate support for Monkey's Audio Compressors APE format. 2012-05-17 10:43:21 +02:00
Bastian Kleineidam b3b48adf39 Code cleanup: remove CompressionPrograms map. 2012-05-17 09:08:28 +02:00
Bastian Kleineidam d987325ae5 Updated copyright. 2012-05-12 13:38:52 +02:00
Bastian Kleineidam ef8c0e595c Python module programs now have a py_ suffix. 2012-05-12 13:36:59 +02:00
Bastian Kleineidam e4f1a06c82 Remove unnecessary filename check for archive repacking. 2012-05-12 12:57:17 +02:00
Bastian Kleineidam 79a376ce4e Rename encoding to compression in the context of archive handling. Makes more sense. 2012-05-12 09:31:27 +02:00
Bastian Kleineidam e7f8e00bc5 Support TAR file handling with the Python tarfile module. 2012-05-12 09:00:55 +02:00
Bastian Kleineidam ac76a91d2d Support creation of ZIP files with Python modules. 2012-05-11 23:30:46 +02:00
Bastian Kleineidam a0669fd438 Support creation of BZIP2 and GZIP files with Python modules. 2012-05-11 23:12:37 +02:00
Bastian Kleineidam 8304658d4e Simulate the echo program with print statement. 2012-05-11 23:09:52 +02:00
Bastian Kleineidam 547bd75fd6 Support extraction of GZIP files with the Python gzip module. 2012-05-11 22:56:44 +02:00
Bastian Kleineidam 45a5f7e841 Support extraction of BZIP2 files with the Python bz2 module. 2012-05-11 22:08:00 +02:00
Bastian Kleineidam 6882f93b49 Optimize program configuration and fix archive argument checking. 2012-05-11 21:16:29 +02:00
Bastian Kleineidam 3bd8441fa5 Add more archive argument checks and refactor. 2012-05-11 21:04:22 +02:00
Bastian Kleineidam 26727ee20a Also compare filenames. 2012-05-11 21:04:02 +02:00
Bastian Kleineidam a690ba28f8 Make sure all temporary directories are removed on errors. 2012-05-11 20:19:29 +02:00
Bastian Kleineidam 8d8da1fecf Add tests for smae file check. 2012-05-11 20:16:24 +02:00
Bastian Kleineidam 96be0020ea Add more checks. 2012-05-11 20:07:50 +02:00
Bastian Kleineidam 2bfa5e2a6c Make function argument more clear. 2012-05-11 19:33:42 +02:00
Bastian Kleineidam 7fa1151269 Assert list of files to archive is non-empty. 2012-05-11 19:33:12 +02:00
Bastian Kleineidam e28f3ab115 Log abort message as error instead of info. 2012-05-11 19:32:16 +02:00
Bastian Kleineidam b51aff6182 Log infos to stdout instead of stderr. 2012-05-11 19:32:00 +02:00
Bastian Kleineidam 6917ab17bb Support plzip. 2012-05-11 07:14:49 +02:00
Bastian Kleineidam 1cb76a9633 Support plbzip2. 2012-05-11 07:08:50 +02:00
Bastian Kleineidam 0910281d20 Fix syntax. 2012-04-09 12:29:05 +02:00
Bastian Kleineidam b9e60da545 Allow verbose option in diff and repack commands. 2012-04-09 12:26:54 +02:00
Bastian Kleineidam 8987927edb Added convenience library functions for handling archives. 2012-04-09 12:23:02 +02:00
Bastian Kleineidam 47c43a57b1 Updated copyright. 2012-04-08 18:54:37 +02:00
Bastian Kleineidam 021626aa82 Added support for the pigz program handling GZIP archives. 2012-04-06 12:59:52 +02:00
Bastian Kleineidam 6699e833b4 Add help function and check always the keyword arguments. 2012-02-12 09:17:07 +01:00
Bastian Kleineidam 8205f7f8b7 Don't use the -r rar option. 2011-12-27 17:48:10 +01:00
Bastian Kleineidam abc807e956 Add crx mime-type; ignore non-supported extensions in file(1) mime type guessing; code cleanup 2011-10-19 09:12:01 +02:00
Bastian Kleineidam ed41abb47b Add listing support for xz 2011-10-19 09:11:08 +02:00
Bastian Kleineidam ba6d138615 Xz supports all archive commands. 2011-10-19 09:10:17 +02:00
Bastian Kleineidam 14641f8ea3 Updated copyright. 2011-01-25 06:57:30 -06:00
Bastian Kleineidam e48b95f9f1 Support DMS (.dms) files. 2011-01-24 14:28:29 -06:00
Bastian Kleineidam 80916bc335 Added support for the orange CAB extracting program. 2011-01-24 12:24:34 -06:00
Bastian Kleineidam 55f3716eb6 Fall back to file extension detection for MIME type when the uncompressor file(1) uses for compressed TAR archives is not installed. 2011-01-23 09:30:11 -06:00
Bastian Kleineidam d39e1c6750 Support ZIP (.zip) file creation with 7z. 2011-01-17 13:38:53 -06:00
Bastian Kleineidam 296283bf9e Added support for pdlzip. 2011-01-17 13:27:54 -06:00
Bastian Kleineidam 85f592b8ea Added support for clzip. 2011-01-17 13:11:02 -06:00
Bastian Kleineidam e0a661d7ae Added MIME type detected on Debian platform for cpio archives. 2011-01-17 12:39:21 -06:00
Bastian Kleineidam b11339bd2f Fix command argument order when extracting cpio archives. 2011-01-17 12:37:10 -06:00
Bastian Kleineidam fbdf2e12e8 When running shell commands, join the command string in the utility function. 2010-12-15 20:40:25 +01:00
Bastian Kleineidam f0895c7ffc Added alternative ZIP mime type 2010-11-20 14:08:01 +01:00
Bastian Kleineidam 9cfc1b1e61 Remove duplicate code. 2010-11-15 21:29:51 +01:00
Bastian Kleineidam 0d7a90e0f0 Improved command execution logging. 2010-11-15 21:29:19 +01:00
Bastian Kleineidam 79493755c5 Use util.log_info to print extraction info message. 2010-11-10 19:50:59 +01:00
Bastian Kleineidam 895197e120 Fix rar extraction unpack directory. 2010-11-10 19:50:19 +01:00
Bastian Kleineidam 338e0daaa8 Use existing shell_quote function. 2010-11-10 19:49:08 +01:00
Bastian Kleineidam dc7a1a033c Show commands that are run. 2010-11-10 19:34:25 +01:00
Bastian Kleineidam 7f33a0f604 Improved error message wording. 2010-10-04 19:21:33 +02:00
Bastian Kleineidam 09c59ab3f0 Added support for the standalone 7za archiver in addition to 7z. 2010-10-04 19:21:01 +02:00
Bastian Kleineidam a1c9ced204 Use common functions for standard operations on singlefile archives. 2010-04-05 13:55:23 +02:00
Bastian Kleineidam 3c67f6a6a0 Remove unused variables; add missing docstrings. 2010-04-05 09:37:54 +02:00
Bastian Kleineidam 97901d89d9 Correct argument quoting for Windows platforms. 2010-04-05 08:46:09 +02:00
Bastian Kleineidam faa19bd74e Raise PatoolError on rmtree() errors. 2010-04-05 02:56:59 +02:00
Bastian Kleineidam e4010ded03 Fixed argument order for error message. 2010-04-05 02:47:42 +02:00
Bastian Kleineidam 14d591194e Use error function with correct number of arguments for rmtree() 2010-04-05 02:39:40 +02:00
Bastian Kleineidam b8d2d81d00 Really fix shell quoting, quoting single quotes correctly. 2010-04-04 20:29:14 +02:00
Bastian Kleineidam 8cbef81a50 Only quote commandline arguments that need quoting. 2010-04-04 19:12:24 +02:00
Bastian Kleineidam 7d39df7748 Fix quoting of shell meta characters. 2010-04-04 19:11:54 +02:00
Bastian Kleineidam 554d273b08 Added support for ZOO (.zoo) archives. 2010-03-21 15:39:02 +01:00
Bastian Kleineidam 82708b74fa Added support for RZIP (.rz) archives. 2010-03-20 11:34:40 +01:00
Bastian Kleineidam 5e21670b8e Do not use diff -B. 2010-03-18 19:25:42 +01:00
Bastian Kleineidam 7a901a2d3f Replace iter*() methods of dicts. 2010-03-16 16:54:02 +01:00
Bastian Kleineidam 5d66704369 Added new command "patool repack". 2010-03-11 18:33:58 +01:00
Bastian Kleineidam 282701e675 Return diff command error code. 2010-03-11 17:54:09 +01:00
Bastian Kleineidam 9d859bc21c Use TMPDIR for temporary data, and catch keyboard interrupts. 2010-03-11 17:15:03 +01:00
Bastian Kleineidam a30d44c6a5 Added new command "patool diff" to show differences between two archives. 2010-03-11 16:02:08 +01:00
Bastian Kleineidam 084c4ffd3d Check for cpio when extracting output from rpm2cpio. 2010-03-11 15:54:01 +01:00
Bastian Kleineidam 5ad18595bd Do not use zip -u 2010-03-11 15:53:28 +01:00
Bastian Kleineidam e2cb9208d1 Return test string in test() function instead of printing it. 2010-03-11 11:13:37 +01:00
Bastian Kleineidam 7a67446bdd Add MIME type for .lzh files. 2010-03-10 21:17:29 +01:00
Bastian Kleineidam ec6f98ac0c Add MIME type for .lha files. 2010-03-10 21:13:01 +01:00
Bastian Kleineidam c7570293db Fix baker command parsing 2010-03-10 20:48:47 +01:00
Bastian Kleineidam d6089655b8 Use absolute pathnames when changing directories. 2010-03-10 19:44:48 +01:00
Bastian Kleineidam f04539deae Use short -v option for verbose ZIP operation to be compatible with other ZIP command line tools. 2010-03-08 22:07:53 +01:00
Bastian Kleineidam 37fa891535 Added support for LRZIP (.lrz) files. 2010-03-08 19:58:39 +01:00
Bastian Kleineidam 2f5addad3f Support the nomarch tool for handling ARC files. 2010-03-08 18:36:18 +01:00
Bastian Kleineidam 4f12f39834 Added support for ARC (.arc) archives. 2010-03-08 18:28:11 +01:00
Bastian Kleineidam c329208910 Simplify and cleanup all command functions. 2010-03-08 17:32:18 +01:00
Bastian Kleineidam acbf544d04 Added support for ALZIP (.alz) archives. 2010-03-06 21:35:03 +01:00
Bastian Kleineidam 3e76a655bd Added support for LZH (.lha, .lzh) archives. 2010-03-06 19:24:34 +01:00
Bastian Kleineidam 960d15cd76 Refactor mime detection functions and add better tests. 2010-03-06 19:20:50 +01:00
Bastian Kleineidam 6cba779475 Added support for AR (.a) archives. 2010-03-06 16:52:13 +01:00
Bastian Kleineidam 9a04371f07 Added support for ACE (.ace) archives. 2010-03-06 15:47:00 +01:00
Bastian Kleineidam 670d5df652 Make extracted files user readable. 2010-03-06 15:23:16 +01:00
Bastian Kleineidam 6decebe6f7 Force equal sign for long options to allow variable option positions. 2010-03-06 13:48:50 +01:00
Bastian Kleineidam 12d0340af8 Fix displaying help of keyword options. 2010-03-06 13:30:32 +01:00
Bastian Kleineidam 2e8800504c Fix handling of keyword arguments for baker and added tests. 2010-03-06 13:29:21 +01:00
Bastian Kleineidam 60e5077969 Allow specifying variable options with the params argument. 2010-03-06 12:30:42 +01:00
Bastian Kleineidam 4cee825589 Simplify method by removing else branch after return. 2010-03-06 12:09:05 +01:00
Bastian Kleineidam 2692c7f84f Remove --force option. 2010-03-06 11:33:44 +01:00
Bastian Kleineidam 9c3fd7c2fa Removed support for setting options via config file. 2010-03-04 17:07:51 +01:00
Bastian Kleineidam 8283d7d9e2 Fix typo 2010-03-04 16:54:45 +01:00
Bastian Kleineidam cab43b1238 Added support for LZIP archives. 2010-03-04 16:42:37 +01:00
Bastian Kleineidam 44726ecdea Port to Python 2.4: replace subprocess.check_call(). 2010-03-04 16:01:12 +01:00
Bastian Kleineidam 76ede8c91d Port to Python 2.4: remove with statement and relative imports. 2010-03-04 14:57:55 +01:00
Bastian Kleineidam 2577a454b9 Added support for creating ZIP archives. 2010-03-03 22:04:06 +01:00
Bastian Kleineidam 8d02fdfe8f Remove unused imports 2010-03-03 21:10:11 +01:00
Bastian Kleineidam 8cd637e198 Prevent overwriting the archive itself when extracting single-file archives. 2010-03-03 21:08:57 +01:00
Bastian Kleineidam b51777c8f1 Support decompressing files without .lzo extension. 2010-03-03 21:04:02 +01:00
Bastian Kleineidam fdf52fbbcc Improved recognition of MIME types with file(1). 2010-03-03 20:11:45 +01:00
Bastian Kleineidam 8f33b01cbf Add ability to pass format and encoding as arguments to the archive handler function. 2010-03-03 17:35:17 +01:00
Bastian Kleineidam ac2d30322a Memoize function return values of mime type guessing and program finding. 2010-03-01 16:42:39 +01:00
Bastian Kleineidam 0849e9aaa2 Added support for windows systems. 2010-03-01 16:29:54 +01:00
Bastian Kleineidam a6c723eddc Ensure that a given program name is absolute. 2010-03-01 16:19:48 +01:00
Bastian Kleineidam 3982c133be Improved format listing and added a test case for this command. 2010-03-01 16:17:14 +01:00
Bastian Kleineidam f7e3fded29 Fix bug listing available formats when only a default program could be found. 2010-03-01 16:14:33 +01:00
Bastian Kleineidam 8f5bc190f8 Added more missing file extensions for the Python mimetypes module. 2010-03-01 16:13:57 +01:00
Bastian Kleineidam ae8a796fdd Only call file(1) program if it is available. 2010-03-01 16:11:44 +01:00
Bastian Kleineidam 9a80938e0a Add and use find_program() utility method instead of calling distutils find_executable directly. 2010-03-01 16:10:17 +01:00
Bastian Kleineidam fdb1f398bf Moved p7zip_supports_rar() function to util package where it belongs. 2010-03-01 16:05:32 +01:00
Bastian Kleineidam 90f4d607df Added missing documentation strings. 2010-03-01 16:03:31 +01:00
Bastian Kleineidam c647f65a87 Test if encoding is supported by the archive program. 2010-02-23 19:31:14 +01:00
Bastian Kleineidam a59ae7c03b List xz archives with echo. 2010-02-23 19:30:20 +01:00
Bastian Kleineidam 9275d6ca47 Ensure archive program supports a given encoding before trying to handle archive commands. 2010-02-23 07:32:45 +01:00
Bastian Kleineidam 30c58834bd Improved format listing 2010-02-22 21:55:16 +01:00
Bastian Kleineidam 3c01a64a16 Added support for lzma or xz encoded tar files (ie. t.tar.lzma and t.tar.xz) 2010-02-22 18:22:49 +01:00
Bastian Kleineidam 8742abafe9 Added XZ format support 2010-02-22 17:34:08 +01:00
Bastian Kleineidam bc7e99b35b Added support for LZMA archives 2010-02-22 17:21:55 +01:00
Bastian Kleineidam 077275eb32 Fix formats command 2010-02-21 16:04:09 +01:00
Bastian Kleineidam de4dd49e33 Move program handlers into own python module package. 2010-02-21 15:56:45 +01:00
Bastian Kleineidam 6790380c70 Implemented create command 2010-02-21 15:48:52 +01:00
Bastian Kleineidam dde435cc16 Do not run file(1) on non-existing files. 2010-02-21 14:30:26 +01:00
Bastian Kleineidam bb7347b03d Merged master 2010-02-21 13:45:41 +01:00
Bastian Kleineidam 2587bfda86 Added test archive command. 2010-02-21 13:40:42 +01:00
Bastian Kleineidam ed244c1338 Improved error message for unknown commands. 2010-02-21 13:00:21 +01:00
Bastian Kleineidam 314e6805aa Added the baker module locally because it is small, not widely known and I have patched it. 2010-02-21 12:56:13 +01:00
Bastian Kleineidam 1f1896b175 initial framework for creation of archives 2010-02-21 12:53:00 +01:00
Bastian Kleineidam 1e9d656d70 Better names for some functions and values 2010-02-21 12:28:20 +01:00
Bastian Kleineidam 1b38fff5ce Better names for some functions and values 2010-02-21 12:20:47 +01:00
Bastian Kleineidam 82e97a62a6 Remove unused imports 2010-02-21 12:19:14 +01:00
Bastian Kleineidam 1e3a72bdaa Initial commit 2010-02-21 12:14:57 +01:00