Skip to content

Instantly share code, notes, and snippets.

@hellow554
Last active November 8, 2017 16:32
Show Gist options
  • Save hellow554/02604055ee898d00766a64fffea36e90 to your computer and use it in GitHub Desktop.
Save hellow554/02604055ee898d00766a64fffea36e90 to your computer and use it in GitHub Desktop.
#! /bin/bash
SC=https://raw.githubusercontent.com/astraw/svg_stack/master/svg_stack.py
SC_TMP=$(mktemp)
SVG=$(mktemp)
TMP_SVG=$(mktemp)
TMP_TMP_SVG=$(mktemp)
cat << EOF > $SVG
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0mm" height="50mm">
</svg>
EOF
curl $SC > $SC_TMP
while read line; do
qr --factory=svg $line > $TMP_SVG
python $SC_TMP --direction v --margin 50 $SVG $TMP_SVG > $TMP_TMP_SVG
mv $TMP_TMP_SVG $SVG
done < $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment