@@ -284,6 +284,7 @@ def get_default_threads():
284284 __use_http_lib__ = "urllib"
285285__file_format_multi_dict__ = {}
286286__file_format_default__ = "CatFile"
287+ __include_defaults__ = True
287288__program_name__ = "Py" + __file_format_default__
288289if os .path .exists (__config_file__ ) and __use_ini_file__ :
289290 config = configparser .ConfigParser ()
@@ -295,6 +296,7 @@ def decode_unicode_escape(value):
295296 return bytes (value , 'UTF-8' ).decode ('unicode_escape' )
296297 __file_format_default__ = decode_unicode_escape (config .get ('config' , 'default' ))
297298 __program_name__ = decode_unicode_escape (config .get ('config' , 'proname' ))
299+ __include_defaults__ = config .getboolean ('config' , 'includedef' )
298300 # Loop through all sections
299301 for section in config .sections ():
300302 required_keys = [
@@ -304,16 +306,17 @@ def decode_unicode_escape(value):
304306 ]
305307 if all (key in config [section ] for key in required_keys ):
306308 __file_format_multi_dict__ .update ({decode_unicode_escape (config .get (section , 'magic' )): {'format_name' : decode_unicode_escape (config .get (section , 'name' )), 'format_magic' : decode_unicode_escape (config .get (section , 'magic' )), 'format_lower' : decode_unicode_escape (config .get (section , 'lower' )), 'format_len' : config .getint (section , 'len' ), 'format_hex' : config .get (section , 'hex' ), 'format_delimiter' : decode_unicode_escape (config .get (section , 'delimiter' )), 'format_ver' : config .get (section , 'ver' ), 'new_style' : config .getboolean (section , 'newstyle' ), 'use_advanced_list' : config .getboolean (section , 'advancedlist' ), 'use_alt_inode' : config .getboolean (section , 'altinode' ), 'format_extension' : decode_unicode_escape (config .get (section , 'extension' )) } } )
307- if ("CatFile" not in __file_format_multi_dict__ ):
308- __file_format_multi_dict__ .update ({'CatFile' : {'format_name' : "CatFile" , 'format_magic' : "CatFile" , 'format_lower' : "catfile" , 'format_len' : 7 , 'format_hex' : "43617446696c65" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".cat" } } )
309- if ("NekoFile" not in __file_format_multi_dict__ ):
310- __file_format_multi_dict__ .update ({'NekoFile' : {'format_name' : "NekoFile" , 'format_magic' : "NekoFile" , 'format_lower' : "nekofile" , 'format_len' : 8 , 'format_hex' : "4e656b6f46696c65" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".neko" } } )
311- if ("ねこファイル" not in __file_format_multi_dict__ ):
312- __file_format_multi_dict__ .update ({'ねこファイル' : {'format_name' : "NekoFile" , 'format_magic' : "ねこファイル" , 'format_lower' : "nekofile" , 'format_len' : 21 , 'format_hex' : "e381ade38193e38395e382a1e382a4e383abe" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".ねこ" } } )
313- if ("네코파일" not in __file_format_multi_dict__ ):
314- __file_format_multi_dict__ .update ({'네코파일' : {'format_name' : "NekoFile" , 'format_magic' : "네코파일" , 'format_lower' : "nekofile" , 'format_len' : 15 , 'format_hex' : "eb84a4ecbd94ed8c8c" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".네코" } } )
315- if ("고양이파일" not in __file_format_multi_dict__ ):
316- __file_format_multi_dict__ .update ({'고양이파일' : {'format_name' : "GoyangiFile" , 'format_magic' : "고양이파일" , 'format_lower' : "goyangifile" , 'format_len' : 15 , 'format_hex' : "eab3a0ec9691ec9db4ed8c8cec9dbc" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".고양이" } } )
309+ if (__include_defaults__ ):
310+ if ("CatFile" not in __file_format_multi_dict__ ):
311+ __file_format_multi_dict__ .update ({'CatFile' : {'format_name' : "CatFile" , 'format_magic' : "CatFile" , 'format_lower' : "catfile" , 'format_len' : 7 , 'format_hex' : "43617446696c65" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".cat" } } )
312+ if ("NekoFile" not in __file_format_multi_dict__ ):
313+ __file_format_multi_dict__ .update ({'NekoFile' : {'format_name' : "NekoFile" , 'format_magic' : "NekoFile" , 'format_lower' : "nekofile" , 'format_len' : 8 , 'format_hex' : "4e656b6f46696c65" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".neko" } } )
314+ if ("ねこファイル" not in __file_format_multi_dict__ ):
315+ __file_format_multi_dict__ .update ({'ねこファイル' : {'format_name' : "NekoFile" , 'format_magic' : "ねこファイル" , 'format_lower' : "nekofile" , 'format_len' : 21 , 'format_hex' : "e381ade38193e38395e382a1e382a4e383abe" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".ねこ" } } )
316+ if ("네코파일" not in __file_format_multi_dict__ ):
317+ __file_format_multi_dict__ .update ({'네코파일' : {'format_name' : "NekoFile" , 'format_magic' : "네코파일" , 'format_lower' : "nekofile" , 'format_len' : 15 , 'format_hex' : "eb84a4ecbd94ed8c8c" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".네코" } } )
318+ if ("고양이파일" not in __file_format_multi_dict__ ):
319+ __file_format_multi_dict__ .update ({'고양이파일' : {'format_name' : "GoyangiFile" , 'format_magic' : "고양이파일" , 'format_lower' : "goyangifile" , 'format_len' : 15 , 'format_hex' : "eab3a0ec9691ec9db4ed8c8cec9dbc" , 'format_delimiter' : "\x00 " , 'format_ver' : "001" , 'new_style' : True , 'use_advanced_list' : True , 'use_alt_inode' : False , 'format_extension' : ".고양이" } } )
317320__file_format_name__ = __file_format_multi_dict__ [__file_format_default__ ]['format_name' ]
318321__file_format_lower__ = __file_format_multi_dict__ [__file_format_default__ ]['format_lower' ]
319322__file_format_magic__ = __file_format_multi_dict__ [__file_format_default__ ]['format_magic' ]
0 commit comments