Emojito
There are many packages that provide shortnames for emojis. This package allows you to provide your own shortnames and with what to replace them.
Features
- Find and replace shortnames. You provide the shortnames and the content with which to replace them. You can also provide a callable from which you can in stead generate the content.
- Compatible with HTML. In stead of indiscrimnately finding and replacing shortnames anywhere in the text, accidentally replacing content that overlaps with tags, the HTML will be parsed and only the plain text within tags will be affected.
Example
from emojito import Emojitos
# Define your shortnames and their replacements.
emojitos = Emojitos()
emojitos.add(['one'], '1️⃣')
emojitos.add(['two'], '2️⃣')
emojitos.add(['three'], '3️⃣')
# Provide a text containing your shortnames.
document = """
<h1>This is an example of Emojito</h1>
<ul>
<li>:one: Number One</li>
<li>:two: Number Two</li>
<li>:three: Number Three</li>
</ul>
"""
# Replace all instances of your shortnames in the document.
result = emojitos.replace(document)
Metadata
Release files for emojito 0.1.0.post2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emojito-0.1.0.post2.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emojito-0.1.0.post2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.9 kB
Release files / emojito-0.1.0.post2.tar.gz
| Download URL | emojito-0.1.0.post2.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa8846aac53a095b8110111c7e2d32d138030a318da4acf2c5684faab3b55628
|
|
BLAKE2b-256 checksum How to use checksums |
c2349fcd8e6959e491c4737dd9fa560f375f8870a82524cdac418970e157d2f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / emojito-0.1.0.post2-py3-none-any.whl
| Download URL | emojito-0.1.0.post2-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d03880290a5e5b4cbc1cbdc12776d873dd8538d28d5118ee9ab500049400684
|
|
BLAKE2b-256 checksum How to use checksums |
bced85df193c9674cc9bc48c940dfc9e0462cd70ce40ac16e1f465def6cf258a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|