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 --reverse option #293

Closed sbliven closed 7 months ago

sbliven commented 8 months ago

This inverts the string-based QR code output to work on terminals with light backgrounds.

It fixes issue #287.

I have chosen -r and --reverse for the flag since -i/--inverse conflicts with --interface.

The change is also documented in the docs.

claudiodangelis commented 8 months ago

Hello, many thanks for taking the time to work on this, I really appreciate! I give it a spin and it works flawlessly. I have a couple of minor remarks, we can work on it together if you want:

  1. The flag might be renamed from reverse to reversed, as the former reminds of an action and could sound misleading
  2. If set, the option could be stored to the configuration file (we can follow the same pattern we use for other configuration parameters)

What do you think? Thanks again! Claudio

sbliven commented 8 months ago

Both good suggestions!

claudiodangelis commented 8 months ago

Awesome, let me know if you need any help on that, Claudio

sbliven commented 8 months ago

Can you check the tests? They fail on my machine (also on main) but I think it's because I run macos.