From cbd1d349a511da7a861540a5d6ea954d4d06871b Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 28 Jun 2025 19:03:01 +0900 Subject: updates --- ar/.local/bin/emojiupdate | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) (limited to 'ar/.local/bin/emojiupdate') diff --git a/ar/.local/bin/emojiupdate b/ar/.local/bin/emojiupdate index 861c9b0..7185a4d 100755 --- a/ar/.local/bin/emojiupdate +++ b/ar/.local/bin/emojiupdate @@ -1,34 +1,18 @@ #!/bin/sh -## -## For fontawesome icons update, run the command block in terminal. -## -# curl -sSL -o icons_raw.json "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/metadata/icons.json" && -# jq -r 'to_entries[] | select(.value.unicode) | .value.unicode + " " + .key' "icons_raw.json" | -# while read -r hex name; do -# hex_uc=$(printf '%s' "$hex" | tr '[:lower:]' '[:upper:]') -# if [ "${#hex_uc}" -le 4 ]; then -# unicode="\\u$hex_uc" -# else -# unicode="\\U$(printf '%08X' "0x$hex_uc")" -# fi -# -# printf "%b %s; %s\n" "$unicode" "$name" "$hex" -# done > "${XDG_DOTFILES_DIR:-$HOME/.dotfiles}/global/.local/share/thesiah/chars/icons" - # Define input and output files -URL="https://unicode.org/Public/emoji/latest/emoji-test.txt" -INPUT_FILE="${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/global/.local/share/thesiah/chars/emoji_raw" -TEMP_FILE="${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/global/.local/share/thesiah/chars/emoji_temp" -OUTPUT_FILE="${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/global/.local/share/thesiah/chars/emoji" +url="https://unicode.org/Public/emoji/latest/emoji-test.txt" +input_file="${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/global/.local/share/thesiah/chars/emoji_raw" +temp_file="${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/global/.local/share/thesiah/chars/emoji_temp" +output_file="${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/global/.local/share/thesiah/chars/emoji" # Create the directory for output files if it doesn't exist -mkdir -p "$(dirname "$INPUT_FILE")" +mkdir -p "$(dirname "$input_file")" # Download the emoji file echo "Downloading emoji-test.txt from Unicode..." -if curl -o "$INPUT_FILE" -L "$URL"; then - echo "Download complete! File saved to: $INPUT_FILE" +if curl -o "$input_file" -L "$url"; then + echo "Download complete! File saved to: $input_file" else echo "Failed to download emoji" exit 1 @@ -49,7 +33,7 @@ awk ' # Print valid lines { print } -' "$INPUT_FILE" >"$TEMP_FILE" +' "$input_file" >"$temp_file" # Second stage: Extract emoji and description awk -F'#' ' @@ -75,7 +59,7 @@ awk -F'#' ' print emoji, description } } -' "$TEMP_FILE" >"$OUTPUT_FILE" +' "$temp_file" >"$output_file" -rm -rf "$INPUT_FILE" "$TEMP_FILE" -echo "Processing complete! File saved to: $OUTPUT_FILE" +rm -rf "$input_file" "$temp_file" +echo "Processing complete! File saved to: $output_file" -- cgit v1.2.3