{ "info": { "author": "Bj\u00f6rn Andersson", "author_email": "ba@sanitarium.se", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "============\ndjango-emoji\n============\n\n.. image:: https://travis-ci.org/gaqzi/django-emoji.png?branch=master\n :target: https://travis-ci.org/gaqzi/django-emoji\n\n.. image:: https://coveralls.io/repos/gaqzi/django-emoji/badge.png\n :target: https://coveralls.io/r/gaqzi/django-emoji\n\n.. image:: https://img.shields.io/pypi/v/django-emoji.svg\n :target: https://pypi.python.org/pypi/django-emoji/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/django-emoji.svg\n :target: https://pypi.python.org/pypi/django-emoji/\n :alt: Python versions\n\n.. image:: https://img.shields.io/pypi/status/django-emoji.svg\n :target: https://pypi.python.org/pypi/django-emoji/\n :alt: Package status\n\nEmoji is a port of the GitHub gem `gemoji`_ to Django.\n\nThis app got two main use cases:\n\n1. It'll try to replace items between :: with emojis, for instance ``: dog :`` (without the spaces) will become an emoji of a dog (:dog:).\n2. It'll try to replace unicode characters with emojis, for instance '\u270c\ufe0f' with a victory symbol (:v:).\n\n.. _gemoji: https://github.com/github/gemoji\n\nVersion 2 release\n-----------------\n\nThanks to `Tim Schilling`_ we now have `autoescaping`_ enabled with the\nsame logic as core Django. Because this might be a breaking change for\nusers of this app the major version has been bumped. Apart from the\nfilters adds the standard XSS protection of Django there are no other\nchanges.\n\n.. _Tim Schilling: https://github.com/tim-schilling\n.. _autoescaping: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatefilter-escape\n\nTo get the old behavior of the app wrap the filter like this::\n\n {% autoescape off %}\n {{ emoji|emoji_replace }}\n {% endautoescape %}\n\nQuick start\n-----------\n\n1. Install `django-emoji ` from PyPi::\n\n pip install django-emoji\n\n2. Add \"emoji\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = (\n ...\n 'emoji',\n )\n\n3. Include the emoji URLconf in your project urls.py like this if you want to be able to get a JSON list of emojis::\n\n url(r'^emoji/', include('emoji.urls')),\n\n4. Visit http://127.0.0.1:8000/emoji/all.json to get a json object with all emojis avilable\n\nPython versions\n===============\n\nSupport for Django 1.5, 1.6, 1.7, 1.8 and 1.9 with their respective versions of Python 2/3 support.\n\nSettings\n========\n\nThese are settings that can be configured in your ``settings.py``:\n\n=============================== ========================================================\n Settings name Description\n=============================== ========================================================\n``EMOJI_IMG_TAG`` The template string that is used for creating the \n tag when converting an emoji to an image. Default:\n ``\"{1}\"``\n``EMOJI_ALT_AS_UNICODE`` Whether to put the unicode character that corresponds to\n an emoji as the alt text in ``replace_unicode``.\n Default: ``True``\n``EMOJI_REPLACE_HTML_ENTITIES`` Whether to automatically convert HTML encoded unicode\n characters into emojis. Default: ``True``\n=============================== ========================================================\n\nUsage\n=====\n\nAPI\n----\n\nPython\n------\n\nThe Python class ``Emoji`` is a singleton and will return the same\ninstance between instantiations. On load Emoji will load the name of\nall the emojis and their unicode equivalents into memory.\n\n=================================================== ============================================\n Call Description\n=================================================== ============================================\n``Emoji.names()`` A list of all known emojis\n``Emoji.replace(replacement_string)`` Replaces all emojis between ``::``\n``Emoji.name_for(character)`` The name for a given unicode character\n``Emoji.replace_unicode(replacement_string)`` Replaces all known unicode emojis\n``Emoji.replace_html_entities(replacement_string)`` Replaces all HTML encoded unicode characters\n=================================================== ============================================\n\nJavascript\n----------\n\nThe browser version caches all the emojis in ``localStorage`` so\nthere won't be that many roundtrips to the server just to get a list\nof the emojis.\n\n**NOTE**: Depends on jQuery or some other library that exports ``$.get``.\n\n==================================== ========================================\n Call Description\n==================================== ========================================\n``Emoji.setDataUrl(url)`` Where to fetch the list of all available emojis\n``Emoji.load()`` Load all emojis from the server\n``Emoji.get(/*emoji*/)`` Get the URL to an emoji of a name or return the names of all known emojis\n``Emoji.replace(replacementString)`` Replace all ``::`` style emojis with images\n``Emoji.clear()`` Empty the browser cache\n==================================== ========================================\n\nExamples\n--------\n\nReplace an emoji using Python templates by loading the tags in your template::\n\n {% load emoji_tags %}\n {{ blog_post.body|emoji_replace }}\n {{ blog_post.body|emoji_replace_unicode }}\n {{ blog_post.body|emoji_replace_html_entities }}\n\nReplace emojis using Javascript (to for instance show a preview before the user saves what it is they are writing)::\n\n {% load emoji_tags %}\n\n \n {% emoji_load %}\n\n Emoji.get('dog') // => url stub to dog emoji or falsy\n Emoji.get() // => all emojis available\n\n Emoji.replace(\"It's raining :cats: and :dogs:.\") // => It's raining \"cats\" and \"dogs\"\n\nWhat ``emoji_load`` does is that it sets the endpoint to retrieve the listing of all the available emojis and thus only works if the emoji urls has been included.\n\nIt is the equivalent of doing::\n\n Emoji.setDataUrl('{% url 'emoji:list.json' %}').load();\n\nWhich is also available as template stub::\n\n {% include 'emoji/script.html' %}\n\nUsage from inside Python where the Emoji class mimics some of the behavior of a dict::\n\n from emoji import Emoji\n Emoji['dog'] # => url stub to dog emoji or None\n 'dog' in Emoji # => True\n Emoji.keys() # => a list of all emojis by name\n Emoji.replace(\"It's raining :cats: and :dogs:\") # => It's raining \"cats\" and \"dogs\"\n\n\nReplacing unicode Emojis\n------------------------\n\nEmoji has the ability to give you the name of an emoji from a unicode\ncharacter. It can also replace every instance of emoji characters in a\nstring with their image replacements.\n\nUsage::\n\n >>> from emoji import Emoji\n >>> Emoji.name_for(u'\\U000148b')\n kiss\n >>> Emoji.replace_unicode(u'I send a \\U0001f48b!')\n I send a \"kiss\"\n\n**Note**:\n\nFor best use of the unicode replacements use a build of Python that\nwas built with wide unicode character support. From version 1.2 there\nis code added for dealing with unicode surrogate pairs and it should\nwork well on narrow builds. But this has not been production tested so\ntry it out properly. Please report any bugs found.\n\nTo test whether you got a narrow or wide build of Python run the\nfollowing, if you get an exception it means you're running a narrow build.::\n\n >>> print(unichr(0x0001f48b))\n ValueError: unichr() arg not in range(0x10000) (narrow Python build)\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gaqzi/django-emoji/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-emoji", "package_url": "https://pypi.org/project/django-emoji/", "platform": "", "project_url": "https://pypi.org/project/django-emoji/", "project_urls": { "Homepage": "https://github.com/gaqzi/django-emoji/" }, "release_url": "https://pypi.org/project/django-emoji/2.2.2/", "requires_dist": [ "django" ], "requires_python": "", "summary": "A simple django app to use emojis on your website", "version": "2.2.2" }, "last_serial": 4761878, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "9b769c026e9f6c5051b277433b957103", "sha256": "644c1597dbde8ebd65695b1061cc45c991e458bd5586aac7916c51cccb426f06" }, "downloads": -1, "filename": "django-emoji-1.0.tar.gz", "has_sig": false, "md5_digest": "9b769c026e9f6c5051b277433b957103", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4036811, "upload_time": "2013-12-02T09:10:24", "url": "https://files.pythonhosted.org/packages/7f/5d/003504a1ee728b57dde2ba0e880485259fec715ab0750a7e8441ddcc34ee/django-emoji-1.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "e5fe745fa599fb8af0808097abe32624", "sha256": "b0aec0477a4e3be6eec88a508d2f045d1b8ca831ff6746d953744d38ef982d41" }, "downloads": -1, "filename": "django-emoji-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e5fe745fa599fb8af0808097abe32624", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3960830, "upload_time": "2014-03-31T15:17:17", "url": "https://files.pythonhosted.org/packages/bf/26/ee8d3383d0daeee98b9ab914a6972c4793847b99734180915bb2b650a01c/django-emoji-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "c12f3e8df9e54c10a9a2a10f06797be5", "sha256": "adbf8bd4b339f9ac5f309978d16915c1557dad6a7af0b41f86fb865297336363" }, "downloads": -1, "filename": "django-emoji-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c12f3e8df9e54c10a9a2a10f06797be5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3963755, "upload_time": "2014-04-08T17:43:09", "url": "https://files.pythonhosted.org/packages/0e/1a/4c07a6421927560860a606922a9922b838519901f0012307279750eab215/django-emoji-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "cad4379f90a8af45de9891547b3c0bb9", "sha256": "b8437568b670ee06f6a92f507e54115588f3eab5fc8531dcfa0e36bbc09682af" }, "downloads": -1, "filename": "django_emoji-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cad4379f90a8af45de9891547b3c0bb9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4263176, "upload_time": "2014-09-07T05:19:49", "url": "https://files.pythonhosted.org/packages/fc/25/f18918e2085dfb0da0f8c5412b0e323e173c9962195d575b9e5a46f72c82/django_emoji-1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39bc13e03eff785141acffceb26eee76", "sha256": "5e6fadf52de9977f0860ed62979f4dead81affd6e6bfb0b66a2e4b250c23397b" }, "downloads": -1, "filename": "django-emoji-1.3.0.tar.gz", "has_sig": false, "md5_digest": "39bc13e03eff785141acffceb26eee76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3961508, "upload_time": "2014-09-07T05:19:45", "url": "https://files.pythonhosted.org/packages/21/c3/01f18566e8b78c17cba44ac9c9221a138b614b9e4132fba966ae518c63e1/django-emoji-1.3.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "b786fe55a274214efecd34affb6398f9", "sha256": "cde4b818637249aa7c2c92609fa3dc03e15942ee7176f04727236530eb908199" }, "downloads": -1, "filename": "django_emoji-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b786fe55a274214efecd34affb6398f9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4265732, "upload_time": "2014-11-01T14:51:41", "url": "https://files.pythonhosted.org/packages/1b/9f/eb76c7210e561cd40f8eb9b0145d16a326128854ff53569985ab6991205e/django_emoji-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "82600b3a8f50955dbd51b965290937ea", "sha256": "4ff93d267853762393c8f7f4587e144ed0eb2954db2bd0d51a17250c393f7b0e" }, "downloads": -1, "filename": "django-emoji-2.0.0.tar.gz", "has_sig": false, "md5_digest": "82600b3a8f50955dbd51b965290937ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3963696, "upload_time": "2014-11-01T14:51:37", "url": "https://files.pythonhosted.org/packages/2d/5b/4c4d75e9a8316be1d7d5dc33c8ddce8ad7b0f16b1de50c0bc23e0e10aae8/django-emoji-2.0.0.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "047b81a42aa99375f788230a59331cb0", "sha256": "c830225d5fd31cdf5ac2502771aefebe29ac53ad26e7abf432231473e3aa0276" }, "downloads": -1, "filename": "django_emoji-2.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "047b81a42aa99375f788230a59331cb0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4258643, "upload_time": "2015-12-30T01:55:33", "url": "https://files.pythonhosted.org/packages/6d/c9/d5a47be7995ea868e335484cd4ed5484c94742e438bff9a70c90f9f7dad8/django_emoji-2.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af108609eb82228a257f9b6dd1e008cb", "sha256": "e76afb8c2a8192d9b50cb37750d576ebbf62928f50a095e9ebf44932f1c1ccff" }, "downloads": -1, "filename": "django-emoji-2.1.0.tar.gz", "has_sig": false, "md5_digest": "af108609eb82228a257f9b6dd1e008cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3959225, "upload_time": "2015-12-30T01:55:52", "url": "https://files.pythonhosted.org/packages/de/a8/fabd9dd2bbe1076254752cf9ba615c2dada423d4e331bea27a7c7d788fbe/django-emoji-2.1.0.tar.gz" } ], "2.2.0": [ { "comment_text": "", "digests": { "md5": "d9aebc25e7e52caba2418db6a02b8f0e", "sha256": "d8ac422ed2c53b0ce4be2a586632e5568fbcc154839272209478ec9c4394c024" }, "downloads": -1, "filename": "django_emoji-2.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d9aebc25e7e52caba2418db6a02b8f0e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4264035, "upload_time": "2016-07-06T11:33:31", "url": "https://files.pythonhosted.org/packages/9a/59/7437f90adb8f4ac4f971fc1ad60398513e67535a5de4d3ff54a581f32aa6/django_emoji-2.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "300dbc929906b77af93be7f1735ab24f", "sha256": "a8620d9a6be6b57253366f8b1f919e2e72c2f1be5b85baa6e7b4f85843f1d413" }, "downloads": -1, "filename": "django-emoji-2.2.0.tar.gz", "has_sig": false, "md5_digest": "300dbc929906b77af93be7f1735ab24f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3962228, "upload_time": "2016-07-06T11:33:49", "url": "https://files.pythonhosted.org/packages/17/c8/e10a4be23fbc45c27db57a6f2322bb4bea05a5e5c71e2037326edcd3198a/django-emoji-2.2.0.tar.gz" } ], "2.2.1": [ { "comment_text": "", "digests": { "md5": "99446286de8c7830e9e918f2f6acc9ae", "sha256": "83d98b899ec264a62978640b1b7e7ef092e28dc9122faccdb06b8ec995391b81" }, "downloads": -1, "filename": "django_emoji-2.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "99446286de8c7830e9e918f2f6acc9ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4258452, "upload_time": "2019-01-31T00:10:52", "url": "https://files.pythonhosted.org/packages/ad/8f/1f8a3855c17b60ecb52c97e8685eebda1b5a6751e3f1fd1fdd3df301b5c7/django_emoji-2.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "072b9f5f6476bca68a81b81d177bb3b5", "sha256": "d50c9954400a5ad7d9278782e5a2a258ca0083efe943327872a39fb3d76ceca5" }, "downloads": -1, "filename": "django-emoji-2.2.1.tar.gz", "has_sig": false, "md5_digest": "072b9f5f6476bca68a81b81d177bb3b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4087027, "upload_time": "2019-01-31T00:10:57", "url": "https://files.pythonhosted.org/packages/d7/76/82b88cfa92bb286fbfb991250997eb9e91fa3616949ac262c9da0eee0043/django-emoji-2.2.1.tar.gz" } ], "2.2.2": [ { "comment_text": "", "digests": { "md5": "9ae83035f812da91302f7b31b66b294d", "sha256": "9eb1c9c417a0cf1a2a6aba42a580937282970b347ef49ec42409f07396e64227" }, "downloads": -1, "filename": "django_emoji-2.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ae83035f812da91302f7b31b66b294d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4261431, "upload_time": "2019-01-31T00:15:41", "url": "https://files.pythonhosted.org/packages/bd/6c/8680d92e2b9acb2278a880ab81fd7d5d2b14f0690d679c2a930889298c52/django_emoji-2.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e78024bc352064d645d9c23652690445", "sha256": "c6e4d4eef45c834aa9205190cda6a2b7cbd72f44e3af2dcc5fc097943e738327" }, "downloads": -1, "filename": "django-emoji-2.2.2.tar.gz", "has_sig": false, "md5_digest": "e78024bc352064d645d9c23652690445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4090019, "upload_time": "2019-01-31T00:15:47", "url": "https://files.pythonhosted.org/packages/4e/b1/47aa74b2269e40d661d6b4283bdff8fa367375faaa40081e686c342bd5c0/django-emoji-2.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9ae83035f812da91302f7b31b66b294d", "sha256": "9eb1c9c417a0cf1a2a6aba42a580937282970b347ef49ec42409f07396e64227" }, "downloads": -1, "filename": "django_emoji-2.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ae83035f812da91302f7b31b66b294d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4261431, "upload_time": "2019-01-31T00:15:41", "url": "https://files.pythonhosted.org/packages/bd/6c/8680d92e2b9acb2278a880ab81fd7d5d2b14f0690d679c2a930889298c52/django_emoji-2.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e78024bc352064d645d9c23652690445", "sha256": "c6e4d4eef45c834aa9205190cda6a2b7cbd72f44e3af2dcc5fc097943e738327" }, "downloads": -1, "filename": "django-emoji-2.2.2.tar.gz", "has_sig": false, "md5_digest": "e78024bc352064d645d9c23652690445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4090019, "upload_time": "2019-01-31T00:15:47", "url": "https://files.pythonhosted.org/packages/4e/b1/47aa74b2269e40d661d6b4283bdff8fa367375faaa40081e686c342bd5c0/django-emoji-2.2.2.tar.gz" } ] }