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.6.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for german_foodemoji-1.1.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3418da1eb7dd99affef6d3e157084d5e4f7001b3864d02d6c0e99e912d118cd0 |
|
MD5 | 46cae9042b5cbe579f14e882c3ba0c69 |
|
BLAKE2b-256 | 04d4e4a5938760154e509317e212b7c3cca1439c2b808447e88c4692eaf7a8d8 |