Skip to content

Instantly share code, notes, and snippets.

@wmealing
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmealing/1d90e9265d9e2d0f573d to your computer and use it in GitHub Desktop.
Save wmealing/1d90e9265d9e2d0f573d to your computer and use it in GitHub Desktop.
#!/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