deanishe Posted September 5, 2015 Share Posted September 5, 2015 Good tip, Vero. I've edited the script to not change filenames. The compressed images get downloaded to a different folder, so they won't clash, and now I don't have to rename the files before replacing the originals. Link to comment
CarlosNZ Posted October 6, 2015 Author Share Posted October 6, 2015 Hey folks, I've updated the workflow to v1.3 to now automatically support JPG files as well. (As per Vero's suggestion above.) Download v1.3 Cheers, Carl. Link to comment
r1si Posted October 18, 2015 Share Posted October 18, 2015 Hi Carl, first of all thanks a lot for your plugin... it's awemsome. Now, with el Capitan i switch to pathfinder... can help me to convert the script to read the path finder file? thanks a lot Elia Link to comment
xilopaint Posted November 12, 2015 Share Posted November 12, 2015 Would be very useful a workflow to compress PDFs. Link to comment
Serge Posted January 5, 2016 Share Posted January 5, 2016 Great workflow! Thanks Carl for sharing. Link to comment
guiluchesi Posted January 11, 2016 Share Posted January 11, 2016 AWEEEESOME! Every new workflow that I see is a new reason to love Alfred <3 Link to comment
Hendrik Posted June 29, 2016 Share Posted June 29, 2016 Hi, I'm a newbie with workflows and don't know where to put the API code. I go to: tinypng_config within the workflow and see /bin/bash key="{query}" #Storage directory for API key PREFS="$HOME/Library/Application Support/Alfred 2/Workflow Data/carlosnz.tinypng" #Create storage folder mkdir -p "$PREFS" #Save user's key to storage file echo "$key">"$PREFS/api_key" #Notify echo "New API key applied:"$'\n'"$key" Where can I put the API? Best regards, Hendrik Link to comment
jarhead Posted July 2, 2016 Share Posted July 2, 2016 You don't need to go to tinypng_config in the workflow... just start typing tiny into Alfred and you will be provided with three options. One option will be "Enter/Change API Key". Choose this option and it will prompt for your API key. Paste your key, hit return and you should be good to go. Hi, I'm a newbie with workflows and don't know where to put the API code. I go to: tinypng_config within the workflow and see /bin/bash key="{query}" #Storage directory for API key PREFS="$HOME/Library/Application Support/Alfred 2/Workflow Data/carlosnz.tinypng" #Create storage folder mkdir -p "$PREFS" #Save user's key to storage file echo "$key">"$PREFS/api_key" #Notify echo "New API key applied:"$'\n'"$key" Where can I put the API? Best regards, Hendrik CarlosNZ 1 Link to comment
funkymonkey Posted September 25, 2017 Share Posted September 25, 2017 Anyone on High Sierra (GM) using this workflow? Mine has stopped working. I use it every day as well The report just states: FILE: /Users/me/Documents/Temp/test4.png Problem downloading test4_shrink.png Link to comment
CarlosNZ Posted September 25, 2017 Author Share Posted September 25, 2017 1 hour ago, funkymonkey said: Anyone on High Sierra (GM) using this workflow? Mine has stopped working. I use it every day as well The report just states: FILE: /Users/me/Documents/Temp/test4.png Problem downloading test4_shrink.png I'll check it out once I install HS later this week. Thanks. Link to comment
xilopaint Posted September 25, 2017 Share Posted September 25, 2017 1 hour ago, CarlosNZ said: I'll check it out once I install HS later this week. Thanks. Hey, this is not related to the HS issue but once you look into it remember to change the location of the data folder by adopting the environment variable instead of hard coding the path, since Alfred 2 and 3 have different locations for persistent data. So you can use this: #Storage directory for API key PREFS="$alfred_workflow_data" Link to comment
funkymonkey Posted September 26, 2017 Share Posted September 26, 2017 On 25/09/2017 at 1:02 PM, CarlosNZ said: I'll check it out once I install HS later this week. Thanks. Cheers! Link to comment
xilopaint Posted September 26, 2017 Share Posted September 26, 2017 On 9/25/2017 at 7:15 AM, funkymonkey said: Anyone on High Sierra (GM) using this workflow? Mine has stopped working. I use it every day as well The report just states: FILE: /Users/me/Documents/Temp/test4.png Problem downloading test4_shrink.png It's working for me on the first public release. Link to comment
funkymonkey Posted September 27, 2017 Share Posted September 27, 2017 I completely uninstalled it then reinstalled and set it up from scratch. Working now! I wondered if the location I had set had something to do with it. i.e. I had changed the default location from desktop to another folder. Then updated macOS (obviously including new file system) then it broke. Anyway it works now (with the previous location change). Link to comment
flatcoke Posted September 30, 2017 Share Posted September 30, 2017 (edited) if It doesn't work with alfred3 try to fix tinypng_config script PREFS="$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.tinypng" It may be Alfred 2 folder in your setting Edited September 30, 2017 by flatcoke Link to comment
xilopaint Posted September 30, 2017 Share Posted September 30, 2017 (edited) 3 hours ago, flatcoke said: if It doesn't work with alfred3 try to fix tinypng_config script PREFS="$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.tinypng" It may be Alfred 2 folder in your setting Changing the data folder path will not fix any issue with the workflow. Additionally, hard-coding the data folder path is not a good practice as you can use the environment variable like I told four posts above yours: Edited September 30, 2017 by xilopaint Link to comment
Roman52 Posted December 8, 2019 Share Posted December 8, 2019 Hello and thank you for the great workflow. I am trying to configure it. Is this workflow supporting Alfred 4? For me, the workflow works sometimes, sometimes not - http://joxi.net/eAO6y1pF974Z92 I get this error - "Problem downloading feature-location-3.jpg" I replaced this path: PREFS="$HOME/Library/Application Support/Alfred 4/Workflow Data/carlosnz.tinypng" from Alfred 2 to Alfred 4 - but it didn't help. (Before (when the path was $HOME/Library/Application Support/Alfred 2/...) it worked the same way 50/50 - sometimes correct, sometimes error) I am using Mojave 10.14.6 I am using my own API key for ЕнтнЗТПю I will be glad to any help. Maybe I am doing something wrong. Link to comment
xilopaint Posted December 8, 2019 Share Posted December 8, 2019 13 hours ago, Roman52 said: Hello and thank you for the great workflow. I am trying to configure it. Is this workflow supporting Alfred 4? For me, the workflow works sometimes, sometimes not - http://joxi.net/eAO6y1pF974Z92 I get this error - "Problem downloading feature-location-3.jpg" I replaced this path: PREFS="$HOME/Library/Application Support/Alfred 4/Workflow Data/carlosnz.tinypng" from Alfred 2 to Alfred 4 - but it didn't help. (Before (when the path was $HOME/Library/Application Support/Alfred 2/...) it worked the same way 50/50 - sometimes correct, sometimes error) I am using Mojave 10.14.6 I am using my own API key for ЕнтнЗТПю I will be glad to any help. Maybe I am doing something wrong. Try this: On 9/25/2017 at 10:34 AM, xilopaint said: Hey, this is not related to the HS issue but once you look into it remember to change the location of the data folder by adopting the environment variable instead of hard coding the path, since Alfred 2 and 3 have different locations for persistent data. So you can use this: #Storage directory for API key PREFS="$alfred_workflow_data" Roman52 1 Link to comment
deanishe Posted December 9, 2019 Share Posted December 9, 2019 On 12/8/2019 at 9:03 AM, Roman52 said: PREFS="$HOME/Library/Application Support/Alfred 4/Workflow Data/carlosnz.tinypng" Alfred 4 doesn't use the "Alfred 4" directory. It's just called "Alfred" now. But in any case, do what @xilopaint says. Roman52 1 Link to comment
Roman52 Posted December 22, 2019 Share Posted December 22, 2019 (edited) On 12/9/2019 at 12:37 AM, xilopaint said: Try this: On 12/9/2019 at 12:02 PM, deanishe said: Alfred 4 doesn't use the "Alfred 4" directory. It's just called "Alfred" now. But in any case, do what @xilopaint says. Hello @xilopaint , @deanishe and thank you for your answers. I made this change - http://snpy.in/8NlGMK - but it didn't help - I still have this "problem downloading" issue. http://snpy.in/VUI4Tr I imported the tinyPNG workflow and made only one change in tinypng.sh file as you told me. Edited December 22, 2019 by Roman52 Link to comment
xilopaint Posted December 23, 2019 Share Posted December 23, 2019 On 12/22/2019 at 5:16 AM, Roman52 said: Hello @xilopaint , @deanishe and thank you for your answers. I made this change - http://snpy.in/8NlGMK - but it didn't help - I still have this "problem downloading" issue. http://snpy.in/VUI4Tr I imported the tinyPNG workflow and made only one change in tinypng.sh file as you told me. You have to make the same change in the Run Script object connected to the tiny_png_config keyword on Alfred Editor. Link to comment
Roman52 Posted December 24, 2019 Share Posted December 24, 2019 23 hours ago, xilopaint said: You have to make the same change in the Run Script object connected to the tiny_png_config keyword on Alfred Editor. Hello, @xilopaint Thanks for your answers, I replaced this line - http://snpy.in/OlkpVK , but it didn't help, I still get this error "problem downloading" http://snpy.in/ZzDLvR Link to comment
xilopaint Posted December 25, 2019 Share Posted December 25, 2019 @Roman52 please, try running the workflow again and paste here the output of the Alfred debbuger. Link to comment
Roman52 Posted December 26, 2019 Share Posted December 26, 2019 On 12/25/2019 at 9:44 AM, xilopaint said: @Roman52 please, try running the workflow again and paste here the output of the Alfred debbuger. Hello, @xilopaint , thank you for trying to help. Here is the debug output: [11:21:44.918] Logging Started... [11:22:00.529] Tiny PNG[Keyword] Processing complete [11:22:00.532] Tiny PNG[Keyword] Passing output '' to Run Script [11:23:23.076] STDERR: Tiny PNG[Run Script] 35:44: syntax error: A “"” can’t go after this identifier. (-2740) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 176k 100 176k 0 0 403k 0 --:--:-- --:--:-- --:--:-- 402k 35:44: syntax error: A “"” can’t go after this identifier. (-2740) curl: (3) <url> malformed 35:44: syntax error: A “"” can’t go after this identifier. (-2740) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 186k 100 186k 0 0 380k 0 --:--:-- --:--:-- --:--:-- 380k 100 186k 100 186k 0 0 380k 0 --:--:-- --:--:-- --:--:-- 380k [11:23:23.083] Tiny PNG[Run Script] Processing complete [11:23:23.083] Tiny PNG[Run Script] Passing output '2 files downloaded to /Desktop/TinyPNG. 1 file had problems. See ~Report~.txt for details.' to Post Notification Here is the report file: FILE: /Users/roman52/Disk/PSD/projects/Grove at Auburn/04 Gallery/Apartment/g-1.jpg Original size: 388140 Shrunk size: 180857 Ratio: 0.466 FILE: /Users/roman52/Disk/PSD/projects/Grove at Auburn/04 Gallery/Apartment/g-2.jpg Problem downloading g-2_shrink.jpg FILE: /Users/roman52/Disk/PSD/projects/Grove at Auburn/04 Gallery/Apartment/g-3.jpg Original size: 394228 Shrunk size: 190620 Ratio: 0.4835 Link to comment
xilopaint Posted December 26, 2019 Share Posted December 26, 2019 @Roman52 do you still have the issue if you try to shrink one file at a time. Link to comment
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