schlagmichdoch / PairDrop

PairDrop: Transfer Files Cross-Platform. No Setup, No Signup.
https://pairdrop.net
GNU General Public License v3.0
4.41k stars 246 forks source link

Enable sending multiple files via cli #208

Closed schlagmichdoch closed 9 months ago

schlagmichdoch commented 10 months ago

This removes the File Handling API as it is overwriting default file registrations (#17, #116, #190)

To replace the possibility to send files via context menu this PR extends the pairdrop-cli to handle multiple files.

Also, this introduces files and documentation (todo) how to set this up on different platforms to send files via the context menu

Todo

ChaosExAnima commented 9 months ago

hi @schlagmichdoch! i loaded this branch but it doesn't seem to work. i did the following:

  1. cloned this branch
  2. chmod +x pairdrop-cli/pairdrop
  3. pairdrop-cli/pairdrop 1.txt 2.txt
  4. pairdrop-cli/pairdrop *.txt

Expected result: it opened my browser to share both files Actual result: i got the CLI help:

CleanShot 2023-12-06 at 14 05 18@2x

if that's not the expected process, please lmk the testing instructions?

ChaosExAnima commented 9 months ago

hey @schlagmichdoch, good catch! i removed the one from PATH and tried it directly again: CleanShot 2023-12-06 at 16 44 25@2x

schlagmichdoch commented 9 months ago

@ChaosExAnima Great that’s resolved!

Apparently, negative numbers in substring extractions are not supported in older bash versions. I’ll fix this.

The is only needed on Windows Powershell though. Could you comment out line 167 (by adding a #) and try it again?

ChaosExAnima commented 9 months ago

okay, that works! just for the record, this is my bash version:

GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23) Copyright (C) 2007 Free Software Foundation, Inc.

schlagmichdoch commented 9 months ago

okay, that works! just for the record, this is my bash version:

GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23) Copyright (C) 2007 Free Software Foundation, Inc.

Awesome thanks! That confirms what I thought.

I have just force-pushed the changes that should resolve this. Would you try again one last time? :)

ChaosExAnima commented 9 months ago

works great!

schlagmichdoch commented 5 months ago

The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:

Comment by @schlagmichdoch:

Hey @ChaosExAnima, I have reworked pairdrop-cli on this branch to be able to handle multiple files and directories simultaneously. I'd appreciate it, if you would quickly test this on MacOS before I add this with the new release. Would you happen to be free?

Comment by @schlagmichdoch:

Thanks for your help @ChaosExAnima!

Your instructions would be correct, but if I understand your screenshot correctly, you don’t use the local ./pairdrop but the global pairdrop cmd you have in PATH. This is probably the old version which checks for the number of arguments and shows the help if there are too many.

Have you tried using ./pairdrop?