Skip to content

tinosingh/nuke_emojis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

==============================================================================

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"

==============================================================================

About

Hate emojis? This script will obliterate them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages