mirror of https://gitlab.com/bashrc2/epicyon
Searching for custom emoji
parent
9bafdef7bf
commit
424ba85942
|
@ -905,8 +905,7 @@ def addHtmlTags(baseDir: str, httpPrefix: str,
|
||||||
customEmojiDict = \
|
customEmojiDict = \
|
||||||
loadJson(baseDir + '/emojicustom/emoji.json')
|
loadJson(baseDir + '/emojicustom/emoji.json')
|
||||||
if customEmojiDict:
|
if customEmojiDict:
|
||||||
newEmojiDict = dict(emojiDict, **customEmojiDict)
|
emojiDict = dict(emojiDict, **customEmojiDict)
|
||||||
emojiDict = newEmojiDict
|
|
||||||
|
|
||||||
# print('TAG: looking up emoji for :' + wordStr2 + ':')
|
# print('TAG: looking up emoji for :' + wordStr2 + ':')
|
||||||
_addEmoji(baseDir, ':' + wordStr2 + ':', httpPrefix,
|
_addEmoji(baseDir, ':' + wordStr2 + ':', httpPrefix,
|
||||||
|
|
|
@ -71,6 +71,7 @@ def htmlSearchEmoji(cssCache: {}, translate: {},
|
||||||
|
|
||||||
# does the lookup file exist?
|
# does the lookup file exist?
|
||||||
if not os.path.isfile(emojiLookupFilename):
|
if not os.path.isfile(emojiLookupFilename):
|
||||||
|
if not os.path.isfile(customEmojiLookupFilename):
|
||||||
emojiForm += '<center><h5>' + \
|
emojiForm += '<center><h5>' + \
|
||||||
translate['No results'] + '</h5></center>'
|
translate['No results'] + '</h5></center>'
|
||||||
emojiForm += htmlFooter()
|
emojiForm += htmlFooter()
|
||||||
|
@ -80,8 +81,7 @@ def htmlSearchEmoji(cssCache: {}, translate: {},
|
||||||
if emojiJson:
|
if emojiJson:
|
||||||
if os.path.isfile(customEmojiLookupFilename):
|
if os.path.isfile(customEmojiLookupFilename):
|
||||||
customEmojiJson = loadJson(customEmojiLookupFilename)
|
customEmojiJson = loadJson(customEmojiLookupFilename)
|
||||||
newEmojiJson = dict(emojiJson, **customEmojiJson)
|
emojiJson = dict(emojiJson, **customEmojiJson)
|
||||||
emojiDict = newEmojiJson
|
|
||||||
results = {}
|
results = {}
|
||||||
for emojiName, filename in emojiJson.items():
|
for emojiName, filename in emojiJson.items():
|
||||||
if searchStr in emojiName:
|
if searchStr in emojiName:
|
||||||
|
|
Loading…
Reference in New Issue