4 ms·
used qrencode and img2txt to get ascii.
by eliasmacpherson 14y ago
used qrencode and img2txt to get ascii.
- no_news_is 14y agoI followed your lead, but I didn't like the way the img2txt looked. I just wanted black and white. Then I saw it was unnecessary, qrencode provides ANSI support. echo foobar |qrencode -tANSI -o- #grey, blech So I threw some sed at it: echo foobar |qrencode -tANSI -o- | sed -e "s/\[47m/\[0\;5\;37\;47m/g" -e "s/\[40m/\[0\;34\;40m/g" But then I looked again, and qrencode provides this to you too: echo foobar |qrencode -tANSI256 -o- # pretty, yay You can double the output size with: echo foobar |qrencode -tANSI256 -o-|sed -e "s/ / /g;p" Very pleasing! Might actually use qr codes now.