ssb: Avoid unqualified emojis. I noticed the red heart was missing ever since I reprocessed the list.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m42s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m42s
This commit is contained in:
parent
e5279b4827
commit
6563f8c738
File diff suppressed because one or more lines are too long
@ -18,13 +18,15 @@ with open('out/emoji-test.txt', 'r') as f:
|
|||||||
elif line.startswith('# subgroup: '):
|
elif line.startswith('# subgroup: '):
|
||||||
subgroup = line[len('# subgroup: '):]
|
subgroup = line[len('# subgroup: '):]
|
||||||
else:
|
else:
|
||||||
m = re.match(r'((?:\s?[0-9A-F]+)+)\s+;.*#.*E\d+\.\d+ (.*)', line)
|
m = re.match(r'((?:\s?[0-9A-F]+)+)\s+; (\S+).*#.*E\d+\.\d+ (.*)', line)
|
||||||
if m:
|
if m:
|
||||||
emoji = ''.join(chr(int(g, 16)) for g in m.group(1).split(' '))
|
emoji = ''.join(chr(int(g, 16)) for g in m.group(1).split(' '))
|
||||||
name = m.group(2)
|
qualified = m.group(2)
|
||||||
if not group in doc:
|
if qualified == 'fully-qualified':
|
||||||
doc[group] = {}
|
name = m.group(3)
|
||||||
doc[group][name] = emoji
|
if not group in doc:
|
||||||
|
doc[group] = {}
|
||||||
|
doc[group][name] = emoji
|
||||||
|
|
||||||
with open('apps/ssb/emojis.json', 'w') as f:
|
with open('apps/ssb/emojis.json', 'w') as f:
|
||||||
json.dump(doc, f, ensure_ascii = False)
|
json.dump(doc, f, ensure_ascii = False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user