From 96828c241c7bf4192d9ce6841f8974e572955a76 Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Sat, 15 Oct 2022 14:39:26 +0200 Subject: [PATCH] Enable wildcards and embeds by default Since we now search automatically, the script also doesn't try to load anything if none are found --- scripts/tag_autocomplete_helper.py | 4 ++++ tags/config.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/tag_autocomplete_helper.py b/scripts/tag_autocomplete_helper.py index 2b05ce3..3e09cb2 100644 --- a/scripts/tag_autocomplete_helper.py +++ b/scripts/tag_autocomplete_helper.py @@ -26,6 +26,10 @@ def write_to_temp_file(name, data): # Check if the temp path exists and create it if not if not os.path.exists(TEMP_PATH): os.makedirs(TEMP_PATH) + # Set up files to ensure the script doesn't fail to load them + # even if no wildcards or embeddings are found + write_to_temp_file('wc.txt', []) + write_to_temp_file('emb.txt', []) # Write wildcards to wc.txt if found if os.path.exists(WILDCARD_PATH): diff --git a/tags/config.json b/tags/config.json index eb4e13d..7c2a5b6 100644 --- a/tags/config.json +++ b/tags/config.json @@ -8,7 +8,8 @@ "maxResults": 5, "replaceUnderscores": true, "escapeParentheses": true, - "useWildcards": false, + "useWildcards": true, + "useEmbeddings": true, "colors": { "danbooru": { "0": ["lightblue", "dodgerblue"],