create custom-mappings.txt file if it doesn't exist.

pull/33/head
ChunKoo Park 2023-01-23 09:52:17 +09:00
parent 281646f558
commit 5560b332fd
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ def load_hash_dict():
default_file = f'{scripts_dir}/model-keyword.txt'
user_file = f'{scripts_dir}/custom-mappings.txt'
if not os.path.exists(user_file):
open(user_file, 'w').write('\n')
modified = str(os.stat(default_file).st_mtime) + '_' + str(os.stat(user_file).st_mtime)
if hash_dict is None or hash_dict_modified != modified: