Skip to content

Commit 5985e2e

Browse files
author
Kazuki Suzuki Przyborowski
committed
Small update
1 parent 814aa91 commit 5985e2e

2 files changed

Lines changed: 45 additions & 8 deletions

File tree

catfile.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ver": "001",
1111
"name": "CatFile",
1212
"magic": "CatFile",
13-
"delimiter": "\x00",
13+
"delimiter": "\u0000",
1414
"extension": ".cat",
1515
"newstyle": "true",
1616
"advancedlist": "true",
@@ -22,7 +22,7 @@
2222
"ver": "001",
2323
"name": "NekoFile",
2424
"magic": "NekoFile",
25-
"delimiter": "\x00",
25+
"delimiter": "\u0000",
2626
"extension": ".neko",
2727
"newstyle": "true",
2828
"advancedlist": "true",
@@ -34,7 +34,7 @@
3434
"ver": "001",
3535
"name": "NekoFairu",
3636
"magic": "ねこファイル",
37-
"delimiter": "\x00",
37+
"delimiter": "\u0000",
3838
"extension": ".ねこ",
3939
"newstyle": "true",
4040
"advancedlist": "true",
@@ -46,7 +46,7 @@
4646
"ver": "001",
4747
"name": "NekoFairu",
4848
"magic": "ネコファイル",
49-
"delimiter": "\x00",
49+
"delimiter": "\u0000",
5050
"extension": ".ネコ",
5151
"newstyle": "true",
5252
"advancedlist": "true",
@@ -58,7 +58,7 @@
5858
"ver": "001",
5959
"name": "NekoPa-il",
6060
"magic": "네코파일",
61-
"delimiter": "\x00",
61+
"delimiter": "\u0000",
6262
"extension": ".네코",
6363
"newstyle": "true",
6464
"advancedlist": "true",
@@ -70,7 +70,7 @@
7070
"ver": "001",
7171
"name": "GoyangiPa-il",
7272
"magic": "고양이파일",
73-
"delimiter": "\x00",
73+
"delimiter": "\u0000",
7474
"extension": ".고양이",
7575
"newstyle": "true",
7676
"advancedlist": "true",
@@ -82,7 +82,7 @@
8282
"ver": "001",
8383
"name": "NeiKuFaYiLu",
8484
"magic": "内酷法伊鲁",
85-
"delimiter": "\x00",
85+
"delimiter": "\u0000",
8686
"extension": ".内酷",
8787
"newstyle": "true",
8888
"advancedlist": "true",
@@ -94,7 +94,7 @@
9494
"ver": "001",
9595
"name": "MaoWenjian",
9696
"magic": "猫文件",
97-
"delimiter": "\x00",
97+
"delimiter": "\u0000",
9898
"extension": ".猫",
9999
"newstyle": "true",
100100
"advancedlist": "true",

pycatfile.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9215,6 +9215,43 @@ def ListDirListFiles(infiles, dirlistfromtxt=False, compression="auto", compress
92159215
outarray, seekstart, seekend, skipchecksum, formatspecs, seektoend, verbose, returnfp)
92169216
return listarchivefiles
92179217

9218+
"""
9219+
PyNeoFile compatibility layer
9220+
"""
9221+
9222+
def make_empty_file_pointer_neo(fp, fmttype=None, checksumtype='crc32', formatspecs=None, encoding='UTF-8'):
9223+
return MakeEmptyFilePointer(fp, fmttype, checksumtype, formatspecs)
9224+
9225+
def make_empty_archive_file_pointer_neo(fp, fmttype=None, checksumtype='crc32', formatspecs=None, encoding='UTF-8'):
9226+
return make_empty_file_pointer_neo(fp, fmttype, checksumtype, formatspecs, encoding)
9227+
9228+
def make_empty_file_neo(outfile=None, fmttype=None, checksumtype='crc32', formatspecs=None, encoding='UTF-8', returnfp=False):
9229+
return MakeEmptyFile(outfile, fmttype, "auto", False, None, checksumtype, formatspecs, returnfp)
9230+
9231+
def make_empty_archive_file_neo(outfile=None, fmttype=None, checksumtype='crc32', formatspecs=None, encoding='UTF-8', returnfp=False):
9232+
return make_empty_file_neo(outfile, fmttype, checksumtype, formatspecs, encoding, returnfp)
9233+
9234+
def pack_neo(infiles, outfile=None, formatspecs=None, checksumtypes=["crc32", "crc32", "crc32", "crc32"], encoding="UTF-8", compression="auto", compression_level=None, returnfp=False):
9235+
return PackCatFile(infiles, outfile, False, "auto", compression, False, compression_level, compressionlistalt, False, checksumtypes, [], {}, formatspecs, False, returnfp)
9236+
9237+
def archive_to_array_neo(infile, formatspecs=None, listonly=False, skipchecksum=False, uncompress=True, returnfp=False):
9238+
return CatFileToArray(infile, "auto", 0, 0, listonly, True, uncompress, skipchecksum, formatspecs, False, returnfp)
9239+
9240+
def unpack_neo(infile, outdir='.', formatspecs=None, skipchecksum=False, uncompress=True, returnfp=False):
9241+
return UnPackCatFile(infile, outdir, False, 0, 0, skipchecksum, formatspecs, True, True, False, False, returnfp)
9242+
9243+
def repack_neo(infile, outfile=None, formatspecs=None, checksumtypes=["crc32", "crc32", "crc32", "crc32"], compression="auto", compression_level=None, returnfp=False):
9244+
return RePackCatFile(infile, outfile, "auto", compression, False, compression_level, compressionlistalt, False, 0, 0, checksumtypes, False, [], {}, formatspecs, False, False, returnfp)
9245+
9246+
def archivefilevalidate_neo(infile, formatspecs=None, verbose=False, return_details=False, returnfp=False):
9247+
return CatFileValidate(infile, "auto", formatspecs, False, verbose, returnfp)
9248+
9249+
def archivefilelistfiles_neo(infile, formatspecs=None, advanced=False, include_dirs=True, returnfp=False):
9250+
return CatFileListFiles(infile, "auto", 0, 0, False, formatspecs, False, True, advanced, returnfp)
9251+
9252+
def convert_foreign_to_neo(infile, outfile=None, formatspecs=None, checksumtypes=["crc32", "crc32", "crc32", "crc32"], compression="auto", compression_level=None, returnfp=False):
9253+
intmp = InFileToArray(infile, 0, 0, False, True, False, formatspecs, False, False)
9254+
return RePackCatFile(intmp, outfile, "auto", compression, False, compression_level, compressionlistalt, False, 0, 0, checksumtypes, False, [], {}, formatspecs, False, False, returnfp)
92189255

92199256
def download_file_from_ftp_file(url):
92209257
urlparts = urlparse(url)

0 commit comments

Comments
 (0)