blob: f1842db7c30a16a38780513bc60fd0a0cd9786a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
# Creates a file for emoji.sh to use from an official Unicode emoji list:
# https://unicode.org/Public/emoji/15.0/emoji-test.txt
#
# Usage: getEmojiList.sh [INPUT_FILE]
#
# Example: getEmojiList.sh <emoji-test.txt >"$HOME/.config/emoji"
inputFile="$1"
sed '
# Delete not fully qualified emojis
/unqualified/d
/minimally-qualified/d
# Delete comments except for group names
/^# group:/p
/^#/d
# Delete blank lines
/^\s*$/d
# Leave only emoji and name
s/^[^#].*# //;/^#/!s/E[0-9.]* //
' "${inputFile:-/dev/stdin}"
|