Last active
August 29, 2015 14:10
-
-
Save wmealing/1d90e9265d9e2d0f573d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fedora dependencies: yum install qrencode caca-utils | |
# Ubuntu dependencies: | |
# Example: http://i.imgur.com/o8E0D3k.jpg | |
TMPFILE=`mktemp` | |
qrencode -m 1 -s 1 "$1" -o $TMPFILE | |
FILESIZE="$(file $TMPFILE | cut -d, -f2 | cut -d' ' -f2)" | |
img2txt -H $FILESIZE -W $(( $FILESIZE * 2)) $TMPFILE | |
rm -rf $TMPFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment