-
Notifications
You must be signed in to change notification settings - Fork 1
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
Creating a new tag #8
Comments
Hi @garymh I'll try to figure out what's causing the issue. Could you give me the Alfred logs ? |
Sure!
|
really strange, could you confirm me that you have version 1.3.0 of the workflow ? When I trigger harvest :
I am seeing this : From there you can create tags and associate it to emojis. |
Oh weird... hmm. Yep, I have version 1.3.0. Something might be configured differently in Alfred... or in Python? |
could you check that you have |
Yep- I have
My
|
Could you try to refresh your API ? |
Yes I think something is not configured correctly but I can't really know what's happening. How did you install python ? Could you also give me the new logs ? Could you maybe try to reinstall the workflow (just to make sure). I'll try my best to debug. |
I installed Python via homebrew. I uninstalled it via command line and then reinstalled it through Alfred, but nothing. I reinstalled the workflow several times after clearing out The only log I get is the |
It must be something with |
Ok then. Could you confirm me that you don't have any emojis icons when you trigger |
Some of the emoji icons appear, I'm not sure if they're sorted but it stops at "person facing right". Yep- emoji font is in the same place. I am on an M1 though |
mhh kind of weird. Is it possible that the emojis without icons are emojis from unicode 15.1 ? There aren't available yet but the unicode is already in the api since end of 2023 (see this article). But it shouldn't be a problem, for me it looks like this: Could you delete these elements from the cache folder EDIT : Could you try this python script ? from PIL import Image, ImageDraw, ImageFont
def convert_emoji_to_png(emoji):
image_size = (74 , 74) # set image size
image = Image.new("RGBA", image_size, (0, 0, 0, 0)) # Set transparent background
font_size = 64 # Adjusted font size
font_path = "/System/Library/Fonts/Apple Color Emoji.ttc"
font = ImageFont.truetype(font_path, font_size, encoding='unic')
draw_position = (int((image_size[0] - font_size) / 2), int((image_size[1] - font_size) / 2))
draw = ImageDraw.Draw(image)
draw.text(draw_position, emoji, font=font, embedded_color=True)
image.show()
try:
convert_emoji_to_png("🚶➡️")
except Exception as e:
print(e) it should render this |
Same result after dumping the cache 😞 Oh, but the python script did:
|
I think you might be on to something! 🍄 works but 🚶➡️does not. I wonder if it's because there's a modifier on that one? I'm not sure how emoji works, but is there an emoji + skin tone modifier in Unicode? |
I can fix that by just ignoring emojis that fails to be converted into images, or assign them a default image. Also, is there any improvement in the tags section (that was the original subject 🙃)? Yes some of the codes can be "merged" as one emoji (👋 + 🏻 = 👋🏻, see here). When the Unicode consortium approved an emoji, each platform (Google, Facebook, Apple) can integrate these codes with a design. Note that the design can change over the years but not the codes. What I still find weird is : why the behavior is different ? Maybe we can create a GitHub issue in the pillow repo. I can do that if you can provide :
|
Yep! Disabling the line here let me run everything correctly. Definitely seemed to be a unicode hangup.
Yeah, that's very strange. I'm wondering if macOS changed something recently too. Here's my info: Python 3.12.2 |
- If the conversion of an emoji fails to be converted by pillow, link the emoji to the default unicode logo #8 - force the api refresh when upgrading version - remove unnecessary conditions for tags
Awesome!! Thanks for the help, Benjamin!! |
Hi - this might be a dumb question, but I'm a little confused on how you enter the tag section. Typing the
harvest
keyword brings up:but after that, hitting
return
on the Tags section just closes the Alfred window. Typing any arguments (harvest tag
) just goes to my default search...I'm using Python 3.12.2 and pillow 10.2.0_1
The text was updated successfully, but these errors were encountered: