From 97a5a1ea71161d119346918ec46e1cc8a19c9e82 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sun, 4 Aug 2019 19:16:39 +0200 Subject: [PATCH] Created script to generate a Pleroma emoji pack --- .gitignore | 2 ++ gen.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 gen.sh diff --git a/.gitignore b/.gitignore index e33609d..6396bb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *.png +*.json +*.zip diff --git a/gen.sh b/gen.sh new file mode 100755 index 0000000..5704ba3 --- /dev/null +++ b/gen.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +IDS=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s|" ${x%.svg.png}' {} \;` +FILES=`find . -type f -iname '*.png' -exec sh -c 'printf "%s|" ${0#./}' {} \;` + +FILELIST="${IDS%|} +${FILES%|}" + +jq -Rn ' +( input | split("|") ) as $keys | +( inputs | split("|") ) as $vals | +[[$keys, $vals] | transpose[] | {key:.[0],value:.[1]}] | from_entries +' <<<"$FILELIST">blobfox.json + +zip blobfox.zip *.png