From a3bf3373dd27edd6007ddb634f8c009762a2c7c9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 19 Aug 2019 21:18:45 +0100 Subject: [PATCH] Create emoji index --- webinterface.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webinterface.py b/webinterface.py index 0ce6aa7a..36e6c371 100644 --- a/webinterface.py +++ b/webinterface.py @@ -50,6 +50,9 @@ def htmlSearchEmoji(baseDir: str,searchStr: str) -> str: """Search results for emoji """ + if not os.path.isfile(baseDir+'/emoji/emoji.json'): + copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json') + searchStr=searchStr.lower().replace(':','').strip('\n') with open(baseDir+'/epicyon-profile.css', 'r') as cssFile: emojiCSS=cssFile.read() @@ -1538,6 +1541,9 @@ def htmlUnblockConfirm(baseDir: str,originPathStr: str,blockActor: str,blockProf def htmlSearchEmojiTextEntry(baseDir: str,path: str) -> str: """Search for an emoji by name """ + if not os.path.isfile(baseDir+'/emoji/emoji.json'): + copyfile(baseDir+'/emoji/default_emoji.json',baseDir+'/emoji/emoji.json') + actor=path.replace('/search','') nickname=getNicknameFromActor(actor) domain,port=getDomainFromActor(actor)