add eomji(ctrl+e)

TODO: Some emojis can't be displayed. A font fallback or font merge is required.
This commit is contained in:
2025-12-28 16:49:26 +09:00
parent 436a49c3ca
commit 97ae9b1709
6 changed files with 517 additions and 11 deletions

39
map/mkemoji Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
awk '
BEGIN { FS = "\t" }
/^$/ { next }
{
key = $1
val = $2
map[key] = val
for(i = 1; i < length(key); i++){
p = substr(key, 1, i)
if(!(p in map))
map[p] = p
}
}
END {
for(k in map)
print k "\t" map[k]
}
' $1 | sort -k1,1 > emoji.map
awk '
BEGIN { FS = "\t" }
/^$/ { next }
{
key = $1
val = $2
for(i = 1; i <= length(key); i++){
p = substr(key, 1, i)
dict[p] = dict[p] " " val
}
}
END {
for(p in dict){
sub(/^ /, "", dict[p])
print p "\t" dict[p]
}
}
' $1 | sort -k1,1 > emoji.dict