PyCatFile 0.17.4__tar.gz → 0.18.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pycatfile-0.18.2/PKG-INFO +22 -0
- pycatfile-0.18.2/PyCatFile.egg-info/PKG-INFO +22 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/PyCatFile.egg-info/SOURCES.txt +1 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/catfile.py +21 -23
- {pycatfile-0.17.4 → pycatfile-0.18.2}/neocatfile.py +11 -11
- {pycatfile-0.17.4 → pycatfile-0.18.2}/pycatfile.py +1430 -2620
- pycatfile-0.18.2/pyproject.toml +11 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/setup.py +21 -1
- pycatfile-0.17.4/PKG-INFO +0 -47
- pycatfile-0.17.4/PyCatFile.egg-info/PKG-INFO +0 -47
- {pycatfile-0.17.4 → pycatfile-0.18.2}/LICENSE +0 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/PyCatFile.egg-info/dependency_links.txt +0 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/PyCatFile.egg-info/top_level.txt +0 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/PyCatFile.egg-info/zip-safe +0 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/README.md +0 -0
- {pycatfile-0.17.4 → pycatfile-0.18.2}/setup.cfg +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: PyCatFile
|
|
3
|
+
Version: 0.18.2
|
|
4
|
+
Summary: A tar like file format name catfile after unix cat command (concatenate files) .
|
|
5
|
+
Home-page: https://github.com/GameMaker2k/PyCatFile
|
|
6
|
+
Download-URL: https://github.com/GameMaker2k/PyCatFile/archive/master.tar.gz
|
|
7
|
+
Author: Kazuki Przyborowski
|
|
8
|
+
Author-email: Kazuki Przyborowski <kazuki.przyborowski@gmail.com>
|
|
9
|
+
Maintainer: Kazuki Przyborowski
|
|
10
|
+
Maintainer-email: kazuki.przyborowski@gmail.com
|
|
11
|
+
License: BSD-3-Clause
|
|
12
|
+
Platform: OS Independent
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: download-url
|
|
17
|
+
Dynamic: home-page
|
|
18
|
+
Dynamic: maintainer
|
|
19
|
+
Dynamic: maintainer-email
|
|
20
|
+
Dynamic: platform
|
|
21
|
+
|
|
22
|
+
A tar like file format name catfile after unix cat command (concatenate files)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: PyCatFile
|
|
3
|
+
Version: 0.18.2
|
|
4
|
+
Summary: A tar like file format name catfile after unix cat command (concatenate files) .
|
|
5
|
+
Home-page: https://github.com/GameMaker2k/PyCatFile
|
|
6
|
+
Download-URL: https://github.com/GameMaker2k/PyCatFile/archive/master.tar.gz
|
|
7
|
+
Author: Kazuki Przyborowski
|
|
8
|
+
Author-email: Kazuki Przyborowski <kazuki.przyborowski@gmail.com>
|
|
9
|
+
Maintainer: Kazuki Przyborowski
|
|
10
|
+
Maintainer-email: kazuki.przyborowski@gmail.com
|
|
11
|
+
License: BSD-3-Clause
|
|
12
|
+
Platform: OS Independent
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: download-url
|
|
17
|
+
Dynamic: home-page
|
|
18
|
+
Dynamic: maintainer
|
|
19
|
+
Dynamic: maintainer-email
|
|
20
|
+
Dynamic: platform
|
|
21
|
+
|
|
22
|
+
A tar like file format name catfile after unix cat command (concatenate files)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
Copyright 2018-2024 Game Maker 2k - http://intdb.sourceforge.net/
|
|
15
15
|
Copyright 2018-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
|
|
16
16
|
|
|
17
|
-
$FileInfo: catfile.py - Last Update:
|
|
17
|
+
$FileInfo: catfile.py - Last Update: 2/7/2025 Ver. 0.18.2 RC 1 - Author: cooldude2k $
|
|
18
18
|
'''
|
|
19
19
|
|
|
20
20
|
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
|
|
@@ -73,7 +73,6 @@ else:
|
|
|
73
73
|
__project__ = pycatfile.__project__
|
|
74
74
|
__program_name__ = pycatfile.__program_name__
|
|
75
75
|
__file_format_name__ = pycatfile.__file_format_name__
|
|
76
|
-
__file_format_lower__ = pycatfile.__file_format_lower__
|
|
77
76
|
__file_format_magic__ = pycatfile.__file_format_magic__
|
|
78
77
|
__file_format_len__ = pycatfile.__file_format_len__
|
|
79
78
|
__file_format_hex__ = pycatfile.__file_format_hex__
|
|
@@ -147,7 +146,6 @@ argparser.add_argument("-T", "--text", action="store_true",
|
|
|
147
146
|
getargs = argparser.parse_args()
|
|
148
147
|
|
|
149
148
|
fname = getargs.format
|
|
150
|
-
fnamelower = fname.lower()
|
|
151
149
|
if(getargs.format=="auto"):
|
|
152
150
|
fnamedict = __file_format_multi_dict__
|
|
153
151
|
__file_format_default__ = getargs.format
|
|
@@ -159,7 +157,7 @@ else:
|
|
|
159
157
|
fnamesty = __use_new_style__
|
|
160
158
|
fnamelst = __use_advanced_list__
|
|
161
159
|
fnameino = __use_alt_inode__
|
|
162
|
-
fnamedict = {'format_name': fname, 'format_magic': fnamemagic, '
|
|
160
|
+
fnamedict = {'format_name': fname, 'format_magic': fnamemagic, 'format_len': fnamelen, 'format_hex': fnamehex,
|
|
163
161
|
'format_delimiter': getargs.delimiter, 'format_ver': getargs.formatver, 'new_style': fnamesty, 'use_advanced_list': fnamelst, 'use_alt_inode': fnameino}
|
|
164
162
|
|
|
165
163
|
# Determine the primary action based on user input
|
|
@@ -175,69 +173,69 @@ if active_action:
|
|
|
175
173
|
checkcompressfile = pycatfile.CheckCompressionSubType(
|
|
176
174
|
input_file, fnamedict, True)
|
|
177
175
|
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
|
|
178
|
-
tmpout = pycatfile.
|
|
176
|
+
tmpout = pycatfile.RePackCatFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
|
|
179
177
|
else:
|
|
180
|
-
tmpout = pycatfile.
|
|
181
|
-
input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], fnamedict, getargs.verbose, False)
|
|
178
|
+
tmpout = pycatfile.PackCatFileFromInFile(
|
|
179
|
+
input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.verbose, False)
|
|
182
180
|
if(not tmpout):
|
|
183
181
|
sys.exit(1)
|
|
184
182
|
else:
|
|
185
|
-
pycatfile.
|
|
183
|
+
pycatfile.PackCatFile(getargs.input, getargs.output, getargs.text, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, False, [getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.verbose, False)
|
|
186
184
|
elif active_action == 'repack':
|
|
187
185
|
if getargs.convert:
|
|
188
186
|
checkcompressfile = pycatfile.CheckCompressionSubType(
|
|
189
187
|
input_file, fnamedict, True)
|
|
190
188
|
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
|
|
191
|
-
pycatfile.
|
|
192
|
-
False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], fnamedict, getargs.verbose, False)
|
|
189
|
+
pycatfile.RePackCatFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt,
|
|
190
|
+
False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
|
|
193
191
|
else:
|
|
194
|
-
pycatfile.
|
|
192
|
+
pycatfile.PackCatFileFromInFile(input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.verbose, False)
|
|
195
193
|
if(not tmpout):
|
|
196
194
|
sys.exit(1)
|
|
197
195
|
else:
|
|
198
|
-
pycatfile.
|
|
199
|
-
False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], fnamedict, getargs.verbose, False)
|
|
196
|
+
pycatfile.RePackCatFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt,
|
|
197
|
+
False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
|
|
200
198
|
elif active_action == 'extract':
|
|
201
199
|
if getargs.convert:
|
|
202
200
|
checkcompressfile = pycatfile.CheckCompressionSubType(
|
|
203
201
|
input_file, fnamedict, True)
|
|
204
202
|
tempout = BytesIO()
|
|
205
203
|
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
|
|
206
|
-
tmpout = pycatfile.
|
|
204
|
+
tmpout = pycatfile.RePackCatFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False)
|
|
207
205
|
else:
|
|
208
|
-
tmpout = pycatfile.
|
|
209
|
-
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], fnamedict, False, False)
|
|
206
|
+
tmpout = pycatfile.PackCatFileFromInFile(
|
|
207
|
+
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, False, False)
|
|
210
208
|
if(not tmpout):
|
|
211
209
|
sys.exit(1)
|
|
212
210
|
input_file = tempout
|
|
213
|
-
pycatfile.
|
|
211
|
+
pycatfile.UnPackCatFile(input_file, getargs.output, False, 0, 0, getargs.skipchecksum,
|
|
214
212
|
fnamedict, getargs.verbose, getargs.preserve, getargs.preserve, False)
|
|
215
213
|
elif active_action == 'list':
|
|
216
214
|
if getargs.convert:
|
|
217
215
|
checkcompressfile = pycatfile.CheckCompressionSubType(
|
|
218
216
|
input_file, fnamedict, True)
|
|
219
217
|
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
|
|
220
|
-
tmpout = pycatfile.
|
|
218
|
+
tmpout = pycatfile.CatFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, False)
|
|
221
219
|
else:
|
|
222
220
|
tmpout = pycatfile.InFileListFiles(input_file, getargs.verbose, fnamedict, False)
|
|
223
221
|
if(not tmpout):
|
|
224
222
|
sys.exit(1)
|
|
225
223
|
else:
|
|
226
|
-
pycatfile.
|
|
224
|
+
pycatfile.CatFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, False)
|
|
227
225
|
elif active_action == 'validate':
|
|
228
226
|
if getargs.convert:
|
|
229
227
|
checkcompressfile = pycatfile.CheckCompressionSubType(
|
|
230
228
|
input_file, fnamedict, True)
|
|
231
229
|
tempout = BytesIO()
|
|
232
230
|
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
|
|
233
|
-
tmpout = pycatfile.
|
|
231
|
+
tmpout = pycatfile.RePackCatFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False)
|
|
234
232
|
else:
|
|
235
|
-
tmpout = pycatfile.
|
|
236
|
-
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], fnamedict, False, False)
|
|
233
|
+
tmpout = pycatfile.PackCatFileFromInFile(
|
|
234
|
+
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, False, False)
|
|
237
235
|
input_file = tempout
|
|
238
236
|
if(not tmpout):
|
|
239
237
|
sys.exit(1)
|
|
240
|
-
fvalid = pycatfile.
|
|
238
|
+
fvalid = pycatfile.CatFileValidate(
|
|
241
239
|
input_file, "auto", fnamedict, getargs.verbose, False)
|
|
242
240
|
if(not getargs.verbose):
|
|
243
241
|
import sys
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
Copyright 2018-2024 Game Maker 2k - http://intdb.sourceforge.net/
|
|
15
15
|
Copyright 2018-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
|
|
16
16
|
|
|
17
|
-
$FileInfo: neocatfile.py - Last Update:
|
|
17
|
+
$FileInfo: neocatfile.py - Last Update: 2/7/2025 Ver. 0.18.2 RC 1 - Author: cooldude2k $
|
|
18
18
|
'''
|
|
19
19
|
|
|
20
20
|
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
|
|
@@ -99,25 +99,25 @@ input_file = args.input[0]
|
|
|
99
99
|
# Functionality mappings
|
|
100
100
|
if primary_action == 'create':
|
|
101
101
|
if args.convert == 'tar':
|
|
102
|
-
pycatfile.
|
|
102
|
+
pycatfile.PackCatFileFromTarFile(input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], [
|
|
103
103
|
], pycatfile.__file_format_dict__, args.verbose, False)
|
|
104
104
|
elif args.convert == 'zip':
|
|
105
|
-
pycatfile.
|
|
105
|
+
pycatfile.PackCatFileFromZipFile(input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], [
|
|
106
106
|
], pycatfile.__file_format_dict__, args.verbose, False)
|
|
107
107
|
elif py7zr_support and args.convert == '7zip':
|
|
108
|
-
pycatfile.
|
|
108
|
+
pycatfile.PackCatFileFromSevenZipFile(input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], [
|
|
109
109
|
], pycatfile.__file_format_dict__, args.verbose, False)
|
|
110
110
|
elif rarfile_support and args.convert == 'rar':
|
|
111
|
-
pycatfile.
|
|
111
|
+
pycatfile.PackCatFileFromRarFile(input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], [
|
|
112
112
|
], pycatfile.__file_format_dict__, args.verbose, False)
|
|
113
113
|
else:
|
|
114
|
-
pycatfile.
|
|
115
|
-
False, [args.checksum, args.checksum, args.checksum], [], pycatfile.__file_format_dict__, args.verbose, False)
|
|
114
|
+
pycatfile.PackCatFile(args.input, args.output, args.verbose, args.compression, args.level, pycatfile.compressionlistalt,
|
|
115
|
+
False, [args.checksum, args.checksum, args.checksum], [], {}, pycatfile.__file_format_dict__, args.verbose, False)
|
|
116
116
|
elif primary_action == 'repack':
|
|
117
|
-
pycatfile.
|
|
117
|
+
pycatfile.RePackCatFile(
|
|
118
118
|
input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], args.verbose)
|
|
119
119
|
elif primary_action == 'extract':
|
|
120
|
-
pycatfile.
|
|
120
|
+
pycatfile.UnPackCatFile(
|
|
121
121
|
input_file, args.output, args.verbose, args.preserve)
|
|
122
122
|
elif primary_action == 'list':
|
|
123
123
|
if args.convert == 'tar':
|
|
@@ -129,9 +129,9 @@ elif primary_action == 'list':
|
|
|
129
129
|
elif rarfile_support and args.convert == 'rar':
|
|
130
130
|
pycatfile.RarFileListFiles(input_file, verbose=args.verbose)
|
|
131
131
|
else:
|
|
132
|
-
pycatfile.
|
|
132
|
+
pycatfile.CatFileListFiles(input_file, verbose=args.verbose)
|
|
133
133
|
elif primary_action == 'validate':
|
|
134
|
-
is_valid = pycatfile.
|
|
134
|
+
is_valid = pycatfile.CatFileValidate(input_file, verbose=args.verbose)
|
|
135
135
|
result_msg = "Validation result for {0}: {1}".format(
|
|
136
136
|
input_file, 'Valid' if is_valid else 'Invalid')
|
|
137
137
|
print(result_msg)
|