kazuhikoarase / qrcode-generator

QR Code Generator implementation in JavaScript, Java and more.
https://kazuhikoarase.github.io/qrcode-generator/js/demo/
MIT License
2.13k stars 683 forks source link

Feature: add `createASCII` method #54

Closed ahwayakchih closed 6 years ago

ahwayakchih commented 6 years ago

Hi,

This re-applies ASCII output feature from #6. It does not change existing code, it just adds new method.

I use ASCII output in command line tools/scripts :).

Changes:

UPDATE: below is a screenshot of how it looks in terminal :).

qrcode-generator-createascii

Regards

nayuki commented 6 years ago

Two problems:

ahwayakchih commented 6 years ago

@nayuki thanks for comment. You're right that it's actually Unicode. We can rename the method, e.g., "createUnicode" or call it something else. I was going for reminding about "ASCII drawing", but it looks that i was wrong. Any ideas how to name it better?

It returns a string, it's up to the caller to style it with control sequences in terminal, or CSS in web browser.

kazuhikoarase commented 6 years ago

I was going for reminding about "ASCII drawing",

I agree.

Thanks a lot!

ahwayakchih commented 6 years ago

Thanks :).