mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
scripts/fontawesome: load icons from local file
This commit is contained in:
parent
00a83da619
commit
4c634c402a
@ -28,9 +28,12 @@ function download() {
|
||||
|
||||
echo -n > "$FONTAWESOME_FILE"
|
||||
|
||||
curl https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/advanced-options/metadata/icons.json | \
|
||||
jq '.[] | "\\u" + .unicode + "\t" + .label' -r | \
|
||||
xargs -0 printf \
|
||||
cat /usr/share/fontawesome/icons.json | \
|
||||
jq -r --argfile ctgs <(yq r -j /usr/share/fontawesome/categories.yml) \
|
||||
'.[] | . as $icon | "\\\\u" + .unicode + "\t" + .label + "\t" + ( ([.search.terms,.styles,([select($ctgs[].icons[]|index($icon.label))|.label]|unique)]|add)|sort|join(", "))' | \
|
||||
while IFS=$'\t' read icon name labels; do \
|
||||
printf "%b\t%-120s\t%s\n" "$icon" "$name" "$labels";\
|
||||
done \
|
||||
> "$FONTAWESOME_FILE"
|
||||
|
||||
notify "$(basename "$0")" "We're all set!"
|
||||
|
Loading…
Reference in New Issue
Block a user