diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-17 15:07:44 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-17 15:07:44 +0900 |
| commit | 2fdd35c71c7a4edecc40ecce571d2d16161bc48c (patch) | |
| tree | 96a1cc3bed8bf4077d2140d7f19374701e1933b4 | |
| parent | 3d8a408991192a9ee46b47e88f20a47d371bb4c8 (diff) | |
modified bin/emojiupdate
| -rwxr-xr-x | ar/.local/bin/emojiupdate | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/ar/.local/bin/emojiupdate b/ar/.local/bin/emojiupdate index 7185a4d..666d7d2 100755 --- a/ar/.local/bin/emojiupdate +++ b/ar/.local/bin/emojiupdate @@ -18,48 +18,40 @@ else exit 1 fi +# VS16 (U+FE0F) +vs16="$(printf '\xEF\xB8\x8F')" + awk ' - # Skip empty lines and comments /^[[:space:]]*$/ || /^#/ { next } - - # Keep only fully-qualified lines !/(fully-qualified|component)/ { next } - - # Skip lines containing 200D (zero-width joiner) /200D/ { next } - - # Skip lines containing components $2 ~ /1F3F[BCDEF]/ { next } - - # Print valid lines { print } ' "$input_file" >"$temp_file" -# Second stage: Extract emoji and description +# Extract + VS16 제거 awk -F'#' ' { if (NF >= 2) { - full_data = $2 # Extract the emoji and description (after #) - gsub(/^[[:space:]]+|[[:space:]]+$/, "", full_data) # Trim spaces around the entire field + full_data = $2 + gsub(/^[[:space:]]+|[[:space:]]+$/, "", full_data) - split(full_data, parts, " ") # Split into parts by spaces - emoji = parts[1] # First part is the emoji + split(full_data, parts, " ") + emoji = parts[1] - # Reconstruct description from parts[3] onward description = "" for (i = 3; i <= length(parts); i++) { description = description parts[i] " " } - # Remove excessive internal spaces and trim description gsub(/[[:space:]]+/, " ", description) gsub(/^[[:space:]]+|[[:space:]]+$/, "", description) - # Print emoji and description print emoji, description } } -' "$temp_file" >"$output_file" +' "$temp_file" | + sed "s/$vs16//g" >"$output_file" rm -rf "$input_file" "$temp_file" echo "Processing complete! File saved to: $output_file" |
