claudiodangelis / qrcp

:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.
https://qrcp.sh
MIT License
9.89k stars 524 forks source link

Add option for specifying file name #325

Open 0WN463 opened 3 months ago

0WN463 commented 3 months ago

I'm opening this issue because:

Suggestion to add file name as an option.

Right now, we can specify the output dir using output, but I want to be able to specify the file name.

The quickest way to implement this would be something like a output-file option or filename option.

But my further suggestion is to use --output to specify the file name, and --output-dir to specify the directory instead. Even though this might be backwards incompatible, it follows the flag format of other CLI tools.

In addition, I 'd like the option to dump the file content into stdout by using --output -.

My main use case is that usually I have a link on my phone that I wish to transfer to my computer. I don't need the link as a file, I only need it into my clipboard manager, so with this option, I can use qrcp receive --output - | clipboard_manager.

If this sounds ok, I can create a PR that adds this feature.