summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorBulbyVR <26726264+TheDrawingCoder-Gamer@users.noreply.github.com>2022-04-22 11:19:30 -0400
committerBulbyVR <26726264+TheDrawingCoder-Gamer@users.noreply.github.com>2022-04-24 12:25:01 -0400
commitdabde88e1cf97e84e063bb2ff4db6ecedb4cd7c5 (patch)
tree6dc05084ea31103408edd497923dca24c228b4e3 /scripts
parentKeep old codes alongside new ones (diff)
downloadnheko-dabde88e1cf97e84e063bb2ff4db6ecedb4cd7c5.tar.xz
Remove sequences of _
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/emoji_codegen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/emoji_codegen.py b/scripts/emoji_codegen.py
index 5da3fb26..1e23bd49 100755
--- a/scripts/emoji_codegen.py
+++ b/scripts/emoji_codegen.py
@@ -86,7 +86,7 @@ if __name__ == '__main__':
         if name.endswith(' face'): 
             name = name[:-5]
         elif name.endswith(' button'): 
-            name = name[:-7]
+            name = name[:-7] 
         else: 
             matchobj = re.match(r'^flag: (.*)$', name) 
             if matchobj: 
@@ -96,6 +96,8 @@ if __name__ == '__main__':
         name = name.replace("“", "")
         name = name.replace("”", "")
         name = name.replace(":", "")
+        name = name.replace("-", "_")
+        name = re.sub(r'_{2,}', '_', name) 
         name = name.lower()
         name = unidecode(name)
         categories[current_category].append(Emoji(code, name))