PyCatFile 0.7.6__tar.gz → 0.8.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyCatFile
3
- Version: 0.7.6
3
+ Version: 0.8.2
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.7.6
3
+ Version: 0.8.2
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: 4/10/2024 Ver. 0.7.6 RC 1 - Author: cooldude2k $
17
+ $FileInfo: catfile.py - Last Update: 4/24/2024 Ver. 0.8.2 RC 1 - Author: cooldude2k $
18
18
  '''
19
19
 
20
20
  from __future__ import absolute_import, division, print_function, unicode_literals;
@@ -43,38 +43,37 @@ __version__ = pycatfile.__version__;
43
43
 
44
44
  argparser = argparse.ArgumentParser(description="Manipulate concatenated files.", conflict_handler="resolve", add_help=True);
45
45
  argparser.add_argument("-V", "--version", action="version", version=__program_name__ + " " + __version__);
46
- argparser.add_argument("-i", "-f", "--input", help="Specify the file(s) to concatenate or the concatenated file to extract.", required=True);
47
- argparser.add_argument("-d", "-v", "--verbose", action="store_true", help="Enable verbose mode to display various debugging information.");
46
+ argparser.add_argument("-i", "--input", help="Specify the file(s) to concatenate or the concatenated file to extract.", required=True);
47
+ argparser.add_argument("-d", "--verbose", action="store_true", help="Enable verbose mode to display various debugging information.");
48
48
  argparser.add_argument("-c", "--create", action="store_true", help="Perform concatenation operation only.");
49
- argparser.add_argument("-I", "-validate", "--validate", action="store_true", help="Validate CatFile checksums");
50
- argparser.add_argument("-C", "-checksum", "--checksum", default="crc32", help="Specify the type of checksum to use. Default is crc32.");
51
- argparser.add_argument("-S", "-skipchecksum", "--skipchecksum", action="store_true", help="Skip checksum check of files.");
52
- argparser.add_argument("-e", "-x", "--extract", action="store_true", help="Perform extraction operation only.");
53
- argparser.add_argument("-F", "-format", "--format", default=__file_format_list__[0], help="Specify the format to use");
54
- argparser.add_argument("-D", "-delimiter", "--delimiter", default=__file_format_list__[5], help="Specify the format to use");
55
- argparser.add_argument("-m", "-formatver", "--formatver", default=__file_format_list__[6], help="Specify the format version");
56
- argparser.add_argument("-l", "-t", "--list", action="store_true", help="List files included in the concatenated file.");
57
- argparser.add_argument("-p", "-preserve", "--preserve", action="store_false", help="Preserve permissions and time of files");
58
- argparser.add_argument("-R", "-repack", "--repack", action="store_true", help="Re-concatenate files, fixing checksum errors if any.");
59
- argparser.add_argument("-o", "--output", default=None, help="Specify the name for the extracted concatenated files or the output concatenated file.");
60
- argparser.add_argument("-P", "-compression", "--compression", default="auto", help="Specify the compression method to use for concatenation.");
61
- argparser.add_argument("-L", "-level", "--level", default=None, help="Specify the compression level for concatenation.");
62
- argparser.add_argument("-t", "-tar", "--converttar", action="store_true", help="Convert a tar file to a catfile.");
63
- argparser.add_argument("-z", "-zip", "--convertzip", action="store_true", help="Convert a zip file to a catfile.");
64
- argparser.add_argument("-r", "-rar", "--convertrar", action="store_true", help="Convert a rar file to a catfile.");
49
+ argparser.add_argument("-v", "--validate", action="store_true", help="Validate CatFile checksums.");
50
+ argparser.add_argument("-C", "--checksum", default="crc32", help="Specify the type of checksum to use. The default is crc32.");
51
+ argparser.add_argument("-s", "--skipchecksum", action="store_true", help="Skip the checksum check of files.");
52
+ argparser.add_argument("-e", "--extract", action="store_true", help="Perform extraction operation only.");
53
+ argparser.add_argument("-F", "--format", default=__file_format_list__[0], help="Specify the format to use.");
54
+ argparser.add_argument("-D", "--delimiter", default=__file_format_list__[5], help="Specify the delimiter to use.");
55
+ argparser.add_argument("-m", "--formatver", default=__file_format_list__[6], help="Specify the format version.");
56
+ argparser.add_argument("-l", "--list", action="store_true", help="List files included in the concatenated file.");
57
+ argparser.add_argument("-p", "--preserve", action="store_false", help="Preserve permissions and timestamps of files.");
58
+ argparser.add_argument("-R", "--repack", action="store_true", help="Re-concatenate files, fixing checksum errors, if any.");
59
+ argparser.add_argument("-o", "--output", default=None, help="Specify the name for the extracted or output concatenated files.");
60
+ argparser.add_argument("-P", "--compression", default="auto", help="Specify the compression method to use for concatenation.");
61
+ argparser.add_argument("-L", "--level", default=None, help="Specify the compression level for concatenation.");
62
+ argparser.add_argument("-t", "--converttar", action="store_true", help="Convert a tar file to a CatFile.");
63
+ argparser.add_argument("-z", "--convertzip", action="store_true", help="Convert a zip file to a CatFile.");
64
+ argparser.add_argument("-r", "--convertrar", action="store_true", help="Convert a rar file to a CatFile.");
65
65
  argparser.add_argument("-T", "--text", action="store_true", help="Read file locations from a text file.");
66
- getargs = argparser.parse_args();
66
+ getargs = argparser.parse_args()
67
67
 
68
68
  fname = getargs.format;
69
69
  fnamelower = fname.lower();
70
70
  fnamemagic = fname;
71
71
  fnamelen = len(fname);
72
72
  fnamehex = binascii.hexlify(fname.encode("UTF-8")).decode("UTF-8");
73
- fnamever = getargs.formatver;
74
73
  fnamesty = __use_new_style__;
75
74
  fnamelst = __use_advanced_list__;
76
75
  fnameino = __use_alt_inode__;
77
- fnamelist = [fname, fnamemagic, fnamelower, fnamelen, fnamehex, getargs.delimiter, fnamever, fnamesty, fnamelst, fnameino];
76
+ fnamelist = [fname, fnamemagic, fnamelower, fnamelen, fnamehex, getargs.delimiter, getargs.formatver, fnamesty, fnamelst, fnameino];
78
77
 
79
78
  # Determine actions based on user input
80
79
  should_create = getargs.create and not getargs.extract and not getargs.list;
@@ -112,6 +111,9 @@ elif should_list:
112
111
 
113
112
  elif should_validate:
114
113
  fvalid = pycatfile.ArchiveFileValidate(getargs.input, fnamelist, getargs.verbose, False);
114
+ if(not getargs.verbose):
115
+ import sys, logging;
116
+ logging.basicConfig(format="%(message)s", stream=sys.stdout, level=logging.DEBUG);
115
117
  if(fvalid):
116
118
  pycatfile.VerbosePrintOut("File is valid: \n" + str(getargs.input));
117
119
  else:
@@ -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: 4/10/2024 Ver. 0.7.6 RC 1 - Author: cooldude2k $
17
+ $FileInfo: neocatfile.py - Last Update: 4/24/2024 Ver. 0.8.2 RC 1 - Author: cooldude2k $
18
18
  '''
19
19
 
20
20
  from __future__ import absolute_import, division, print_function, unicode_literals