From 4e84f2c331c77cf2f45657d524ba48303c05c593 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 3 Nov 2019 14:46:30 +0000 Subject: [PATCH] Comments --- content.py | 3 ++- webinterface.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/content.py b/content.py index f3c732e6..bf27489d 100644 --- a/content.py +++ b/content.py @@ -319,7 +319,8 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \ #print('TAG: emoji located - '+wordStr) wordStr2=wordStr.split(':')[1] if not emojiDict: - #print('Loading emoji lookup') + # emoji.json is generated so that it can be customized and the changes + # will be retained even if default_emoji.json is subsequently updated if not os.path.isfile(baseDir+'/emoji/emoji.json'): copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json') emojiDictCtr=0 diff --git a/webinterface.py b/webinterface.py index 48a9469b..f9304049 100644 --- a/webinterface.py +++ b/webinterface.py @@ -139,6 +139,8 @@ def htmlSearchEmoji(translate: {},baseDir: str,searchStr: str) -> str: """Search results for emoji """ + # emoji.json is generated so that it can be customized and the changes + # will be retained even if default_emoji.json is subsequently updated if not os.path.isfile(baseDir+'/emoji/emoji.json'): copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json') @@ -2948,6 +2950,8 @@ def htmlSearchEmojiTextEntry(translate: {}, \ baseDir: str,path: str) -> str: """Search for an emoji by name """ + # emoji.json is generated so that it can be customized and the changes + # will be retained even if default_emoji.json is subsequently updated if not os.path.isfile(baseDir+'/emoji/emoji.json'): copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')