Created
February 13, 2025 08:50
-
-
Save tdewin/80bf498356b830d00bbbd5626dd206d6 to your computer and use it in GitHub Desktop.
Create a qr code from Mac clipboard (pbpaste). Uses Inkscape barcode tool.
This file contains hidden or 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/zsh | |
tmp="$HOME/tmp" | |
mkdir -p $tmp | |
inks="/Applications/Inkscape.app/Contents/Resources/" | |
cd $inks | |
qrpath="share/inkscape/extensions/render_barcode_qrcode.py" | |
python3="bin/python3" | |
#allargs="${@}" | |
allargs="$(pbpaste)" | |
echo "$allargs" | |
echo "<svg></svg>" | $python3 $qrpath --text "$allargs" | rsvg-convert -o "$tmp/tmpqr.png" - | |
open "$tmp/tmpqr.png" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment