Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Oct 21, 2022
1 parent f41333b commit 3acb6c5
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 50 deletions.
9 changes: 5 additions & 4 deletions catfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
argparser.add_argument("-r", "--repack", action="store_true", help="reconcatenate files only fixing checksum errors");
argparser.add_argument("-o", "--output", default=None, help="extract concatenate files to or concatenate output name");
argparser.add_argument("-compression", "--compression", default="auto", help="concatenate files with compression");
argparser.add_argument("-level", "--level", default="auto", help="concatenate files with compression level");
argparser.add_argument("-t", "--converttar", action="store_true", help="convert tar file to catfile");
argparser.add_argument("-z", "--convertzip", action="store_true", help="convert tar file to catfile");
argparser.add_argument("-T", "--text", action="store_true", help="read file locations from text file");
Expand Down Expand Up @@ -118,13 +119,13 @@
logging.basicConfig(format="%(message)s", stream=sys.stdout, level=logging.DEBUG);
if(should_create and not should_extract and not should_list and not should_repack):
if(should_convert_tar):
pycatfile.PackCatFileFromTarFile(getargs.input, getargs.output, getargs.compression, getargs.checksum, getargs.verbose, False);
pycatfile.PackCatFileFromTarFile(getargs.input, getargs.output, getargs.compression, getargs.level, getargs.checksum, getargs.verbose, False);
elif(should_convert_zip and not should_convert_tar):
pycatfile.PackCatFileFromZipFile(getargs.input, getargs.output, getargs.compression, getargs.checksum, getargs.verbose, False);
pycatfile.PackCatFileFromZipFile(getargs.input, getargs.output, getargs.compression, getargs.level, getargs.checksum, getargs.verbose, False);
else:
pycatfile.PackCatFile(getargs.input, getargs.output, getargs.text, getargs.compression, False, getargs.checksum, getargs.verbose, False);
pycatfile.PackCatFile(getargs.input, getargs.output, getargs.text, getargs.compression, getargs.level, False, getargs.checksum, getargs.verbose, False);
if(should_create and not should_extract and not should_list and should_repack):
pycatfile.RePackCatFile(getargs.input, getargs.output, 0, 0, getargs.compression, False, getargs.checksum, False, getargs.verbose, False);
pycatfile.RePackCatFile(getargs.input, getargs.output, 0, 0, getargs.compression, getargs.level, False, getargs.checksum, False, getargs.verbose, False);
if(not should_create and should_extract and not should_list):
pycatfile.UnPackCatFile(getargs.input, getargs.output, False, False, getargs.verbose, False);
if(not should_create and not should_extract and should_list):
Expand Down
Loading

0 comments on commit 3acb6c5

Please sign in to comment.