mnooner256 / pyqrcode

Python 3 module to generate QR Codes
BSD 3-Clause "New" or "Revised" License
408 stars 75 forks source link

Enhance text based rendering #2

Closed broamski closed 9 years ago

broamski commented 9 years ago

Provides an option to enable black and white ANSI escape code text based rendering. This allows a QR code to be displayed in a text based terminal.

mnooner256 commented 9 years ago

Hi. Thank you for your contribution.

I have been super busy the last few weeks and have not been able to get to your pull request.

With Thanksgiving coming up I should be able to get to it then.

I just don't want you to think I am ignoring you.

I have looked over the code, this is a great idea (I wish I had thought of it myself).

broamski commented 9 years ago

No problem, thanks for responding! Have a nice holiday!

mnooner256 commented 9 years ago

I ended up with food poisoning over the holiday. So I did not get to your request. And now I have finals, so my time is even more limited. I will get to this as soon as possible. Thanks for you patience.

broamski commented 9 years ago

No worries!

mnooner256 commented 9 years ago

Finished

I have integrated your code with several changes. You can see the new release on PyPi.

My changes

First, the purpose of the text renderer is to basically offer a simplest possible renderer for people to create their own. Which you did. Which hopefully means that it is an easy to understand example ;)

But this does mean I could not use your coded as is. I split the functionality off of the text renderer into its own renderer called terminal(). The default invocation is nearly identical to what you did. plain

The terminal renderer also now obeys the convention allowing for colorful rendering. Both 8-named color based rendering and 256 color rendering. 8-color 256-color

Thank you for you contribution

Seriously this was an awesome idea!