deemoji
A tiny Unix filter that removes Unicode emoji from UTF-8 text streams while leaving everything else untouched.
Usage
python3 deemoji.py < input.txt > output.txt
printf 'Hello 🌍!\n' | python3 deemoji.py
What is removed
- Single emoji:
😀,🚀 - Country flags:
🇨🇿 - Skin-tone variants:
👍🏽 - Zero-width-joiner sequences:
👨👩👧👦,👩🚀 - Keycap sequences:
9️⃣ - Emoji with emoji presentation selector:
❤️
What is preserved
- ASCII and digits
- National characters:
Příliš žluťoučký,你好 - Mathematical symbols:
∀x∈ℝ - Box-drawing characters:
┌─┐ - Text-presentation variants:
❤︎(kept)
Tests
python3 -munittest -v test_deemoji
Updating emoji data
_emoji_data.py is generated from the Unicode emoji-test.txt file:
python3 generate_emoji_table.py --version 16.0
Only the standard library is required.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
deemoji-1.0.1.tar.gz
(20.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
deemoji-1.0.1-py3-none-any.whl
(20.2 kB
view details)
File details
Details for the file deemoji-1.0.1.tar.gz.
File metadata
- Download URL: deemoji-1.0.1.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3065d9c41fb6132d43f3091cedd4c882c7a93a22daf06b189c03ffc83336047c
|
|
| MD5 |
1ff3ca6fa75f3f9c400d166226660a50
|
|
| BLAKE2b-256 |
2af88241f21bc7f22c4be0710d1ad4a5e3d29135592f64095d7a643e228ea5ef
|
File details
Details for the file deemoji-1.0.1-py3-none-any.whl.
File metadata
- Download URL: deemoji-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89ea48faf49c8435352819e13766a24798115e0e10fd3c74d176ad0ad6668b47
|
|
| MD5 |
7711a828a4df7a157be48d99e5fab5b4
|
|
| BLAKE2b-256 |
04a801174709ca5f571e0031ad97b62305e67c7bd4ed5c66cb0c7be9b4557fea
|