element-web-patches/reactions/generate.sh

22 lines
436 B
Bash
Raw Normal View History

2022-03-31 12:12:27 -04:00
#!/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[] | {
2022-03-31 12:40:42 -04:00
label: .emoji,
2022-03-31 12:12:27 -04:00
hexcode: "2721",
2022-03-31 12:40:42 -04:00
shortcodes: [ .emoji ],
tags: (.tags? + [ .emoji ]),
emoji: .emoji,
text: .emoji,
2022-03-31 12:12:27 -04:00
type: 0,
order: 0,
group: 8,
subgroup: 93,
version: 0.7
}
]'