emoji-shortname
Replace emoji short names with their corresponding emojis.
Overview
The short names we are familiar with (e.g. the ones used on sites like GitHub) are not inline with the CLDR short names defined in the Unicode standard. This makes mapping short codes to emojis a bit of a challenge. So, I punt on this issue, and defer to the emoji package created by Taehoon Kim and Kevin Wurster. Their wonderful library does the heavy lifting.
This extension amounts to a find-and-replace. Find the short name, replace it with the
appropriate emoji. It works with both Markdown and reStructuredText.
Details
Emojis are added to documents by sandwiching their short names between colons.
For example, :smile: resolves to :smile:. This syntax conflicts with
the way you provide options to directives in Sphinx. And, since the extension
ties into the source-read hook, those directives are yet to be resolved.
As such, if an option shares the same name as an emoji short code, the option
will be replaced by the emoji. Though I am unaware of any case where this happens,
be aware that it is a possibility.
Development
The project is managed with poetry.
To contribute to emoji-shortname, first install poetry. Once installed,
fetch the project dependencies with poetry install. From here, you can
iterate on the code and run the unit tests with poetry run tox pyproject.toml
Usage
Simply install the package with your manager of choice (e.g. poetry, pip, etc)
and then add the extension to your sphinx config.py.
extensions = ["emoji_shortname"]
Metadata
Release files for emoji-shortname 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| emoji-shortname-0.1.1.tar.gz | 3.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emoji_shortname-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / emoji-shortname-0.1.1.tar.gz
| Download URL | emoji-shortname-0.1.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbf738ca707f6fa8379c6a667c5cbfaa3eece579e7e82feeaa411e9b2e5ad413
|
|
BLAKE2b-256 checksum How to use checksums |
51211a9d59598c1fe60d6d79ac695e2ff06367c75a40e87431ca1aa073222ae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.6 Darwin/20.5.0
|
Release files / emoji_shortname-0.1.1-py3-none-any.whl
| Download URL | emoji_shortname-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56137aa00d54835b2c7769442f548bae109c425c47af011053ef97cc61f1aad9
|
|
BLAKE2b-256 checksum How to use checksums |
da1c3fa794b040705d93d730e9e56911b59a7a15a5a78c9b19f4fdc3a1840813
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.6 Darwin/20.5.0
|
Security for emoji-shortname 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.