mcskrzypczak
-
Posts
64 -
Joined
-
Last visited
-
Days Won
5
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by mcskrzypczak
-
-
And once again the workflow got updated to version 2.2 (see the first post for download and changelist)
- DJay and Chris Messina
- 2
-
Once more updated as some bugs were squished (see the first post for download).
-
I've finally updated the action (see the first post for download).
The new version require python3 and Pillow installed.
-
Version 1.6 is here!
Once more I rewrote it (this time in Python) and now it supports multiple file/folder names copying!
Download from here (link also in first post).
-
We can use Alfred on all our Macs. I have two – one for personal use and one for working.
I would appreciate possibility to disable workflows on certain Mac so I would have enabled those used on personal Mac and others on my work Mac.
There is such possibility in Keyboard Maestro app and I am using it and thought that Alfred could also include such option.
-
-
Okay, so I replaced XML and use JSON instead and same thing happens.
When Alfred filters results is unchecked and I type city name with diacritical letter, like mentioned before "Gdańsk", the workflow shows result that it couldn't find any cities.
On the other hand, when Alfred filters results is checked I got results for "Gdańsk". However, when I type the name of the city that is not in the base like "London" the workflow behaves like there would be some problem, error (but debug window didn't show anything). In that case it should display result that it couldn't find any cities with such name.
As I mentioned in first post, Python script itself works without any errors. It has set coding to UTF-8 also. I have set the LC_CTYPE var to pl_PL.UTF-8 in Workflow Environment Variables but without any success.
Maybe that is Alfred bug when using diacritical letters?
Here is the script (to try it from Terminal you have to comment all that indicates to wdata variable as it depends on Alfred's own variables): link.
And here is updated workflow: link. -
+ 1
I want that feature to be added too. As well as ability to use scripts inside snippets.
-
Ahhh, seems like I miss that a long time ago!
Thank you very much for help!
-
One of new Alfred 3 elements is Write Text File. Let say I want to use it in some more complicated workflow that prints some text to the file and then is invoked in other part of the workflow. My question is, how can I refer to that file later? How to properly use Write Text File element?
I know there is option to give absolute file path as well as writing to workflow's folder that is synched. But I want to know, what's the best method to use such file when it is saved to workflow's data folder (not synched, local)? I know there was a script for Alfred 2 to find such folder but it was quite long. Is there any easier methods in Alfred 3 to find that data folder and saved there mentioned text file? Maybe some variable?
-
I have a weird problem with my workflow. It does not show any results in Alfred but works when run from Terminal. But let me explain more on that topic.
My workflow's job is to list Polish cities from webpage (get the list from JSON results from page) and download detailed weather forecast as png file. The main script is written in Python.
The thing is, Polish cites also uses diacritical letters (ą, ć, ę, ł, ń, ó, ś, ź, ż). And when I want to use my workflow with city that contain one or more of mentioned letters – say <code>Gdańsk</code> the workflow itself won't work – just shows the result prepared for situation when no results find.However, when I debug the script from Terminal:
python script.py "Gdańsk"
I got all of the XML code for results:
<?xml version="1.0"?><items> <item> <arg>http://m.meteo.pl/warszawa/weather;Warszawa</arg> <title>Ostatni → Warszawa</title> <subtitle>Prognoza 60h. Wciśnij Cmd dla prognozy 84h.</subtitle> <subtitle mod="cmd">Prognoza 84h.</subtitle> </item> <item autocomplete="Gdańsk"> <arg>http://m.meteo.pl/gdansk/weather;Gdańsk</arg> <title>Gdańsk</title> <subtitle>Prognoza 60h. Wciśnij Cmd dla prognozy 84h.</subtitle> <subtitle mod="cmd">Prognoza 84h.</subtitle> </item> <item autocomplete="Nowy Dwór Gdański"> <arg>http://m.meteo.pl/nowy-dwor-gdanski/weather;Nowy Dwór Gdański</arg> <title>Nowy Dwór Gdański</title> <subtitle>Prognoza 60h. Wciśnij Cmd dla prognozy 84h.</subtitle> <subtitle mod="cmd">Prognoza 84h.</subtitle> </item> <item autocomplete="Pruszcz Gdański"> <arg>http://m.meteo.pl/pruszcz-gdanski/weather;Pruszcz Gdański</arg> <title>Pruszcz Gdański</title> <subtitle>Prognoza 60h. Wciśnij Cmd dla prognozy 84h.</subtitle> <subtitle mod="cmd">Prognoza 84h.</subtitle> </item> <item autocomplete="Starogard Gdański"> <arg>http://m.meteo.pl/starogard-gdanski/weather;Starogard Gdański</arg> <title>Starogard Gdański</title> <subtitle>Prognoza 60h. Wciśnij Cmd dla prognozy 84h.</subtitle> <subtitle mod="cmd">Prognoza 84h.</subtitle> </item> </items>
Notice that first item group is previously used city. But all the other show results with name "Gdańsk".
And that is behavior, when the option in Script Filter – Alfred filters results is unchecked. When I check that, all seems to work fine. So why am I bothering you at all? Because I rather want to uncheck that option – it affects situations when I want to not display any results (in some cases).
So I want to ask you for help with that problem. Maybe there is some encoding problem in Alfred 3 itself?
The workflow can be downloaded here.
Just copy and paste "Gdańsk" to debug it.
-
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.
-
-
No problem!
-
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.
-
For those of us who like to keep our apps organized in folders, what about implementing a way to search for whether the app already exists in a subfolder in /Applications, and then moving the update to that same folder?
Thank you Paul for feedback. I will try to implement that. Stay tuned.
-
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.
-
Update 1.11:
- improve mounting dmg files – now works with images with EULA
I have updated my first post with download links:
- get Install App workflow from Packal
- get Install App workflow direct download
-
I made a small modification which will enable the local ip to be shown whether wifi or ethernet is used (or thunderbolt ethernet adapter in my case)
LOCIP=$(ipconfig getifaddr en0 || ipconfig getifaddr en1 || ipconfig getifaddr en3)
Thanks for suggestion! I'll update my workflow.
-
Introduction
Have you ever needed that specific app icon to use in your review? Get App Icon workflow comes to help! Open up Alfred, type 'icon' and app's name. If it one installed in your macOS, you should find it in the list. Press Enter and the icon will await on your Desktop.
What if that's the app for iPhone or iPad (or just app from Mac App Store)? Just use the 'online' option to search and download.
Download
Screenshots
http://i.imgur.com/QLa4WD5m.pnghttp://i.imgur.com/8MUWUrkm.pnghttp://i.imgur.com/JhJJfhJm.pnghttp://i.imgur.com/Muq658Jm.pnghttp://i.imgur.com/Xbowu4gm.png
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).
Requirements
- installed Python version 3
- installed Pillow library for Python 3
Changelist:2.2:
- added workflow's description
- country code and limit are set as Environment Variables, so there is no need to edit files, just change them in Workflow Environment Variables window
- bug fixes
2.1:
- bug fixes
2.0:
- action rewritten to use Python3
1.5:
- initial public release
- jesused, gohoyer and Chris Messina
- 1
- 2
-
Ok so then here's an idea: you `rsync` a temporary copy of the file, you `mv` the file, and then delete the temp copy. Then you don't need to close the app (except if the `mv` failed but then it'll only be rare cases). If the `mv` failed, you have the backup temp copy to start the process over.
Okay, to be clear, to know if I understand you. What you suggest is to copy app using `rsync` into temporary folder and then move it into /Applications folder in place of old app?
If so, there are my thoughts: 1) you can not use `mv` command to replace existing folder. It works only if the folder exists but in other cases it will move new folder INTO old one. I could also mv just the contents of new folder into old one, so you will end up with old and new files and in some cases it can brake the app I think. 2) I do not think replacing app if it is already opened is safe and I would not want cause that someone would lose his files. Due to SSD popularity closing app, replacing it with `rsync` and open it up again takes just seconds but you will be sure that it all was made in safe way.
If you think that I am exaggerating and there is no risk into replacing new app with old one I can search solutions using other languages (AppleScript, Python, etc.).
Anyway thank you one more time for spending time on my workflow and made it better by providing such excellent feedback.
-
Aaaand another update – 1.10:
- displays app icon if user has that app already (eligible for app updates files)
I have updated my first post with download links:
- get Install App workflow from Packal
- get Install App workflow direct download
-
No idea, sorry. Either these won't have a cool icon or maybe some already existing code out there can help you with this. But I have personally no idea.
I was also thinking that you might want to do a deeper search, find apps in folders within the Download folder, that'd be cool too.
You seem to be developing this workflow pretty actively so I'll keep inputting: when dealing with .app files, why copy them and not move them? Then you wouldn't need to close the app first, and the user wouldn't have (albeit temporarily) twice the app on their computer... This happened to me this morning :-)
So I did successfully added ability to search subdirectories also. As well as „moving” .app packages which means it is still copied to /Applications folder but then the source file is deleted without prompt. The "cp" or "mv" commands are not so reliable as "rsync" command is (that I use) and that is why I decided to leave it as is only with mentioned addition – removing .app package.
Now the app icons in resluts: I did get managed how to display app's icon if it is found in source directory (which also let's me to drastically reduce size of whole workflow), but I still did not solved how to add icons corresponding to apps inside of .zip, .dmg and .pkg files. But I will work on that.
-
1.9 update is here and contains:
- bug fixes
- dramatically reduces workflow size (from ~700 KB to 150 KB)
- workflow now searches in subdirectories of main directory
- if workflow finds .app package it will display that app's real icon (not a placeholder)
I have updated my first post with download links:
- get Install App workflow from Packal
- get Install App workflow direct download
[2.2] Get App Icon
in Share your Workflows
Posted
Hey DJay!
Thanks for using my workflow! Sorry to hear it not working properly tho… I had same problem before. In my case turns out I had installed python3 in 2 folders – /usr/bin/ and /usr/local/bin. The latter had Pillow installed but not the first one. And that first one was used by Alfred.
If you can, open Alfred preferences, go to Workflows, find Get App Icon workflow, select element like on the attached screenshot, then turn on debugging with Only selected object(s) selected. Then run your workflow and look for any errors that might appear there.