#!/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 "$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}"