From 619d04320db7a180296732712a4a7ea1d16e5ab7 Mon Sep 17 00:00:00 2001 From: Ada Isopods Date: Sun, 1 Dec 2024 12:14:22 -0700 Subject: Preserve and re-add emojis from the original data Could I have done this by messing with the markov chain directly? maybe. I don't care enough to try --- generate.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'generate.py') diff --git a/generate.py b/generate.py index ee8cc3a..0102455 100644 --- a/generate.py +++ b/generate.py @@ -44,6 +44,11 @@ posts_log.append(text) with open(log_path, "w") as outfile: outfile.write(json.dumps(posts_log[-config__.log_length:])) +if(config__.emojis == True): + emojis = json.load(open("emojis.json")) + for emoji in emojis: + text = text.replace(emoji, ":"+emoji+":") + text = text.replace('@','@​').replace('#','#​') print(text) -- cgit v1.2.3