mcskrzypczak 30 Posted May 13, 2015 Share Posted May 13, 2015 (edited) IntroductionThe Get App Icon purpose is to: extract app’s icon from installed in /Application folder apps; extract app’s icon from Alfred action extension download app’s icon from App Store and Mac App Store Download from Packal → link direct download → link Screenshots How it works?To invoke Get App Icon workflow: use the icon keyword which will list all available in /Application folder apps; at top of results there is option to switch to online (App Store / Mac App Store) search that will search for typed app name; use File Action Extract app icon on chosen app on your Mac. The workflow behaves as follow: when used with local application it converts app’s icon in .icns format into .png using the biggest icon size (which is usually 1024 × 1024 or 512 × 512 px) and save it into Desktop folder; when used with online application it downloads its icon in .png format (please read Tips also for further information). TipsAs you know, iPhone as well as iPad app icons have rounded corners. But the downloaded files will be squares until you meet this requirement: you have to have installed PIL library for Python. If you don’t have it, but want to, it is quite easy to install. First of all, you need to install pip — package installer for Python. Run below command in Terminal (required administrator password): sudo easy_install pip Next, install Pillow library using pip: pip install --user Pillow That's it. If you want to check if everything was installed properly run in Terminal command: python You will get into Python editor. Type in there: import PIL If everything was made properly you shouldn’t get any message just get into new line.Now you’re done! From now on the downloaded through Get App Icon workflow icons from App Store will have rounded corners! Release info:1.5: initial public release Edited May 21, 2016 by Maciej Skrzypczak Link to post
deanishe 1,451 Posted May 15, 2015 Share Posted May 15, 2015 Cool workflow! FWIW, adding your Homebrew Python's site-packages to the system Python's site-packages isn't a particularly great thing to do in any case, and it won't always work in this case because the system Python on Snow Leopard is 2.6. I think it might be a better idea to use pip install --user Pillow. It will be installed in a standard location for the right Python. Link to post
mcskrzypczak 30 Posted May 18, 2015 Author Share Posted May 18, 2015 Cool workflow! FWIW, adding your Homebrew Python's site-packages to the system Python's site-packages isn't a particularly great thing to do in any case, and it won't always work in this case because the system Python on Snow Leopard is 2.6. I think it might be a better idea to use pip install --user Pillow. It will be installed in a standard location for the right Python. Thanks for feedback! I gave the Homebrew solution because as far as I can remember there were problems with pip not integrating Pillow with Python. But maybe this changed now. I will check and eventually update my first post. Link to post
Serge 0 Posted December 2, 2015 Share Posted December 2, 2015 (edited) HI Maciej, Great workflow. If I’m not mistaken, icons are extracted from a european App Store ? Is there a way to make the workflow extract icons from the App Store in my country (Canada) ? Edited December 2, 2015 by Serge Link to post
mcskrzypczak 30 Posted December 2, 2015 Author Share Posted December 2, 2015 HI Maciej, Great workflow. If I’m not mistaken, icons are extracted from a european App Store ? Is there a way to make the workflow extract icons from the App Store in my country (Canada) ? Hi Serge, glad you like my workflow. Sure you can extract icons from Canada App Store, altough it requires editing one of the workflow's files. In Alfred Preferences, go to Workflows tab, find my Get App Icon workflow and click it with right mouse button (or Ctrl+click). In the pop-up menu choose Show in Finder. The Finder window with workflow's files will open. Just edit with some text editor (like TextWrangler) the file acpython.py. Right at the top of the file you should find a lot of "#". Underneath is COUNTRY variable with value of 'pl'. Just change 'pl' to ISO code of country you want (for Canada that should be 'ca', for others see this Wikipedia site → link). Save the file. Now you should get results from your App Store. Link to post
Serge 0 Posted December 2, 2015 Share Posted December 2, 2015 (edited) Done. Thanks very much Maciej for this very quick reply. Edited December 2, 2015 by Serge Link to post
mcskrzypczak 30 Posted December 2, 2015 Author Share Posted December 2, 2015 No problem! Link to post
gingerbeardman 9 Posted January 13, 2016 Share Posted January 13, 2016 (edited) I ran into this issue installing pip. matt$ sudo easy_install pip Password: Searching for pip Best match: pip 7.1.2 Processing pip-7.1.2-py2.7.egg pip 7.1.2 is already the active version in easy-install.pth Installing pip script to /usr/local/bin error: [Errno 2] No such file or directory: '/usr/local/bin/pip' Solution was to cd to /usr/local/bin and delete the three symlinks for pip (pip, pip2, pip2.7) that were there and getting in the way. Then redo the command easy_install command. BUT i still do not have rounded corners? Edited January 13, 2016 by gingerbeardman Link to post
gingerbeardman 9 Posted January 24, 2016 Share Posted January 24, 2016 (edited) Installing this on my home machine, pip & Pillow installed without issue. But still no rounded corners? So, I did some debugging and it seems that often (always?) the icon is downloaded as a JPG. The rounded corner operation works fine, but the image is saved back as a JPG. quick fix in acpython.py this: output.save(qr) becomes: output.save(qr + '.png') to create a copy of the icon as a png with rounded corners Edited January 24, 2016 by gingerbeardman Chris Messina 1 Link to post
mcskrzypczak 30 Posted May 21, 2016 Author Share Posted May 21, 2016 Installing this on my home machine, pip & Pillow installed without issue. But still no rounded corners? So, I did some debugging and it seems that often (always?) the icon is downloaded as a JPG. The rounded corner operation works fine, but the image is saved back as a JPG. quick fix in acpython.py this: output.save(qr) becomes: output.save(qr + '.png') to create a copy of the icon as a png with rounded corners Thanks for fix gingerbeardman! I've also updated direct download link in first post. Link to post
Evans Thompson 0 Posted August 31, 2016 Share Posted August 31, 2016 Thanks for fix gingerbeardman! I've also updated direct download link in first post. BTW, Packal still shows version 1.5. I'm on Alfred 3, and for a minute there, I thought I was losing my mind or had forgotten how to use the workflow. LOL Link to post
DJay 13 Posted June 7, 2019 Share Posted June 7, 2019 (edited) Has this workflow stopped working with Alfred 4? 🤔 Search App Icon online is not working for me. Thx Edited June 7, 2019 by DJay Link to post
Bhishan 4 Posted June 12, 2019 Share Posted June 12, 2019 Does not work with online search for Alfred 4.0. [18:05:28.890] Logging Started... [18:05:30.309] Get App Icon [1.5][Script Filter] Queuing argument 'pastebin' [18:05:30.412] Get App Icon [1.5][Script Filter] Script with argument '(null)' finished [18:05:30.415] Get App Icon [1.5][Script Filter] <?xml version="1.0"?><items> <item> <arg>online^pastebin</arg> <title>Search app icons online</title> <subtitle>Switch to online search in App Store and Mac App Store</subtitle> </item> <item> <arg></arg> <title></title> <icon type="fileicon"></icon> </item> </items> [18:05:34.789] Get App Icon [1.5][Script Filter] Processing complete [18:05:34.797] Get App Icon [1.5][Script Filter] Passing output 'online^pastebin' to Run Script [18:05:34.991] ERROR: Get App Icon [1.5][Run Script] 35:44: syntax error: A “"” can’t go after this identifier. (-2740) Link to post
Kaihao 4 Posted October 21, 2019 Share Posted October 21, 2019 A simple Fix for Alfred 4.0. Right click the workflow, select "open in Finder". Open file acshell.sh. Then Change all the tell application "Alfred 2" to tell application "Alfred 4" Done! Chris Messina and DJay 1 1 Link to post
DJay 13 Posted October 21, 2019 Share Posted October 21, 2019 Thanks a lot. That was a good hint. I now can see a list of Apps again but unfortunately the icon is not downloading to the desktop. Maybe something in relation to Catalina? 🤔 Link to post
Kaihao 4 Posted October 21, 2019 Share Posted October 21, 2019 (edited) I'm also using Catalina. This workflow works fine, except for system apps. In macOS Catalina, system apps(except Safari) are actually at /System/Applications, not /Applications. Edited October 21, 2019 by Kaihao Link to post
Kaihao 4 Posted October 21, 2019 Share Posted October 21, 2019 To fix this, you can add this after line11 of file acshell.sh LIST+=$(find /System/Applications -maxdepth 2 | egrep -i "\.app$" | grep -i "$QUERY") Then it works for most of system apps. But Catalyst Apps, like Podcast.app, still doesn't work. As their internal structures(Info.plist and icns files) are different from the AppKit apps. I don't know how to fix this. DJay and Chris Messina 1 1 Link to post
DJay 13 Posted October 21, 2019 Share Posted October 21, 2019 Thanks again for your reply and your time. Everything is working now. 👍 Link to post
jmueller 1 Posted December 29, 2019 Share Posted December 29, 2019 Hi all, I just downloaded from packal (old 1.5) -> does not work on Catalina Then I tried the direct download link (should be 1.6?) -> 404 The "old" workflow that did work pre Catalina does not work any more in Catalina. I'm using Alfred v 4. Can someone add a working copy who is running it on Catalina and Alfred v 4? Best regards, Jan Link to post
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now