lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.34k stars 664 forks source link

ascii text output color #252

Open Ran-n opened 2 years ago

Ran-n commented 2 years ago

The ascii functionality is great but some readers cant interpret the codes if they are not in the standard manner (info on black and spacing on white).

A option which would allow to output the ascii qr codes in such manner would be great.

I attach files to help identify the problem.

This would be the current ouput, which some readers dont understand. image

This would be the desired standard output. image

heuer commented 2 years ago

Acc. to "ISO/IEC 2015 6.2 -- Mirror imaging" the first image is a valid output.

It doesn't help you to solve the problem, but in my opinion the QR code readers should be improved, not necessarily this library.

Scripter17 commented 2 years ago

And when using an improved QR code reader isn't an option?

Having qr xyz and qr xyz --ascii produce different results is extremely annoying when trying to chain several things together.
Not to mention it's ugly and entirely pointless

Edit; I apologize for being rude. I was frustrated and couldn't make enough sense of the codebase to fix the issue myself

Ran-n commented 2 years ago

Acc. to "ISO/IEC 2015 6.2 -- Mirror imaging" the first image is a valid output.

It doesn't help you to solve the problem, but in my opinion the QR code readers should be improved, not necessarily this library.

Like Scripter17 is saying is kinda weird that qr and qr --ascii produce different, out of the box, results and considering that said option exists for the image type it would be neat in the ascii one. Also yeah, its not an option for everyone and if this library is implemented in another program the end user is not gonna take the time to or even try to use a different reader.

It shouldnt be too difficult to do anyway.

Scripter17 commented 2 years ago

It shouldnt be too difficult to do anyway.

I can personally vouch for it not being difficult because I've literally done that

I went a bit overboard too and also

So once I re-add print_tty which I removed for... some reason, I guess I can do a puil request

Ran-n commented 2 years ago

Great, cant wait to test it