From 11499c4409c6881480c71085b7084f787ce5c774 Mon Sep 17 00:00:00 2001 From: Kazuki Suzuki Przyborowski Date: Wed, 12 Jun 2024 13:10:12 -0500 Subject: [PATCH] Add files via upload --- pycatfile.py | 55 +++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/pycatfile.py b/pycatfile.py index dd64864..f7b4e5e 100755 --- a/pycatfile.py +++ b/pycatfile.py @@ -157,34 +157,37 @@ from StringIO import StringIO as BytesIO; __use_pysftp__ = False; +__use_alt_format__ = False; if(not havepysftp): __use_pysftp__ = False; -__file_format_name__ = "CatFile"; -__program_name__ = "Py"+__file_format_name__; -__file_format_lower__ = __file_format_name__.lower(); -__file_format_magic__ = __file_format_name__; -__file_format_len__ = len(__file_format_magic__); -__file_format_hex__ = binascii.hexlify(__file_format_magic__.encode("UTF-8")).decode("UTF-8"); -__file_format_delimiter__ = "\x00"; -__file_format_ver__ = "001"; -__use_new_style__ = True; -__use_advanced_list__ = True; -__use_alt_inode__ = False; -__file_format_extension__ = ".cat"; -''' -__file_format_name__ = "FastArchive"; -__program_name__ = "Py" + __file_format_name__; -__file_format_lower__ = __file_format_name__.lower(); -__file_format_magic__ = "FstArch"; -__file_format_len__ = len(__file_format_magic__); -__file_format_hex__ = binascii.hexlify(__file_format_magic__.encode("UTF-8")).decode("UTF-8"); -__file_format_delimiter__ = "\x1F"; # Using a non-printable ASCII character as delimiter -__file_format_ver__ = "001"; -__use_new_style__ = True; -__use_advanced_list__ = False; -__use_alt_inode__ = False; -__file_format_extension__ = ".fast"; -''' +if(not __use_alt_format__): + ''' Format Info by Kazuki Przyborowski ''' + __file_format_name__ = "CatFile"; + __program_name__ = "Py"+__file_format_name__; + __file_format_lower__ = __file_format_name__.lower(); + __file_format_magic__ = __file_format_name__; + __file_format_len__ = len(__file_format_magic__); + __file_format_hex__ = binascii.hexlify(__file_format_magic__.encode("UTF-8")).decode("UTF-8"); + __file_format_delimiter__ = "\x00"; + __file_format_ver__ = "001"; + __use_new_style__ = True; + __use_advanced_list__ = True; + __use_alt_inode__ = False; + __file_format_extension__ = ".cat"; +else: + ''' Format Info Generated by ChatGPT ''' + __file_format_name__ = "FastArchive"; + __program_name__ = "Py" + __file_format_name__; + __file_format_lower__ = __file_format_name__.lower(); + __file_format_magic__ = "FstArch"; + __file_format_len__ = len(__file_format_magic__); + __file_format_hex__ = binascii.hexlify(__file_format_magic__.encode("UTF-8")).decode("UTF-8"); + __file_format_delimiter__ = "\x1F"; # Using a non-printable ASCII character as delimiter + __file_format_ver__ = "001"; + __use_new_style__ = True; + __use_advanced_list__ = False; + __use_alt_inode__ = False; + __file_format_extension__ = ".fast"; __file_format_list__ = [__file_format_name__, __file_format_magic__, __file_format_lower__, __file_format_len__, __file_format_hex__, __file_format_delimiter__, __file_format_ver__, __use_new_style__, __use_advanced_list__, __use_alt_inode__]; __file_format_dict__ = {'format_name': __file_format_name__, 'format_magic': __file_format_magic__, 'format_lower': __file_format_lower__, 'format_len': __file_format_len__, 'format_hex': __file_format_hex__, 'format_delimiter': __file_format_delimiter__, 'format_ver': __file_format_ver__, 'new_style': __use_new_style__, 'use_advanced_list': __use_advanced_list__, 'use_alt_inode': __use_alt_inode__}; __project__ = __program_name__;