oxzi / gosh

Authenticationless HTTP file upload server
GNU General Public License v3.0
16 stars 2 forks source link

Add QR code flag to goshy #58

Closed riotbib closed 1 month ago

riotbib commented 6 months ago

This commit adds an additional flag for displaying an QR code as the respone of running goshy. It requires the qrencode package.

One could check if the depedency exists, but any OS should be able to report this themselves. So this bloat was not added.

Sadly qrencode -t ASCII was not working for me. It printed a not scannable QR code. Thus an image is opened.

oxzi commented 1 month ago

Thanks for your contribution and please excuse the delay.

On which system did you test this change? On my Linux-based OS with xdg-open version 1.2.1, it does not seem to be possible to read from stdin via -. Btw, using /dev/stdin failed for me as well.

$ ./contrib/bash/goshy -q __FILE__
xdg-open: unexpected option '-'
Try 'xdg-open --help' for more information.

Sadly qrencode -t ASCII was not working for me. It printed a not scannable QR code. Thus an image is opened.

qrencode -t UTF8 worked for me.

Furthermore, I have changed the logic to allow both passing -u and -q.