Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deemoji-1.0.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

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

Hashes for deemoji-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3065d9c41fb6132d43f3091cedd4c882c7a93a22daf06b189c03ffc83336047c
MD5 1ff3ca6fa75f3f9c400d166226660a50
BLAKE2b-256 2af88241f21bc7f22c4be0710d1ad4a5e3d29135592f64095d7a643e228ea5ef

See more details on using hashes here.

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

Hashes for deemoji-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89ea48faf49c8435352819e13766a24798115e0e10fd3c74d176ad0ad6668b47
MD5 7711a828a4df7a157be48d99e5fab5b4
BLAKE2b-256 04a801174709ca5f571e0031ad97b62305e67c7bd4ed5c66cb0c7be9b4557fea

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page