emojito-0.1.0.post2
توضیحات
Define your own shortnames to be replaced with emojis or other content.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | emojito-0.1.0.post2 |
| نام | emojito |
| نسخه کتابخانه | 0.1.0.post2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Maximillian Strand |
| ایمیل نویسنده | maxi@millian.se |
| آدرس صفحه اصلی | https://gitlab.com/emojito/emojito |
| آدرس اینترنتی | https://pypi.org/project/emojito/ |
| مجوز | GPL-3.0-or-later |
# 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
```py
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)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=4.11.1,<5.0.0 | beautifulsoup4 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<4.0 | Python |
نحوه نصب
نصب پکیج whl emojito-0.1.0.post2:
pip install emojito-0.1.0.post2.whl
نصب پکیج tar.gz emojito-0.1.0.post2:
pip install emojito-0.1.0.post2.tar.gz