{ "info": { "author": "Katie McLaughlin", "author_email": "katie@glasnt.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Text Processing :: Filters", "Topic :: Utilities" ], "description": "emojificate\n===========\n\nEmojificate is a Python implementation of a concept of using fallback images, alt text, title text and aria labels to represent emoji in HTML code in a more accessible method.\n\nUsage\n-----\n\nTo convert a string from the command line::\n\n $ python3 -m emojificate \"I \ud83d\udc9c emoji \ud83d\ude0a\"\n I \"\ud83d\udc9c\" emoji \"\ud83d\ude0a\"\n\nOr, if you've got a Django project, put ``emojificate`` into your ``INSTALLED_APPS``, and then use the following in a template::\n\n {% load emojificate %}\n This is some {{ user_content|emojificate }} that has emoji in it.\n\n {% emojified %}\n This is some template content that \ud83d\udc9c emoji as well.\n {% endemojified %}\n\nImplementation\n--------------\n\nTL;DR: Take a string, split it into token, and if a token is emoji, process it into a nice format.\n\nSplitting the string is a problem, because at the moment it **does not handle Zero Width Joining sequences**. However, native Python string tokenization does work for the most part.\n\nGiven a list of tokens, we can leverage the native `unicodedata `__ to:\n\n* see if a token is a unicode Symbol (an emoji)\n* get the codepoint for the emoji, and\n* get the name of the emoji\n\nFrom there, we construct an ```` replacement for the emoji:\n\n* Use images from `twemoji `__, Twitter's emoji set\n* Have an ``alt`` parameter containing the original emoji. This allows for copying-pasting.\n* Use the name of the emoji in the ``title`` parameter. This allows for hover-tooltips.\n* Add an ``aria-label`` for screen-reader accessibility.\n\nFor more information, see `Solve For Emoji `__.\n\nImplementation in other languages\n---------------------------------\n\nRuby\n~~~~~\n\n.. code-block:: ruby\n\n require 'gemoji' # requires gemoji 3.0.0, released late Dec 2016\n\n def cdn\n \"https://twemoji.maxcdn.com/36x36\"\n end\n\n def emojificate(string)\n string.split(\"\").each do |s|\n e = Emoji.find_by_unicode(s)\n if e then\n u = s.ord.to_s(16) # e.g. 1f431\n d = e.description # e.g. \"cat face\"\n img = \"\\\"#{s}\\\"\"\n print img\n else\n print s\n end\n end\n end\n\nLimitations\n-----------\n\n* Does not handle Zero Width Join Sequences; for example: \ud83d\udd90\ud83c\udffd, \ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/glasnt/emojificate", "keywords": "emoji accessibility a11y", "license": "New BSD", "maintainer": "", "maintainer_email": "", "name": "emojificate", "package_url": "https://pypi.org/project/emojificate/", "platform": "", "project_url": "https://pypi.org/project/emojificate/", "project_urls": { "Homepage": "https://github.com/glasnt/emojificate" }, "release_url": "https://pypi.org/project/emojificate/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A Python implementation of a concept of using fallback images, alt text, title text and aria labels to represent emoji in HTML code in a more accessible method.", "version": "0.2.0" }, "last_serial": 3285733, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d58abdcd1478b29a2e98bfd396e9a6f0", "sha256": "0552ad57db6249aef8c7089eaf9aab453dcfcbc95351de171a8480ca17fa6046" }, "downloads": -1, "filename": "emojificate-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d58abdcd1478b29a2e98bfd396e9a6f0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6305, "upload_time": "2016-08-07T01:09:27", "url": "https://files.pythonhosted.org/packages/f3/3f/2137fa266716097547cb62bbd314053e117cdd6552b3a921943807d9e251/emojificate-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4046ef1476e8de168a5380e0d7eb4e0", "sha256": "984c34419d837ffff01e12b8258cfe4c4b615f485aa5d01920f97c33f43fac2c" }, "downloads": -1, "filename": "emojificate-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c4046ef1476e8de168a5380e0d7eb4e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4447, "upload_time": "2016-08-07T01:09:30", "url": "https://files.pythonhosted.org/packages/a8/04/b08ddc43b9a8961add4ba9d862ef3ed5dc6c34f054d46fdc69b6eaa8316f/emojificate-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "765802feef8c9dff6f43422b5df0d7bf", "sha256": "533ab7324ce092c1fe0fb9942694fff1ae6a50f20e577a60ec7aa29448aa73c3" }, "downloads": -1, "filename": "emojificate-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "765802feef8c9dff6f43422b5df0d7bf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6178, "upload_time": "2016-08-07T05:04:04", "url": "https://files.pythonhosted.org/packages/68/b3/db6c1f82ea26b2d1a4869482f897b3e307222cae39d246ebd66a3e864ccf/emojificate-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "057e079307324b1509bb154cd5ed3eaa", "sha256": "043c4a53c909377c717fc210f0a3c2b5de7a0491498cfe88b1dbe1cbd049133a" }, "downloads": -1, "filename": "emojificate-0.1.1.tar.gz", "has_sig": false, "md5_digest": "057e079307324b1509bb154cd5ed3eaa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4353, "upload_time": "2016-08-07T05:04:06", "url": "https://files.pythonhosted.org/packages/4a/d8/ae4b8b248502c83d5d3ad303538061e0d4d174815d9986ad70459b6adb19/emojificate-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d55a96dd1b446f99fde5494eb333dbdf", "sha256": "dbfdd1031641d7f472a6650983d7e04464f18c56fa13adb48ed1108ff96ef7b9" }, "downloads": -1, "filename": "emojificate-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d55a96dd1b446f99fde5494eb333dbdf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6177, "upload_time": "2016-09-15T09:10:26", "url": "https://files.pythonhosted.org/packages/1f/63/8c8d04ad4feebb568c271e44b927f2e9f7a244dbbccae65ea72312f3104a/emojificate-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a442850c79d461b4d916565944ed222", "sha256": "31303dfc6b55f641c2f90fbff4602b8f1e4d55fef1797723e1f721d811d8b424" }, "downloads": -1, "filename": "emojificate-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6a442850c79d461b4d916565944ed222", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4363, "upload_time": "2016-09-15T09:10:05", "url": "https://files.pythonhosted.org/packages/5b/4b/242a209aab60034d919f6209a2880be9722302fce919c9e918d4932b6000/emojificate-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f12e8943bf96dc7931f610f47902f7ef", "sha256": "29a966b1b25b2f04d79a26d804cc4e0d9d497675ab3b2702413ec6f2ebbf3f03" }, "downloads": -1, "filename": "emojificate-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f12e8943bf96dc7931f610f47902f7ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4726, "upload_time": "2017-10-28T06:07:25", "url": "https://files.pythonhosted.org/packages/d8/d9/fdfb93a4ad7cb3c8a71030e0f319dbbb207678b0123a8dca136d72255dbe/emojificate-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f12e8943bf96dc7931f610f47902f7ef", "sha256": "29a966b1b25b2f04d79a26d804cc4e0d9d497675ab3b2702413ec6f2ebbf3f03" }, "downloads": -1, "filename": "emojificate-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f12e8943bf96dc7931f610f47902f7ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4726, "upload_time": "2017-10-28T06:07:25", "url": "https://files.pythonhosted.org/packages/d8/d9/fdfb93a4ad7cb3c8a71030e0f319dbbb207678b0123a8dca136d72255dbe/emojificate-0.2.0.tar.gz" } ] }