Remix.run Logo
lelanthran 4 days ago

> Hm I didn't know drag and drop could work on shell scripts too!

Depends on the file manager. I use Caja which is fairly ancient, and supports this, so I expect newer file managers to support it too.

For PDFs, something like this might work (note: not tested)

     #!/bin/bash

     pdftk $@ cat output output.pdf verbose &> /tmp/output

> that's actually really cool to have zenity, Wow. I didn't know about this...

> Is this thing cross platform? I like it if you are saying that it would open up a drag and drop box and then merge the pdf's

Not sure if zenity is x-platform; what I did do once when I needed to select multiple files was have the shell script sit in a loop calling zenity, appending filenames to a variable, and then display a confirmation with a "Process" button before performing the actual processing.

ISTR using zenity for display the file selection dialogs, the confirmation dialog and a progress indicator while processing.

> But my tool is just some lines of golang which can be go mod init go mod tidy go run . and it would open up localhost port and can even be accessed through other devices on the same network but your thing is really cool too

Yeah, I just needed something temporarily for the operators to use during a build process. Wasn't going to need network access, nor did I want to add in a new dependency by using Python or something.