From 90f30447d02fe0b312734250a7974b5ed343654d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Aug 2019 17:55:22 +0100 Subject: [PATCH] Document customizations --- README.md | 15 ++++++++++++++- content.py | 5 ++++- emoji/{emoji-data.txt => default_emoji.txt} | 0 3 files changed, 18 insertions(+), 2 deletions(-) rename emoji/{emoji-data.txt => default_emoji.txt} (100%) diff --git a/README.md b/README.md index ebf4ed46..26eabb4d 100644 --- a/README.md +++ b/README.md @@ -482,4 +482,17 @@ python3 epicyon.py --undoItemName "spanner" --nickname [yournick] --domain [your ## Object Capabilities Security -A description of the proposed object capabilities model [is here](ocaps.md). \ No newline at end of file +A description of the proposed object capabilities model [is here](ocaps.md). + +## Customizations + +On the login screen you can provide a custom welcome message by creating the file **accounts/login.txt**. This could be used to show a motd or scheduled maintenance information. + +You can customize the image on the login screen by saving your instance logo to **accounts/login.png**. A background image can also be set for the login screen by adding **accounts/login-background.png** + +A custom background image can be supplied for the search screen by adding **accounts/search-background.png** + +When a moderator report is created the message at the top of the screen can be customized to provide any additional information, advice or alerts. Edit **accounts/report.txt** and add your text. + +Extra emoji can be added to the *emoji* directory and you should then update the **emoji/emoji.txt** file. + diff --git a/content.py b/content.py index 5b94509d..5cfff445 100644 --- a/content.py +++ b/content.py @@ -8,6 +8,7 @@ __status__ = "Production" import os import commentjson +from shutil import copyfile def validHashTag(hashtag: str) -> bool: """Returns true if the give hashtag contains valid characters @@ -164,7 +165,9 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \ continue if len(wordStr)>2 and wordStr.startswith(':') and wordStr.endswith(':') and not emojiDict: print('Loading emoji lookup') - loadEmojiDict(baseDir+'/emoji/emoji-data.txt',emojiDict) + if not os.path.isfile(baseDir+'/emoji/emoji.txt'): + copyfile(baseDir+'/emoji/default_emoji.txt',baseDir+'/emoji/emoji.txt') + loadEmojiDict(baseDir+'/emoji/emoji.txt',emojiDict) addEmoji(baseDir,wordStr,httpPrefix,originalDomain,replaceEmoji,hashtags,emojiDict) # replace words with their html versions diff --git a/emoji/emoji-data.txt b/emoji/default_emoji.txt similarity index 100% rename from emoji/emoji-data.txt rename to emoji/default_emoji.txt