https://github.com/tinosingh/nuke_emojis
Hate emojis? This script will obliterate them.
https://github.com/tinosingh/nuke_emojis
bash clean perl
Last synced: about 2 months ago
JSON representation
Hate emojis? This script will obliterate them.
- Host: GitHub
- URL: https://github.com/tinosingh/nuke_emojis
- Owner: tinosingh
- License: apache-2.0
- Created: 2025-08-18T13:26:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-18T13:28:46.000Z (10 months ago)
- Last Synced: 2025-09-15T06:51:51.060Z (9 months ago)
- Topics: bash, clean, perl
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ==============================================================================
# nuke_emojis.sh
# ==============================================================================
#
# This script interactively helps you remove emoji characters and normalize
# whitespace in your codebase. It's designed to be Git-aware, processing
# only tracked or untracked (but not ignored) text files.
#
# Key Features:
# - **Emoji Removal:** Strips `\p{Extended_Pictographic}` emojis, Zero Width
# Joiners (\x{200d}), and Variation Selectors (\x{fe0f}).
# - **Whitespace Normalization:** Collapses multiple horizontal spaces, trims
# leading/trailing whitespace from lines, and collapses multiple blank lines.
# - **Interactive Mode:** Prompts for confirmation for each file with a diff
# preview, allowing you to accept, skip, or apply to all remaining.
# - **Dry Run Mode:** Shows changes without modifying any files.
# - **Automatic Application:** Can apply changes to all files without prompting.
# - **Git Integration:** Respects `.gitignore` and can automatically `git add`
# modified files.
# - **Safety:** Creates `.bak` backups of original files and cleans up its
# temporary files automatically.
#
# Usage:
# ./nuke_emojis.sh # Interactive mode
# ./nuke_emojis.sh --dry-run / -d # Show changes, don't modify files
# ./nuke_emojis.sh --yes / -y # Apply all changes automatically
#
# Ensure you have `git`, `grep`, `perl`, and `mktemp` installed.
# It's always recommended to back up your repository before running:
# `git commit -am "Pre-emoji cleanup backup"`
#
# ==============================================================================