From 3a31230f9c81d220420407a824be544675bcec30 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 1 Nov 2021 22:45:57 +0000 Subject: [PATCH] Append custom emoji --- content.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content.py b/content.py index 7e274683e..360920f90 100644 --- a/content.py +++ b/content.py @@ -900,6 +900,13 @@ def addHtmlTags(baseDir: str, httpPrefix: str, baseDir + '/emoji/emoji.json') emojiDict = loadJson(baseDir + '/emoji/emoji.json') + # append custom emoji to the dict + if os.path.isfile(baseDir + '/emojicustom/emoji.json'): + customEmojiDict = \ + loadJson(baseDir + '/emojicustom/emoji.json') + emojiDict = \ + dict(emojiDict.items() + customEmojiDict.items()) + # print('TAG: looking up emoji for :' + wordStr2 + ':') _addEmoji(baseDir, ':' + wordStr2 + ':', httpPrefix, originalDomain, replaceEmoji, hashtags,