summaryrefslogtreecommitdiff
path: root/generate.py
diff options
context:
space:
mode:
authorAda Isopods <me@bathynomus.xyz>2024-12-01 12:14:22 -0700
committerAda Isopods <me@bathynomus.xyz>2026-10-21 23:26:21 -0600
commit619d04320db7a180296732712a4a7ea1d16e5ab7 (patch)
treedc26f8f8bb26023225614821ab23c9ea1f554f6f /generate.py
parent11a75aac1a08d9ef57586ea75aa4c71abed06399 (diff)
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
Diffstat (limited to 'generate.py')
-rw-r--r--generate.py5
1 files changed, 5 insertions, 0 deletions
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)