Hey there, I´m using the nice little Dropshare App, to upload files directly to Google Drive and get the download link into my clipboard. They offer a Mac CLI so I want to integrate it in my KM automations. But somehow it is not working with a KM Variable (of the Finder Path) in the shell command. This is the macro i use and the Notification when triggered:
Hey @CJK, thanks for your reply, just tried your suggestion, "which ds" in terminal gave me "/usr/local/bin/ds" back, so I used this in the shell script: /usr/local/bin/ds "$KMVAR_Path" - but again without success, get a notification that the macro is cancelled:
Glad to hear it's sorted. You can see actually from the nature of the errors, which were different in both cases, that supplying the full path to the program (/usr/local/bin/ds) was successful in allowing KM's shell script action to locate the program. The subsequent errors that came after that were originating from the execution of the ds program itself, which I can only guess must have somehow become corrupt or been altered, as it was generating syntax errors from within its source code. That's probably why reinstalling helped, as it must have just got rid of a corrupted version and given you a fresh one with the correct source code.
yes that were also my thoughts, I just tried some things and saw that the error notification changed, my last option was to reinstall it and now it works fine, thanks again for your help!
to use it via the finder option is also a nice way to use it, the CLI allows you to use Dropshare via Terminal Commands, after installing it you can use it just with the command "ds" and then the path of the file you want to upload (just drop the file into terminal window) - But it also allows me to use it with Variables that I created before in KM, my example is with Photoshop, to quickly upload a jpg file to google drive and get the download link into my clipboard:
User Input for asking for the file name (instead of adding "_Version12" etc. I use a timestamp at the end
Plugin "Choose Folder(s)" to choose the path for saving
Applescript to save the file to a .jpg
And then execute a Shell script with the Variable that includes the filename/path
The CLI would make also sense to use it in combination with hazel so you can automaticly trigger the shell script when files are placed in a folder/have a new color tag etc.
Many thanks for the very good explanation for the use of the CLI. This is very interesting and I will take a closer look at it now.
The thought with Hazel excites me... my rainy Sunday is saved.