Add VHD support with 7z
This commit is contained in:
parent
02004743f7
commit
a2e096ae98
|
@ -1,3 +1,8 @@
|
|||
1.10 (released xx.xx.2015)
|
||||
|
||||
* Added support for VHD (Virtual Hard Disk) archives with 7z.
|
||||
|
||||
|
||||
1.9 (released 07.12.2015)
|
||||
|
||||
* Fix ZPAQ archive creation.
|
||||
|
|
|
@ -36,7 +36,7 @@ ArchiveFormats = (
|
|||
'7z', 'ace', 'adf', 'alzip', 'ape', 'ar', 'arc', 'arj',
|
||||
'bzip2', 'cab', 'chm', 'compress', 'cpio', 'deb', 'dms',
|
||||
'flac', 'gzip', 'iso', 'lrzip', 'lzh', 'lzip', 'lzma', 'lzop',
|
||||
'rar', 'rpm', 'rzip', 'shar', 'shn', 'tar', 'xz',
|
||||
'rar', 'rpm', 'rzip', 'shar', 'shn', 'tar', 'vhd', 'xz',
|
||||
'zip', 'zoo', 'zpaq')
|
||||
|
||||
# Supported compressions (used with tar for example)
|
||||
|
@ -77,6 +77,7 @@ ArchiveMimetypes = {
|
|||
'application/x-rzip': 'rzip',
|
||||
'application/x-shar': 'shar',
|
||||
'application/x-tar': 'tar',
|
||||
'application/x-vhd': 'vhd',
|
||||
'application/x-xz': 'xz',
|
||||
'application/x-zip-compressed': 'zip',
|
||||
'application/x-zoo': 'zoo',
|
||||
|
@ -225,6 +226,11 @@ ArchivePrograms = {
|
|||
'list': ('dpkg-deb', '7z'),
|
||||
'test': ('dpkg-deb', '7z'),
|
||||
},
|
||||
'dms': {
|
||||
'extract': ('xdms',),
|
||||
'list': ('xdms',),
|
||||
'test': ('xdms',),
|
||||
},
|
||||
'lzop': {
|
||||
None: ('lzop',),
|
||||
},
|
||||
|
@ -248,6 +254,11 @@ ArchivePrograms = {
|
|||
'list': ('py_echo',),
|
||||
'create': ('shorten',),
|
||||
},
|
||||
'vhd': {
|
||||
'extract': ('7z',),
|
||||
'list': ('7z',),
|
||||
'test': ('7z',),
|
||||
},
|
||||
'xz': {
|
||||
None: ('xz', '7z'),
|
||||
'extract': py_lzma,
|
||||
|
@ -259,11 +270,6 @@ ArchivePrograms = {
|
|||
'zpaq': {
|
||||
None: ('zpaq',),
|
||||
},
|
||||
'dms': {
|
||||
'extract': ('xdms',),
|
||||
'list': ('xdms',),
|
||||
'test': ('xdms',),
|
||||
},
|
||||
}
|
||||
|
||||
# List those programs that have different python module names because of
|
||||
|
|
|
@ -48,6 +48,7 @@ extract_zip = \
|
|||
extract_rpm = \
|
||||
extract_deb = \
|
||||
extract_iso = \
|
||||
extract_vhd = \
|
||||
extract_7z
|
||||
|
||||
def list_7z (archive, compression, cmd, verbosity, interactive):
|
||||
|
@ -71,6 +72,7 @@ list_bzip2 = \
|
|||
list_iso = \
|
||||
list_xz = \
|
||||
list_lzma = \
|
||||
list_vhd = \
|
||||
list_7z
|
||||
|
||||
|
||||
|
@ -95,6 +97,7 @@ test_bzip2 = \
|
|||
test_iso = \
|
||||
test_xz = \
|
||||
test_lzma = \
|
||||
test_vhd = \
|
||||
test_7z
|
||||
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ def add_mimedb_data(mimedb):
|
|||
add_mimetype(mimedb, 'application/x-dms', '.dms')
|
||||
add_mimetype(mimedb, 'application/x-zip-compressed', '.crx')
|
||||
add_mimetype(mimedb, 'application/x-shar', '.shar')
|
||||
add_mimetype(mimedb, 'application/x-vhd', '.vhd')
|
||||
add_mimetype(mimedb, 'audio/x-ape', '.ape')
|
||||
add_mimetype(mimedb, 'audio/x-shn', '.shn')
|
||||
add_mimetype(mimedb, 'audio/flac', '.flac')
|
||||
|
|
2
setup.py
2
setup.py
|
@ -33,7 +33,7 @@ from distutils import util
|
|||
from distutils.file_util import write_file
|
||||
|
||||
AppName = "patool"
|
||||
AppVersion = "1.9"
|
||||
AppVersion = "1.10"
|
||||
MyName = "Bastian Kleineidam"
|
||||
MyEmail = "bastian.kleineidam@web.de"
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class Test7z (ArchiveTest):
|
|||
self.archive_list('t.rpm')
|
||||
self.archive_list('t.deb')
|
||||
self.archive_list('t.iso')
|
||||
self.archive_list('t.vhd')
|
||||
self.archive_extract('t.txt.gz', check=Content.Singlefile)
|
||||
self.archive_extract('t.txt.bz2', check=Content.Singlefile)
|
||||
self.archive_extract('t.txt.lzma', check=Content.Singlefile)
|
||||
|
@ -47,6 +48,7 @@ class Test7z (ArchiveTest):
|
|||
self.archive_extract('t.rpm', check=None)
|
||||
self.archive_extract('t.deb', check=None)
|
||||
self.archive_extract('t.iso')
|
||||
self.archive_extract('t.vhd', check=None)
|
||||
self.archive_test('t.txt.gz')
|
||||
self.archive_test('t.txt.bz2')
|
||||
self.archive_test('t.txt.lzma')
|
||||
|
@ -58,6 +60,7 @@ class Test7z (ArchiveTest):
|
|||
self.archive_test('t.rpm')
|
||||
self.archive_test('t.deb')
|
||||
self.archive_test('t.iso')
|
||||
self.archive_test('t.vhd')
|
||||
self.archive_create('t.txt.gz', check=Content.Singlefile)
|
||||
self.archive_create('t.txt.bz2', check=Content.Singlefile)
|
||||
|
||||
|
|
Binary file not shown.
|
@ -205,4 +205,5 @@ class TestMime (unittest.TestCase):
|
|||
self.mime_test_mimedb("t.iso", "application/x-iso9660-image")
|
||||
self.mime_test_mimedb("t.epub", "application/zip")
|
||||
self.mime_test_mimedb("t.apk", "application/zip")
|
||||
self.mime_test_mimedb("t.vhd", "application/x-vhd")
|
||||
self.mime_test_mimedb("t.zpaq", "application/zpaq")
|
||||
|
|
Loading…
Reference in New Issue