element-web-patches/reactions/generate.sh
2022-03-31 20:15:31 +01:00

25 lines
514 B
Bash
Executable File

#!/bin/sh
# Run fetch-latest-format.sh for the most up-to-date emojibase format. Target is raw.json
reactions="$(yq . /dev/stdin < reactions.yaml)"
jq -n --argjson reactions "$reactions" \
'[
$reactions[] | {
annotation: .emoji,
label: .emoji,
emoticon: .emoji,
hexcode: "2721",
unicode: .emoji,
shortcodes: (.tags? + [ .emoji ]),
tags: (.tags? + [ .emoji ]),
emoji: .emoji,
text: .emoji,
type: 0,
order: 0,
group: 8,
subgroup: 93,
version: 0.7
}
]'