mirror of https://gitlab.com/bashrc2/epicyon
Detection of emoji
parent
8a1226d391
commit
de15578d17
|
@ -308,8 +308,10 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
||||||
if addHashTags(wordStr,httpPrefix,originalDomain,replaceHashTags,hashtags):
|
if addHashTags(wordStr,httpPrefix,originalDomain,replaceHashTags,hashtags):
|
||||||
continue
|
continue
|
||||||
if len(wordStr)>2:
|
if len(wordStr)>2:
|
||||||
if wordStr.startswith(':'):
|
if ':' in wordStr:
|
||||||
if wordStr.endswith(':'):
|
wordStr2=wordStr.split(':')[1]
|
||||||
|
if ':' in wordStr2:
|
||||||
|
wordStr2=wordStr2.split(':')[0]
|
||||||
if not emojiDict:
|
if not emojiDict:
|
||||||
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'):
|
||||||
|
@ -327,7 +329,7 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
emojiDictCtr+=1
|
emojiDictCtr+=1
|
||||||
|
|
||||||
addEmoji(baseDir,wordStr,httpPrefix,originalDomain,replaceEmoji,hashtags,emojiDict)
|
addEmoji(baseDir,':'+wordStr2+':',httpPrefix,originalDomain,replaceEmoji,hashtags,emojiDict)
|
||||||
|
|
||||||
# replace words with their html versions
|
# replace words with their html versions
|
||||||
for wordStr,replaceStr in replaceMentions.items():
|
for wordStr,replaceStr in replaceMentions.items():
|
||||||
|
|
Loading…
Reference in New Issue