Last active
September 5, 2024 00:51
-
-
Save jiri001meitner/6a1046abec6c2be3d787d5b37649e045 to your computer and use it in GitHub Desktop.
generate qr payment code
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/bash | |
| # priklad: generuj_qr_platbu.sh 1000.00 CZK 20240824 Notix | |
| castka="${1}" | |
| mena="${2}" | |
| faktura="${3}" | |
| odberatel="${4}" | |
| format='SPD*1.0' | |
| IBAN='CZ3330300000003106065017' | |
| BANKA='AIRACZPP' | |
| prijemce="RN:Jiri Meitner, https://ITisLove.cz*ACC:${IBAN}+${BANKA}" | |
| suma="AM:${castka}" | |
| mena="CC:${mena}" | |
| typ_platby='PT:IP' | |
| zprava="MSG:faktura: ${faktura}, odberatel: ${odberatel}" | |
| faktura="X-VS:${faktura}" | |
| generovani() | |
| { | |
| qrencode --8bit -t ansi "${*}" | |
| qrencode --8bit -t png -o "platba_qr.png" "${*}" | |
| qrencode --8bit -t SVG -o "platba_qr.svg" "${*}" | |
| optipng platba_qr.png | |
| convert platba_qr.png platba_qr.webp | |
| } | |
| string="${format}*${prijemce}*${suma}*${mena}*${typ_platby}*${faktura}*${zprava}" | |
| generovani "${string}" | |
| echo "Debug: ${string}" | |
| exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment