PyCatFile 0.10.4__tar.gz → 0.10.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyCatFile
3
- Version: 0.10.4
3
+ Version: 0.10.8
4
4
  Summary: A tar like file format name catfile after unix cat command (concatenate files) .
5
5
  Home-page: https://github.com/GameMaker2k/PyCatFile
6
6
  Download-URL: https://github.com/GameMaker2k/PyCatFile/archive/master.tar.gz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyCatFile
3
- Version: 0.10.4
3
+ Version: 0.10.8
4
4
  Summary: A tar like file format name catfile after unix cat command (concatenate files) .
5
5
  Home-page: https://github.com/GameMaker2k/PyCatFile
6
6
  Download-URL: https://github.com/GameMaker2k/PyCatFile/archive/master.tar.gz
@@ -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: 5/8/2024 Ver. 0.10.4 RC 1 - Author: cooldude2k $
17
+ $FileInfo: catfile.py - Last Update: 5/11/2024 Ver. 0.10.8 RC 1 - Author: cooldude2k $
18
18
  '''
19
19
 
20
20
  from __future__ import absolute_import, division, print_function, unicode_literals;
@@ -126,6 +126,7 @@ fnamesty = __use_new_style__;
126
126
  fnamelst = __use_advanced_list__;
127
127
  fnameino = __use_alt_inode__;
128
128
  fnamelist = [fname, fnamemagic, fnamelower, fnamelen, fnamehex, getargs.delimiter, getargs.formatver, fnamesty, fnamelst, fnameino];
129
+ fnamedict = {'format_name': fname, 'format_magic': fnamemagic, 'format_lower': fnamelower, 'format_len': fnamelen, 'format_hex': fnamehex, 'format_delimiter': getargs.delimiter, 'format_ver': getargs.formatver, 'new_style': fnamesty, 'use_advanced_list': fnamelst, 'use_alt_inode': fnameino};
129
130
 
130
131
  # Determine the primary action based on user input
131
132
  actions = ['create', 'extract', 'list', 'repack', 'validate'];
@@ -135,61 +136,61 @@ active_action = next((action for action in actions if getattr(getargs, action)),
135
136
  if active_action:
136
137
  if active_action=='create':
137
138
  if getargs.convert:
138
- checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamelist, True);
139
+ checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamedict, True);
139
140
  if(checkcompressfile=="catfile"):
140
- tmpout = pycatfile.RePackArchiveFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamelist, getargs.verbose, False);
141
+ tmpout = pycatfile.RePackArchiveFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamedict, getargs.verbose, False);
141
142
  else:
142
- tmpout = pycatfile.PackArchiveFileFromInFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamelist, getargs.verbose, False);
143
+ tmpout = pycatfile.PackArchiveFileFromInFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamedict, getargs.verbose, False);
143
144
  if(not tmpout):
144
145
  sys.exit(1);
145
146
  else:
146
- pycatfile.PackArchiveFile(getargs.input, getargs.output, getargs.text, getargs.compression, getargs.wholefile, getargs.level, False, getargs.checksum, [], fnamelist, getargs.verbose, False);
147
+ pycatfile.PackArchiveFile(getargs.input, getargs.output, getargs.text, getargs.compression, getargs.wholefile, getargs.level, False, getargs.checksum, [], fnamedict, getargs.verbose, False);
147
148
  elif active_action=='repack':
148
149
  if getargs.convert:
149
- checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamelist, True);
150
+ checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamedict, True);
150
151
  if(checkcompressfile=="catfile"):
151
- pycatfile.RePackArchiveFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamelist, getargs.verbose, False);
152
+ pycatfile.RePackArchiveFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamedict, getargs.verbose, False);
152
153
  else:
153
- pycatfile.PackArchiveFileFromInFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamelist, getargs.verbose, False);
154
+ pycatfile.PackArchiveFileFromInFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamedict, getargs.verbose, False);
154
155
  if(not tmpout):
155
156
  sys.exit(1);
156
157
  else:
157
- pycatfile.RePackArchiveFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamelist, getargs.verbose, False);
158
+ pycatfile.RePackArchiveFile(getargs.input, getargs.output, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamedict, getargs.verbose, False);
158
159
  elif active_action=='extract':
159
160
  if getargs.convert:
160
- checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamelist, True);
161
+ checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamedict, True);
161
162
  tempout = BytesIO();
162
163
  if(checkcompressfile=="catfile"):
163
- tmpout = pycatfile.RePackArchiveFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamelist, getargs.verbose, False);
164
+ tmpout = pycatfile.RePackArchiveFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamedict, getargs.verbose, False);
164
165
  else:
165
- tmpout = pycatfile.PackArchiveFileFromInFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamelist, getargs.verbose, False);
166
+ tmpout = pycatfile.PackArchiveFileFromInFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamedict, getargs.verbose, False);
166
167
  if(not tmpout):
167
168
  sys.exit(1);
168
169
  getargs.input = tempout;
169
- pycatfile.UnPackArchiveFile(getargs.input, getargs.output, False, 0, 0, getargs.skipchecksum, fnamelist, getargs.verbose, getargs.preserve, getargs.preserve, False);
170
+ pycatfile.UnPackArchiveFile(getargs.input, getargs.output, False, 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, getargs.preserve, getargs.preserve, False);
170
171
  elif active_action=='list':
171
172
  if getargs.convert:
172
- checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamelist, True);
173
+ checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamedict, True);
173
174
  if(checkcompressfile=="catfile"):
174
- tmpout = pycatfile.ArchiveFileListFiles(getargs.input, 0, 0, getargs.skipchecksum, fnamelist, getargs.verbose, False);
175
+ tmpout = pycatfile.ArchiveFileListFiles(getargs.input, 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, False);
175
176
  else:
176
- tmpout = pycatfile.InFileListFiles(getargs.input, getargs.verbose, fnamelist, False);
177
+ tmpout = pycatfile.InFileListFiles(getargs.input, getargs.verbose, fnamedict, False);
177
178
  if(not tmpout):
178
179
  sys.exit(1);
179
180
  else:
180
- pycatfile.ArchiveFileListFiles(getargs.input, 0, 0, getargs.skipchecksum, fnamelist, getargs.verbose, False);
181
+ pycatfile.ArchiveFileListFiles(getargs.input, 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, False);
181
182
  elif active_action=='validate':
182
183
  if getargs.convert:
183
- checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamelist, True);
184
+ checkcompressfile = pycatfile.CheckCompressionSubType(getargs.input, fnamedict, True);
184
185
  tempout = BytesIO();
185
186
  if(checkcompressfile=="catfile"):
186
- tmpout = pycatfile.RePackArchiveFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamelist, getargs.verbose, False);
187
+ tmpout = pycatfile.RePackArchiveFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, False, 0, 0, getargs.checksum, getargs.skipchecksum, [], fnamedict, getargs.verbose, False);
187
188
  else:
188
- tmpout = pycatfile.PackArchiveFileFromInFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamelist, getargs.verbose, False);
189
+ tmpout = pycatfile.PackArchiveFileFromInFile(getargs.input, tempout, getargs.compression, getargs.wholefile, getargs.level, getargs.checksum, [], fnamedict, getargs.verbose, False);
189
190
  getargs.input = tempout;
190
191
  if(not tmpout):
191
192
  sys.exit(1);
192
- fvalid = pycatfile.ArchiveFileValidate(getargs.input, fnamelist, getargs.verbose, False);
193
+ fvalid = pycatfile.ArchiveFileValidate(getargs.input, fnamedict, getargs.verbose, False);
193
194
  if(not getargs.verbose):
194
195
  import sys, logging;
195
196
  logging.basicConfig(format="%(message)s", stream=sys.stdout, level=logging.DEBUG);
@@ -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: 5/8/2024 Ver. 0.10.4 RC 1 - Author: cooldude2k $
17
+ $FileInfo: neocatfile.py - Last Update: 5/11/2024 Ver. 0.10.8 RC 1 - Author: cooldude2k $
18
18
  '''
19
19
 
20
20
  from __future__ import absolute_import, division, print_function, unicode_literals