Commit Graph

54 Commits

Author SHA1 Message Date
Michael Stapelberg
05d1f60c14 make format=txt display the textual QR code contents
This allows for easy comparison with QR codes extracted from PDFs:

pdfimages -png invoice.pdf invoice && \
  zbarimg --raw invoice*.png > code.txt
2022-07-17 09:19:41 +02:00
Michael Stapelberg
0fcc077935 goreleaser: build for Mac M1, too 2021-07-18 10:12:22 +02:00
Michael Stapelberg
57b503d622 add GitHub Actions Continuous Integration configuration 2021-07-18 09:27:32 +02:00
Michael Stapelberg
eb600760a3 default creditor name: remove exclamation point for compatibility
The Swiss banking app neon does not accept the exclamation point.
Users need to remove it before they can enter the transaction.

Hence, remove it for compatibility, perhaps other banks or
banking apps are also affected.
2021-07-18 09:23:43 +02:00
Michael Stapelberg
0329353347 goreleaser: add darwin/arm64, use gon for notarizing 2021-03-03 09:23:03 +01:00
Michael Stapelberg
014c819560 add PDF export 2020-11-22 22:50:06 +01:00
Michael Stapelberg
950f332cca SVG: use a single path element instead of many rects
This avoids small gaps between QR code squares.

I learnt about this approach from
https://github.com/papnkukn/qrcode-svg
2020-11-22 17:23:27 +01:00
Michael Stapelberg
31bda30724 implement a native EPS writer 2020-11-14 11:49:49 +01:00
Michael Stapelberg
f39a23b8dc switch to own SVG of the Swiss cross
Compared to the Adobe Illustrator-exported version from SIX,
this version is defined on a 166px x 166px viewbox,
which are the recommended dimensions with which the cross
should be overlaid on top of QR codes.

This versions visually matches the PNG version from SIX
when rendered onto the same pixel size (166px x 166px).

But, this version scales better!
The SIX version does not render correctly.
My guess is that it might have to do with their
use of floating point coordinates.
2020-11-10 23:39:48 +01:00
Michael Stapelberg
432a09f354 re-create images with 0.1.5 2020-11-07 14:53:46 +01:00
Michael Stapelberg
dcd04602b0 add trailing \n for visual equality with https://www.qr-bill.online/ 2020-11-07 14:36:12 +01:00
Michael Stapelberg
c63152fc39 re-implement SVG version from scratch
This implementation is using the bit matrix returned by zxing,
and then we do our own SVG rendering.

The SIX-supplied Swiss Cross SVG version is now used for the overlay.

The resulting SVG has been successfully tested in a number of different SVG
rendering engines:

• Google Chrome 86
• Firefox 82
• Emacs 26
• GIMP
• Inkscape
• Mobile Safari

When rendering the SVG onto 1265x1265 px at 600 dpi,
the resulting image matches the PNG version exactly.
2020-11-07 14:36:12 +01:00
Michael Stapelberg
11ded9c5ab switch to gozxing for visual similarity with SIX reference impl
The SIX reference implementation in Java that can be found at
https://www.paymentstandards.ch/dam/downloads/qrcodegenerator.java
uses the zxing library to generate their QR codes.

zxing is also available as a Go version, which we now use.
This means the QR codes can be compared visually to the reference.
2020-11-07 13:11:34 +01:00
Markus Ritzmann
6bc1ad3197 Test the QR codes with Zak on Android (#6) 2020-09-29 17:27:03 +02:00
Michael Stapelberg
70ae7f7b7f add launch plist and instructions 2020-09-26 11:56:02 +02:00
Michael Stapelberg
fec5c6e215 add tests results for ZKB on Android 2020-09-21 19:37:12 +02:00
Michael Stapelberg
cfa68e8088 add test results for Credit Suisse on iOS 2020-09-21 19:34:44 +02:00
Michael Stapelberg
c5ec1faa49 add test results for UBS on Android
fixes #3
2020-09-21 19:30:07 +02:00
Lars Bättig
55b818b0b2 Raiffeisen on android tested successfully (#5) 2020-09-21 19:29:31 +02:00
Michael Stapelberg
d13c3c131b add postfinance test results 2020-09-21 18:07:00 +02:00
Michael Stapelberg
2daa5fea68 add UBS test results
fixes #3
2020-09-21 18:05:43 +02:00
Michael Stapelberg
25c2561f17 add expectations 2020-09-21 17:55:57 +02:00
Michael Stapelberg
e99c0cc7cd add v0.1.4 test table 2020-09-21 17:42:28 +02:00
Michael Stapelberg
bab63e5884 re-generate codes with 0.1.4 2020-09-21 17:39:31 +02:00
Michael Stapelberg
9555f15d24 fix: structured codes use separate street / building number
As per:

https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf
Specification: Swiss Implementation Guidelines QR-bill
(version 2.1 from 30 September 2019 at the time of writing)

Page 31, Technical specifications, Use of address information.
2020-09-21 17:33:10 +02:00
Niklas Liechti
0b475adfb2 Test QR code with Bank Linth iOS app (#2)
Add test result for Bank Linth iOS App

Authored-by: Nikals Liechti <nliechti@nliechti.ch>
2020-09-21 13:42:55 +02:00
Quentin Barrand
0d04767ca9 Test the QR codes with Zak on Android (#1) 2020-09-21 13:41:35 +02:00
Michael Stapelberg
1a1c4160dc README: qr code testing 2020-09-21 09:36:09 +02:00
Michael Stapelberg
a1505b1e81 re-generate codes with latest v0.1.3 2020-09-21 09:22:51 +02:00
Michael Stapelberg
9f7c594169 goreleaser: ignore darwin/386 which was dropped in Go 1.15 2020-09-10 10:26:27 +02:00
Michael Stapelberg
8a0bd604bd validation: remove invalid characters from message field 2020-09-10 10:17:26 +02:00
Michael Stapelberg
b3cc8c1cc3 html debug page: make spew output mangling more precise
Previously, it also ate anything in parens in string literals,
such as in “Donation (200 CHF)”!
2020-09-10 10:02:29 +02:00
Michael Stapelberg
c090eb57c2 add craddrtype field, switch to structured by default for revolut
The revolut app does not seem to support the combined address type.

Luckily, switching to structured seems to not be a problem for
other apps such as the ZKB eBanking app.
2020-09-10 09:26:43 +02:00
Michael Stapelberg
c896ea1025 add udaddrtype so that you can create donation codes 2020-07-10 21:37:57 +02:00
Michael Stapelberg
d606b9f795 add amount parameter 2020-07-09 18:25:56 +02:00
Michael Stapelberg
b3e76141a8 add .goreleaser.yml 2020-07-01 11:43:16 +02:00
Michael Stapelberg
041cd89d14 add boilerplate 2020-06-29 14:55:28 +02:00
Michael Stapelberg
18d720b7e4 html: make URL parameters copy&pastable 2020-06-29 14:46:31 +02:00
Michael Stapelberg
2bbb48bbd7 distinguish unset/empty in form values 2020-06-29 14:46:28 +02:00
Michael Stapelberg
2499de5ffe expand README 2020-06-29 14:46:24 +02:00
Michael Stapelberg
548f92ed08 addresstyp kombiniert
Wenn man PstCd und TwnNm leer lässt geht es.
2020-06-29 14:46:20 +02:00
Michael Stapelberg
22b000594c webview (wv) format for better scaling in filemaker 2020-06-29 14:46:16 +02:00
Michael Stapelberg
f4baa26f1c open up listener on gokrazy 2020-06-29 14:46:13 +02:00
Michael Stapelberg
15b15133e0 add robots.txt 2020-06-29 14:46:10 +02:00
Michael Stapelberg
b6463c253c use dummy data by default 2020-06-29 14:46:07 +02:00
Michael Stapelberg
d3214c1a89 handle URLs specified on the command line 2020-06-29 14:46:03 +02:00
Michael Stapelberg
2f17e21d55 overlay swiss cross in SVG, too 2020-06-29 14:46:00 +02:00
Michael Stapelberg
51a2692707 add README 2020-06-29 14:45:56 +02:00
Michael Stapelberg
f94dc9efc6 bundle swiss cross image file to avoid file system dependency 2020-06-29 14:45:44 +02:00
Michael Stapelberg
aceddb388b input validation (truncation mostly) 2020-06-29 14:45:41 +02:00