{"id":21440722,"url":"https://github.com/jay3332/pilmoji","last_synced_at":"2025-04-06T04:11:14.523Z","repository":{"id":45864546,"uuid":"367200316","full_name":"jay3332/pilmoji","owner":"jay3332","description":"Pilmoji is a fast and reliable emoji renderer for PIL.","archived":false,"fork":false,"pushed_at":"2024-06-18T22:10:47.000Z","size":55,"stargazers_count":85,"open_issues_count":15,"forks_count":31,"subscribers_count":2,"default_branch":"2.0","last_synced_at":"2025-03-30T03:08:51.167Z","etag":null,"topics":["emoji","pil","pillow","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jay3332.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-13T23:42:05.000Z","updated_at":"2025-03-22T20:34:37.000Z","dependencies_parsed_at":"2024-06-18T19:48:24.040Z","dependency_job_id":"2c46c962-285a-436d-8803-0de2a086bddb","html_url":"https://github.com/jay3332/pilmoji","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.2666666666666667,"last_synced_commit":"2df25493407f1d389a18f4b3e9a5fae4bd922f8a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay3332%2Fpilmoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay3332%2Fpilmoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay3332%2Fpilmoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay3332%2Fpilmoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jay3332","download_url":"https://codeload.github.com/jay3332/pilmoji/tar.gz/refs/heads/2.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430870,"owners_count":20937874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","pil","pillow","python","python3"],"created_at":"2024-11-23T01:17:56.776Z","updated_at":"2025-04-06T04:11:14.376Z","avatar_url":"https://github.com/jay3332.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pilmoji\nPilmoji is an emoji renderer for [Pillow](https://github.com/python-pillow/Pillow/), \nPython's imaging library.\n\nPilmoji comes equipped with support for both unicode emojis and Discord emojis.\n\n## Features\n- Discord emoji support\n- Multi-line rendering support\n- Emoji position and/or size adjusting\n- Many built-in emoji sources\n- Optional caching\n\n## Installation and Requirements\nYou must have Python 3.8 or higher in order to install Pilmoji.\n\nInstallation can be done with `pip`:\n```shell \n$ pip install -U pilmoji\n```\n\nOptionally, you can add the `[requests]` option to install requests\nalongside Pilmoji:\n```shell \n$ pip install -U pilmoji[requests]\n```\n\nThe option is not required, instead if `requests` is not installed, \nPilmoji will fallback to use the builtin `urllib`.\n\nYou may also install from Github.\n\n## Usage\n```py \nfrom pilmoji import Pilmoji\nfrom PIL import Image, ImageFont\n\n\nmy_string = '''\nHello, world! 👋 Here are some emojis: 🎨 🌊 😎\nI also support Discord emoji: \u003c:rooThink:596576798351949847\u003e\n'''\n\nwith Image.new('RGB', (550, 80), (255, 255, 255)) as image:\n    font = ImageFont.truetype('arial.ttf', 24)\n\n    with Pilmoji(image) as pilmoji:\n        pilmoji.text((10, 10), my_string.strip(), (0, 0, 0), font)\n\n    image.show()\n```\n\n#### Result\n![Example result](https://jay.has-no-bra.in/f/j4iEcc.png)\n\n## Switching emoji sources\nAs seen from the example, Pilmoji defaults to the `Twemoji` emoji source. \n\nIf you prefer emojis from a different source, for example Microsoft, simply\nset the `source` kwarg in the constructor to a source found in the \n`pilmoji.source` module:\n\n```py \nfrom pilmoji.source import MicrosoftEmojiSource\n\nwith Pilmoji(image, source=MicrosoftEmojiSource) as pilmoji:\n    ...\n```\n\n![results](https://jay.has-no-bra.in/f/suPfj0.png)\n\nIt is also possible to create your own emoji sources via subclass.\n\n## Fine adjustments\nIf an emoji looks too small or too big, or out of place, you can make fine adjustments \nwith the `emoji_scale_factor` and `emoji_position_offset` kwargs:\n\n```py \npilmoji.text((10, 10), my_string.strip(), (0, 0, 0), font,\n             emoji_scale_factor=1.15, emoji_position_offset=(0, -2))\n```\n\n## Contributing\nContributions are welcome. Make sure to follow [PEP-8](https://www.python.org/dev/peps/pep-0008/)\nstyling guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay3332%2Fpilmoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjay3332%2Fpilmoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay3332%2Fpilmoji/lists"}