Decorate German text with food specific emojis
Project description
foodemoji
Decorate a German text (e.g. restaurant menu) with food emojis
Example
>>> import foodemoji
>>> text = """Hähnchenbrust mit Apfelrotkraut
Vegetarische Maultaschen
Kartoffelknödel
Paniertes Schnitzel mit Pommes frites
Rinderbraten, Rotweinsauce und Spätzle"""
>>> print(foodemoji.decorate(text))
"""Hähnchenbrust :rooster: mit Apfelrotkraut :red_apple:
Vegetarische :green_heart: Maultaschen
Kartoffelknödel :potato:
Paniertes Schnitzel mit Pommes frites :french_fries:
Rinderbraten :cow:, Rotweinsauce :wine_glass: und Spätzle"""
>>> import emoji
>>> print(emoji.emojize(foodemoji.decorate(text)))
"""Hähnchenbrust 🐓 mit Apfelrotkraut 🍎
Vegetarische 💚 Maultaschen
Kartoffelknödel 🥔
Paniertes Schnitzel mit Pommes frites 🍟
Rinderbraten 🐮, Rotweinsauce 🍷 und Spätzle"""
>>> text2 = """Gegrillte Hähnchenbrust mit gekochter Hähnchenbrust
Gebratenes Hähnchen mit Hähnchenschnitzel"""
>>> print(foodemoji.decorate(text2))
"""Gegrillte Hähnchenbrust :rooster: mit gekochter Hähnchenbrust :rooster:
Gebratenes Hähnchen :rooster: mit Hähnchenschnitzel :rooster:"""
>>> print(foodemoji.decorate(text2, line_by_line=True))
"""Gegrillte Hähnchenbrust mit gekochter Hähnchenbrust :rooster:
Gebratenes Hähnchen mit Hähnchenschnitzel :rooster:"""
Install
pip install german-foodemoji
See: https://pypi.org/project/german-foodemoji/
Requirements
- Python 2/3
To actually print the unicode emojis and for the units tests the package emoji>=0.5.0 is required:
pip install emoji
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
german-foodemoji-1.1.0.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for german_foodemoji-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32246f9f92b9b1f123b51eb5acb983a2dc8962be705899d089df2a0f0b4c6244 |
|
MD5 | 840b1958e137a41b984a89d7e5b1ee89 |
|
BLAKE2b-256 | 733095574cc4e084133b6c6d439da44aba389a1841b637c922efc5957a7ab738 |