mirror of
https://git.notfire.cc/notfire/akkoma-fe.git
synced 2026-01-11 05:23:16 -08:00
update emoji list to be more like the old one but still good
This commit is contained in:
parent
ef75fd81a4
commit
295f3907e6
3 changed files with 5806 additions and 1766 deletions
|
|
@ -28,9 +28,8 @@
|
|||
- option to disable title showing unreads
|
||||
- update the list of emojis:
|
||||
- switched weird unicode ones to proper emojis
|
||||
- emojis are sourced from discord's list of emojis
|
||||
- emojis are now sorted by category (like on every other emoji picker) instead of alphabetically
|
||||
- all emojis go by their unicode names instead of the shortened ones, eg :100: is now :hundred_points:
|
||||
- this wasn't intentional, but keeping the old names would require way more work
|
||||
- script to get new emojis is included for future unicode versions
|
||||
- add toggle for showing post edit notifications
|
||||
- add support for accepted follow request notifications
|
||||
|
|
|
|||
7546
static/emoji.json
7546
static/emoji.json
File diff suppressed because it is too large
Load diff
|
|
@ -1,13 +1,20 @@
|
|||
# python in a js project? lunacy
|
||||
|
||||
import json, requests
|
||||
import requests, json, re
|
||||
|
||||
emojiListSrc = requests.get("https://github.com/muan/unicode-emoji-json/raw/refs/heads/main/data-by-emoji.json")
|
||||
emojiList = json.loads(emojiListSrc.content)
|
||||
newEmojiList = {}
|
||||
emojilistraw = requests.get("https://github.com/xCykrix/discord_emoji/raw/refs/heads/main/mod.ts")
|
||||
emojilistraw = emojilistraw.text
|
||||
|
||||
for emoji in emojiList:
|
||||
newEmojiList[emojiList[emoji]["slug"]] = emoji
|
||||
patt1 = re.compile("// deno.*\n.*\n.*\n.*\n.*\n\n.*\n.*= ")
|
||||
patt2 = re.compile("}\n\n.*\n.*= {\n")
|
||||
patt3 = re.compile("}\n\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n")
|
||||
|
||||
output = open("../static/emoji.json", "w+")
|
||||
output.write(json.dumps(newEmojiList, indent=4, ensure_ascii=False))
|
||||
patterns = [patt1, patt2, patt3]
|
||||
|
||||
for pattern in patterns:
|
||||
emojilistraw = re.sub(pattern, "", emojilistraw)
|
||||
|
||||
emojilistparsed = json.loads(emojilistraw.rpartition(",")[0] + "}")
|
||||
|
||||
out = open("../static/emoji.json", "w+")
|
||||
out.write(json.dumps(emojilistparsed, ensure_ascii=False, indent=4))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue