Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to "shift" emoji #257

Open
lsmith77 opened this issue May 12, 2023 · 2 comments
Open

ability to "shift" emoji #257

lsmith77 opened this issue May 12, 2023 · 2 comments

Comments

@lsmith77
Copy link

I mentioned my use case already here.

Essentially I am modifying emoji to generate alternatives. But there are some challenges.

f.e. some times there is a person/people option (f.e. πŸ§‘β€πŸ€β€πŸ§‘), sometime there isn't (f.e. πŸ§‘β€πŸš’). also sometimes there are skin tone options and sometimes not.

as such it would be nice to have easy access to such meta data (ie. what alternative variations exists) and ideally even a function to create such variations.

metadata = emoji.get_metadata("πŸ§‘β€πŸ€β€πŸ§‘")
if metadata.supports_skin_tone:
  ...

print(emoji.create_emoji(metadata, remove_skin_tone=True)
print(emoji.create_emoji(metadata, skin_tone='dark')
# gender='person' would use person/child if supported by the emoji, otherwise simply swap gender (ie. `man` to `women`, `girl` to `boy` etc)
print(emoji.create_emoji(metadata, gender='person')

Eventually it would be sweet to then also support headscarf, turban etc.

@cvzi
Copy link
Contributor

cvzi commented May 12, 2023

I had started to work on it: I generated a list of all the variations that are "recommended by unicode.org": https://gist.github.com/cvzi/02e78ad0a8671e2cb5e9e147e825a08b

@lsmith77
Copy link
Author

about the metadata idea, I just found emoji.EMOJI_DATA which ideally could be expanded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants