aptonic / dropzone4-actions

Add-on actions and API Docs for Dropzone 4
https://aptonic.com
363 stars 57 forks source link

Is there a way to add items to Drop Bar via the cli ? #128

Closed x2197 closed 1 year ago

x2197 commented 1 year ago

Use case:

I run a build.sh script that builds a zip file. I want to add that zip file to dropzone. Is there a way to add items to Drop Bar via the cli ?

I tried to import the dropzone package but it says module not found asciicast

But if run the python from the /Applications/Dropzone 4.app/Contents/Actions/lib directory the module imports and all call is successful but it doesn't add the item to the dropzone asciicast

What is the issue here is there a way to do to add items to Drop Bar via the cli ?

For clarification I tired the Develop Action form there it works fine 40353

aptonic commented 1 year ago

Those Python API methods can only be used from within an action. You can still do this though, just a slightly more roundabout way:

Add a new Shortcut in the Shortcuts app setup as shown below:

Shortcut-Setup

Then on the command line you can do:

shortcuts run "Add Files To Drop Bar" --input-path <file paths>

The provided file paths will be added to Drop Bar.

If you provide multiple file paths then a Drop Bar stack will be created with all the files.

x2197 commented 1 year ago

I haven't use the shortcuts before I couldn't create the shortcut that you have created It would be helpful to give the step by step instruction with screenshot 66261

aptonic commented 1 year ago

No problems, here's a screen recording showing how to setup the Shortcut:

Add-Shortcut-Recording

x2197 commented 1 year ago

Ok You have to right click on the files to bring the Shortcut Input and then the Receive section comes up thanks for the demo it works now.