mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
50b22d5126
commit
d39dfa3f47
18
content.py
18
content.py
|
@ -250,15 +250,15 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
||||||
continue
|
continue
|
||||||
if addHashTags(wordStr,httpPrefix,originalDomain,replaceHashTags,hashtags):
|
if addHashTags(wordStr,httpPrefix,originalDomain,replaceHashTags,hashtags):
|
||||||
continue
|
continue
|
||||||
if len(wordStr)>2:
|
if not emojiDict:
|
||||||
if wordStr.startswith(':') and ':' in wordStr[1:] and not emojiDict:
|
if len(wordStr)>2:
|
||||||
if not wordStr.endswith(':'):
|
if wordStr.startswith(':'):
|
||||||
wordStr=':'+wordStr[1:].split(':')[0]+':'
|
if wordStr.endswith(':'):
|
||||||
print('Loading emoji lookup')
|
print('Loading emoji lookup')
|
||||||
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)
|
||||||
|
|
||||||
addEmoji(baseDir,wordStr,httpPrefix,originalDomain,replaceEmoji,hashtags,emojiDict)
|
addEmoji(baseDir,wordStr,httpPrefix,originalDomain,replaceEmoji,hashtags,emojiDict)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue