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.0.tar.gz (20.8 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.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file deemoji-1.0.0.tar.gz.

File metadata

  • Download URL: deemoji-1.0.0.tar.gz
  • Upload date:
  • Size: 20.8 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.0.tar.gz
Algorithm Hash digest
SHA256 54b5b436f2628bc504b266561b04ee8d5ad631863400f8e3e717843085bc240a
MD5 313e9f637a375bac90b64aeb21f7f410
BLAKE2b-256 5567a8fe61cc8d13f96589eb92ad4be337fc06f27c0d8415b08e1385f1998c7a

See more details on using hashes here.

File details

Details for the file deemoji-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: deemoji-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c4566ae1d0bf6de49424cf005871891dd362eed53e66a11303bc7f1c0e07711
MD5 0b7e311d25d4763337d8f0d449bf0dd2
BLAKE2b-256 4b4a14640b0b4828377a1e50ce12632b995e13b5052955d94a06551a7c08dd27

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

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