From de0323f56374c091568416b5f16eaaa32b9fd413 Mon Sep 17 00:00:00 2001 From: Midgard Date: Sat, 23 Nov 2024 01:09:25 +0100 Subject: [PATCH] Do the built-in emoji filtering on startup to eliminate files --- .gitignore | 1 - bot.sh | 5 ++++- filter_builtin_emoji.sh | 3 --- 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100755 filter_builtin_emoji.sh diff --git a/.gitignore b/.gitignore index 285d68b..cf90a86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -builtin_emoji.txt emoji.txt diff --git a/bot.sh b/bot.sh index 3941361..8cdc2cb 100755 --- a/bot.sh +++ b/bot.sh @@ -2,7 +2,10 @@ cd "$(dirname "$0")" -cat builtin_emoji.txt <(mmcli listcustomemoji | jq -r '.name') > emoji.txt +cat \ + <(jq -r 'map(.aliases[0]) | .[]' < builtin_emoji.json | grep -v '_skin_tone') \ + <(mmcli listcustomemoji | jq -r '.name') \ + > emoji.txt mmcli tail -n0 -f "$1" | jq --unbuffered -r '.id' | diff --git a/filter_builtin_emoji.sh b/filter_builtin_emoji.sh deleted file mode 100755 index b8845af..0000000 --- a/filter_builtin_emoji.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -jq -r 'map(.aliases[0]) | .[]' < builtin_emoji.json | grep -v '_skin_tone' > builtin_emoji.txt