forked from indymedia/epicyon
Comments
This commit is contained in:
1 parent
8aafc35c10
commit
8d78bb6f6b
2 files changed
+8
No files matched your search
@@ -248,8 +248,12 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
|||||||
continue
|
continue
|
||||||
if len(wordStr)>2 and wordStr.startswith(':') and wordStr.endswith(':') and not emojiDict:
|
if len(wordStr)>2 and wordStr.startswith(':') and wordStr.endswith(':') and not emojiDict:
|
||||||
print('Loading emoji lookup')
|
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'):
|
if not os.path.isfile(baseDir+'/emoji/emoji.json'):
|
||||||
copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')
|
copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')
|
||||||
|
|
||||||
with open(baseDir+'/emoji/emoji.json', 'r') as fp:
|
with open(baseDir+'/emoji/emoji.json', 'r') as fp:
|
||||||
emojiDict=commentjson.load(fp)
|
emojiDict=commentjson.load(fp)
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ def htmlSearchEmoji(translate: {},baseDir: str,searchStr: str) -> str:
|
|||||||
"""Search results for emoji
|
"""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'):
|
if not os.path.isfile(baseDir+'/emoji/emoji.json'):
|
||||||
copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')
|
copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')
|
||||||
|
|
||||||
@@ -2348,6 +2350,8 @@ def htmlSearchEmojiTextEntry(translate: {}, \
|
|||||||
baseDir: str,path: str) -> str:
|
baseDir: str,path: str) -> str:
|
||||||
"""Search for an emoji by name
|
"""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'):
|
if not os.path.isfile(baseDir+'/emoji/emoji.json'):
|
||||||
copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')
|
copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json')
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user