Skip to main content

Emoji Convert & Replace

Project description

Emoji Convert & Replace

Similar: https://pypi-hypernode.com/pypi/pymoji

Installation

pip install pyemoji

Usage

encode/decode:

Python 2.7.5 (default, Mar  9 2014, 22:15:05)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import pyemoji

In [2]: pyemoji.encode(u'笑脸表情:😄')
Out[2]: '\\u7b11\\u8138\\u8868\\u60c5\\uff1a\\U0001f604'

In [3]: print pyemoji.encode(u'笑脸表情:😄')
\u7b11\u8138\u8868\u60c5\uff1a\U0001f604

In [4]: pyemoji.decode('\\u7b11\\u8138\\u8868\\u60c5\\uff1a\\U0001f604')
Out[4]: u'\u7b11\u8138\u8868\u60c5\uff1a\U0001f604'

In [5]: print pyemoji.decode('\\u7b11\\u8138\\u8868\\u60c5\\uff1a\\U0001f604')
笑脸表情:😄

replace:

In [6]: pyemoji.replace(u'笑脸表情:😄')
Out[6]: u'\u7b11\u8138\u8868\u60c5\uff1a\ufffd'

In [7]: print pyemoji.replace(u'笑脸表情:😄')
笑脸表情:�

In [8]: pyemoji.replace(u'笑脸表情:😄', '')
Out[8]: u'\u7b11\u8138\u8868\u60c5\uff1a'

In [9]: print pyemoji.replace(u'笑脸表情:😄', '')
笑脸表情:

entities:

In [10]: pyemoji.entities(u'笑脸表情:😄')
Out[10]: u'\u7b11\u8138\u8868\u60c5\uff1a😄'

In [11]: print pyemoji.entities(u'笑脸表情:😄')
笑脸表情:😄

Params

unic:

In [4]: import pyemoji

In [5]: pyemoji.encode('笑脸表情:😄')
Out[5]: '\\u7b11\\u8138\\u8868\\u60c5\\uff1a\\U0001f604'

In [6]: pyemoji.encode(u'笑脸表情:😄')
Out[6]: '\\u7b11\\u8138\\u8868\\u60c5\\uff1a\\U0001f604'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyemoji-1.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

pyemoji-1.0.1-py2.7.egg (6.0 kB view details)

Uploaded Source

File details

Details for the file pyemoji-1.0.1.tar.gz.

File metadata

  • Download URL: pyemoji-1.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyemoji-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3477211350dfd9fa02cb0ef760303b0c3599a5f5c43d4a10da4d9f7a0b6e1a53
MD5 5ac8075ed4df6999bd9b83dc01383a4f
BLAKE2b-256 50104bac08a547d3db8a1150a8355e5a184f13138f85e3b1426cc09e71ccf81f

See more details on using hashes here.

File details

Details for the file pyemoji-1.0.1-py2.7.egg.

File metadata

  • Download URL: pyemoji-1.0.1-py2.7.egg
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyemoji-1.0.1-py2.7.egg
Algorithm Hash digest
SHA256 11a5276f62bdd0a473a82bcf0b341a52a5908c55f8d3d9ce643b284f4e01db8b
MD5 9b0980ec898407102a8a4239056a3f9a
BLAKE2b-256 fb8da639d26cdbcb6084b465d113dfbb4bf3d09b9367a6458c895a2b4970061c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page