diff options
| author | Ada Isopods <me@bathynomus.xyz> | 2024-12-01 12:14:22 -0700 |
|---|---|---|
| committer | Ada Isopods <me@bathynomus.xyz> | 2026-10-21 23:26:21 -0600 |
| commit | 619d04320db7a180296732712a4a7ea1d16e5ab7 (patch) | |
| tree | dc26f8f8bb26023225614821ab23c9ea1f554f6f /generate.py | |
| parent | 11a75aac1a08d9ef57586ea75aa4c71abed06399 (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.py | 5 |
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) |
