-
Posts
21 -
Joined
-
Last visited
-
Days Won
3
Reputation Activity
-
-
shmulvad got a reaction from Buchholdt in TinyPNG
An Alfred 4 workflow for quickly compressing and resizing images using TinyPNG. Simply select a collection of images or a folder in Finder and activate the workflow.
Installation and Getting Started
Install alfred-tinypng workflow. All further updates are handled automatically. You will need to configure the workflow with an API key from TinyPNG. Type tinypng_api to get a link to the pagewhere you can get your API key and to actually set the key when you have gotten it.
Usage
Select either a folder, image file or a number of image files in Finder. Afterward, open Alfred and type tinypng. You are presented with the following choices:
Choose an item based on what you want. When selected, the workflow will start compressing/resizing the image(s). After it is done, they will be saved to the same directory and with the same filename as the original image. The original image will be preserved with .bak prepended before the file extension. I.e. if compressing img.jpg, this will now become img.bak.jpg and the compressed image will be saved as img.jpg.
Refer to the TinyPNG documentation for a full explanation of the different resizing options.
Why? Another TinyPNG workflow already exists
It doesn't support choosing the files based on what is selected in Finder (which I personally prefer). Only simple compression is supported whereas all TinyPNG compressions and resizing options are supported in this workflow. It seems to be abandoned by the creator (has not been updated since 2015). Credits
The workflow makes use of the following:
OneUpdater by vitorgalvao for handling automatic updates. TinyPNG Python API
Code and more can be viewed on the associated GitHub-repo. If you find this workflow useful, stars are appreciated.
-
shmulvad got a reaction from alfredpanda in TinyPNG
An Alfred 4 workflow for quickly compressing and resizing images using TinyPNG. Simply select a collection of images or a folder in Finder and activate the workflow.
Installation and Getting Started
Install alfred-tinypng workflow. All further updates are handled automatically. You will need to configure the workflow with an API key from TinyPNG. Type tinypng_api to get a link to the pagewhere you can get your API key and to actually set the key when you have gotten it.
Usage
Select either a folder, image file or a number of image files in Finder. Afterward, open Alfred and type tinypng. You are presented with the following choices:
Choose an item based on what you want. When selected, the workflow will start compressing/resizing the image(s). After it is done, they will be saved to the same directory and with the same filename as the original image. The original image will be preserved with .bak prepended before the file extension. I.e. if compressing img.jpg, this will now become img.bak.jpg and the compressed image will be saved as img.jpg.
Refer to the TinyPNG documentation for a full explanation of the different resizing options.
Why? Another TinyPNG workflow already exists
It doesn't support choosing the files based on what is selected in Finder (which I personally prefer). Only simple compression is supported whereas all TinyPNG compressions and resizing options are supported in this workflow. It seems to be abandoned by the creator (has not been updated since 2015). Credits
The workflow makes use of the following:
OneUpdater by vitorgalvao for handling automatic updates. TinyPNG Python API
Code and more can be viewed on the associated GitHub-repo. If you find this workflow useful, stars are appreciated.
-
-
shmulvad reacted to dsrjarman in NightShift
@shmulvad What service! This is great, and does just what I was hoping. Thank you for putting this together. I might be back with more ideas...
-
-
shmulvad reacted to Geoffrey in TinyPNG
Hey mate. Thanks for creating this workflow. It sounds exactly like something that would be very handy in my work processes, as I deal with image compression a lot. Unfortunately, I'm running into an error when running an error shown below:
[14:49:56.955] TinyPNG[Script Filter] Queuing argument '' [14:49:57.122] TinyPNG[Script Filter] Script with argv '(null)' finished [14:49:57.126] TinyPNG[Script Filter] {"items": [{"title": "COMPRESS: Compress image(s)", "subtitle": "Compresses image(s)", "arg": "COMPRESS", "uid": "COMPRESS"}, {"title": "SCALE: Scale prop. down by *either* height or width", "subtitle": "Usage: I.e. \"w800\" or \"h500\"", "valid": false, "arg": "SCALE", "uid": "SCALE", "icon": {"path": "scale.png"}}, {"title": "FIT: Scale prop. down within width and height", "subtitle": "Usage: \"width height\", i.e. \"800 500\"", "valid": false, "arg": "FIT", "uid": "FIT", "icon": {"path": "fit.png"}}, {"title": "COVER: Scale and crop down to exactly width and height", "subtitle": "Usage: \"width height\", i.e. \"800 500\"", "valid": false, "arg": "COVER", "uid": "COVER", "icon": {"path": "cover.png"}}, {"title": "THUMB: Advanced scale and crop to exactly width and height", "subtitle": "Usage: \"width height\", i.e. \"800 500\"", "valid": false, "arg": "THUMB", "uid": "THUMB", "icon": {"path": "thumb.png"}}], "variables": {"axis": 0, "len": 0, "width": 0, "height": 0}} [14:49:59.029] TinyPNG[Script Filter] Processing complete [14:49:59.038] TinyPNG[Script Filter] Passing output 'COMPRESS' to Conditional [14:49:59.041] TinyPNG[Conditional] Processing complete [14:49:59.043] TinyPNG[Conditional] Passing output 'COMPRESS' to Run Script [14:49:59.045] TinyPNG[Script Filter] Passing output 'COMPRESS' to Run Script [14:50:00.075] TinyPNG[Run Script] Processing complete [14:50:00.087] TinyPNG[Run Script] Passing output '"/Users/geoffrey/Desktop/achtergrond-tenniszaal.png:" COMPRESS ********************** 0 0 0 0 ' to Post Notification [14:50:00.090] TinyPNG[Run Script] Passing output '"/Users/geoffrey/Desktop/achtergrond-tenniszaal.png:" COMPRESS ********************** 0 0 0 0 ' to Run Script [14:50:00.194] ERROR: TinyPNG[Run Script] Traceback (most recent call last): File "tiny_upload.py", line 5, in <module> import tinify File "/Users/geoffrey/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.F8ABF891-4B1F-4AC7-8D88-44C494B28EA9/tinify/__init__.py", line 92, in <module> from .client import Client File "/Users/geoffrey/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.F8ABF891-4B1F-4AC7-8D88-44C494B28EA9/tinify/client.py", line 7, in <module> import requests ModuleNotFoundError: No module named 'requests' [14:50:00.211] TinyPNG[Run Script] Processing complete [14:50:00.213] TinyPNG[Run Script] Passing output '' to Post Notification
Also, as a little suggestion for improvement: could you make the automatic backup image an optional setting? In my workflow, I only need to compress the image, not create a backup copy (as I can easily get that back myself if something goes wrong).
I hope you could help me out with this. Thanks a bunch and have a great weekend.
-
shmulvad reacted to deanishe in TinyPNG
A better solution is to run /usr/bin/python -m pip install --user --upgrade requests
That installs it in your user directory, so it won't be deleted by OS upgrades and you won't need elevated privileges to install it.
The proper solution is for @shmulvad to bundle it with the workflow, however. You can do that with pip’s --target flag: /usr/bin/python -m pip install --target . requests
-
shmulvad reacted to godbout in Alfred AirPods Pro Connector
hi.
a shameless fork of Alfred AirPods Connector (https://github.com/mariuskiessling/alfred-airpods-connector). i had to change the icons, really, i had to. also i like to have different keywords for connecting and disconnecting, so here we go.
Doc, screenshots, releases on GitHub: https://github.com/godbout/alfred-airpods-connector
Release on Packal: http://www.packal.org/workflow/alfred-airpods-pro-connector
enjoy!
☀️
-
shmulvad reacted to deanishe in TinyPNG
On macOS python is Python 2 (/usr/bin/python), which is what you get in Alfred.
You’ve done something to your shell’s PATH to make python point to a Python 3 executable, but Mac apps don’t use your shell environment.
In workflows, I think it’s generally best to hardcode /usr/bin/python or /usr/bin/python3, so you always get a known version regardless of what you or users have done to their environment.
Having the python command run Python 3 is a bit dubious, imo, because it contradicts what the OS does.
-
shmulvad reacted to vitor in NightShift
If the binary has a quarantine flag. Which is why the binaries we build ourselves don’t show the warning. And the flag needs to be specifically added, which web browsers and other apps who download do. Not curl, so if you download from the command line, no quarantine.
When something is quarantined, you can remove the flag with xattr -d com.apple.quarantine /path/to/binary which stops macOS from showing those messages.
However, while I can say that’s the case for regular quarantine checks, I’m unsure if that’s also the case for notarisation: i.e., if you’re on a macOS version that complains about non-notarised software, I don’t yet know if removing the quarantine flag will also get rid of those messages.
So you may or may not be able to get rid of the message by telling the script part of the Workflow to remove the flag. I’ve thought of that as a way to remove warnings from my own Workflows (the Notificator part) but because I’m still on Mojave, I can’t test.
-
shmulvad reacted to deanishe in NightShift
Impossible, AFAIK. Catalina will show a scary warning about any binary that isn't signed by an Apple Developer account. AFAIK, a free account isn't good enough.
-
shmulvad got a reaction from DanP in NightShift
NightShift
Quickly turn on/off Night Shift or set it to a custom value between 0 - 100.
Installation
To download, visit the latest release at GitHub. All further updates are handled automatically.
Description
Quickly turn on/off Night Shift or set it to a value between 0-100. No more fiddling with deep settings when you either want to save your eyes or need to work with accurate colors!
In Alfred, type night followed by either off, on or a number between 0 - 100.
Credits
The workflow makes use of the following:
nshift by leberwurstsaft as the backend for setting the values. OneUpdater by vitorgalvao for handling automatic updates. -
shmulvad reacted to DanP in NightShift
Hey @shmulvad,
thanks for this! I was trying it out but got the message that "nshift" could not be opened because Apple cannot check it for malicious software. I had to go to System Preferences > Security & Privacy > General, where I could allow nshift to be used. Now it's working like a charm!
-
shmulvad got a reaction from JJJJ in TinyPNG
An Alfred 4 workflow for quickly compressing and resizing images using TinyPNG. Simply select a collection of images or a folder in Finder and activate the workflow.
Installation and Getting Started
Install alfred-tinypng workflow. All further updates are handled automatically. You will need to configure the workflow with an API key from TinyPNG. Type tinypng_api to get a link to the pagewhere you can get your API key and to actually set the key when you have gotten it.
Usage
Select either a folder, image file or a number of image files in Finder. Afterward, open Alfred and type tinypng. You are presented with the following choices:
Choose an item based on what you want. When selected, the workflow will start compressing/resizing the image(s). After it is done, they will be saved to the same directory and with the same filename as the original image. The original image will be preserved with .bak prepended before the file extension. I.e. if compressing img.jpg, this will now become img.bak.jpg and the compressed image will be saved as img.jpg.
Refer to the TinyPNG documentation for a full explanation of the different resizing options.
Why? Another TinyPNG workflow already exists
It doesn't support choosing the files based on what is selected in Finder (which I personally prefer). Only simple compression is supported whereas all TinyPNG compressions and resizing options are supported in this workflow. It seems to be abandoned by the creator (has not been updated since 2015). Credits
The workflow makes use of the following:
OneUpdater by vitorgalvao for handling automatic updates. TinyPNG Python API
Code and more can be viewed on the associated GitHub-repo. If you find this workflow useful, stars are appreciated.
-
shmulvad got a reaction from Vero in TinyPNG
An Alfred 4 workflow for quickly compressing and resizing images using TinyPNG. Simply select a collection of images or a folder in Finder and activate the workflow.
Installation and Getting Started
Install alfred-tinypng workflow. All further updates are handled automatically. You will need to configure the workflow with an API key from TinyPNG. Type tinypng_api to get a link to the pagewhere you can get your API key and to actually set the key when you have gotten it.
Usage
Select either a folder, image file or a number of image files in Finder. Afterward, open Alfred and type tinypng. You are presented with the following choices:
Choose an item based on what you want. When selected, the workflow will start compressing/resizing the image(s). After it is done, they will be saved to the same directory and with the same filename as the original image. The original image will be preserved with .bak prepended before the file extension. I.e. if compressing img.jpg, this will now become img.bak.jpg and the compressed image will be saved as img.jpg.
Refer to the TinyPNG documentation for a full explanation of the different resizing options.
Why? Another TinyPNG workflow already exists
It doesn't support choosing the files based on what is selected in Finder (which I personally prefer). Only simple compression is supported whereas all TinyPNG compressions and resizing options are supported in this workflow. It seems to be abandoned by the creator (has not been updated since 2015). Credits
The workflow makes use of the following:
OneUpdater by vitorgalvao for handling automatic updates. TinyPNG Python API
Code and more can be viewed on the associated GitHub-repo. If you find this workflow useful, stars are appreciated.
-
shmulvad got a reaction from Chris Messina in NightShift
NightShift
Quickly turn on/off Night Shift or set it to a custom value between 0 - 100.
Installation
To download, visit the latest release at GitHub. All further updates are handled automatically.
Description
Quickly turn on/off Night Shift or set it to a value between 0-100. No more fiddling with deep settings when you either want to save your eyes or need to work with accurate colors!
In Alfred, type night followed by either off, on or a number between 0 - 100.
Credits
The workflow makes use of the following:
nshift by leberwurstsaft as the backend for setting the values. OneUpdater by vitorgalvao for handling automatic updates. -
shmulvad got a reaction from Chris Messina in Commands to turn on Night Shift and Do not Disturb
I don't know if you're still active on this forum, but if so, I've just released a workflow that can quickly turn off/on Night Shift:
-
shmulvad reacted to mmroczka in Alfred Wifi Speedtest
Alfred Wifi Speedtest
Alfred Wifi Speedtest is a workflow for Alfred 4, that uses speedtest-cli and reports back in a notification the upload/download speeds of the current wifi you're on.
Why?
Since COVID hit, my wifi speeds have plummeted (Verizon cap/bottleneck maybe?). I hate needing to google for a wifi speedtest every time I have to check if my wifi speed will be good enough for the call I'm about to join. I have to open another tab, ads clutter my screen while running the speedtest, and it's one more thing cluttering my screen. This workflow makes a wifi speedtest just an alfred keyword away.
Important
You will always find the latest version, changelog and updated documentation on GitHub as is difficult to use the forum to keep track of updates and support.
Download
Download directly from Github releases page, make sure to download the latest release. Download here.
Installation Instructions
After downloading the workflow from the release page, be sure to install the wifi speedtest-cli using the command below
brew install speedtest-cli
Then, simply run the Alfred workflow by summoning Alfred and typing speedtest.
This is my first real contribution to any sort of open source community so suggestions are welcome! I thought about adding automatic updates, but figured something is better than nothing to start and I can iterate on this if people have suggestions/feature requests. Thanks in advance for any suggestions to improve this workflow!
-
-
shmulvad got a reaction from Southgirl in Roman Numeral Converter
Roman Numeral Converter
Convert between roman numerals and arabic integers
Installation
To download, visit the latest release at GitHub. All further updates are handled automatically.
Description
This is a fairly simple workflow for converting between roman numerals and arabic integers. This has been made before by Tyler Eich (Packal link), but hasn't been updated since 2015 and stopped working on my computer during an Alfred or macOS update (can't remember which). But I had an use case for this, and therefore I made a new version written in Python for this simple task.
In Alfred, type rn and enter either your roman numeral or arabic integer. Selected result is copied to your clipboard.
The expression is being evaluated as you type it. If the expression cannot be evaluated, for example if you are using illegal characters, user will be notified about that.
Note
The workflow doesn't support incorrectly written roman numerals, i.e. "IC", and will also notify user about this:
Credits
The workflow makes use of the following code to focus on the implementation of the conversion between the number systems rather than focusing on a lot of Alfred Workflow related stuff.
OneUpdater to easily check for updates by vitorgalvao. Alfred Workflow Feedback XML Generation to easily add items by lrrfantasy.
-
shmulvad got a reaction from deanishe in Roman Numeral Converter
Okay, I didn't know that - thanks for letting me know!
The workflow is now updated to use JSON. I'll agree with you, that is much cleaner.
-
shmulvad got a reaction from bivalvegruff in Roman Numeral Converter
Okay, I didn't know that - thanks for letting me know!
The workflow is now updated to use JSON. I'll agree with you, that is much cleaner.
-
shmulvad got a reaction from bivalvegruff in Roman Numeral Converter
Roman Numeral Converter
Convert between roman numerals and arabic integers
Installation
To download, visit the latest release at GitHub. All further updates are handled automatically.
Description
This is a fairly simple workflow for converting between roman numerals and arabic integers. This has been made before by Tyler Eich (Packal link), but hasn't been updated since 2015 and stopped working on my computer during an Alfred or macOS update (can't remember which). But I had an use case for this, and therefore I made a new version written in Python for this simple task.
In Alfred, type rn and enter either your roman numeral or arabic integer. Selected result is copied to your clipboard.
The expression is being evaluated as you type it. If the expression cannot be evaluated, for example if you are using illegal characters, user will be notified about that.
Note
The workflow doesn't support incorrectly written roman numerals, i.e. "IC", and will also notify user about this:
Credits
The workflow makes use of the following code to focus on the implementation of the conversion between the number systems rather than focusing on a lot of Alfred Workflow related stuff.
OneUpdater to easily check for updates by vitorgalvao. Alfred Workflow Feedback XML Generation to easily add items by lrrfantasy.
-
shmulvad reacted to Vookimedlo in alfred-bitwise-evaluator
Merged back to trunk. New release is available.
The original post above was updated with the current readme.
Thanks!