diff --git a/CH-Kreuz_7mm.svg b/CH-Kreuz_7mm.svg deleted file mode 100755 index f1296f3..0000000 --- a/CH-Kreuz_7mm.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/ch_kreuz.py b/ch_kreuz.py new file mode 100644 index 0000000..6f2453e --- /dev/null +++ b/ch_kreuz.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +import svgutils.transform as st + + +def swisscross(): + return st.fromstring( + '\ + \ + \ + \ + \ + \ + \ + ' + ).getroot() diff --git a/qrr.py b/qrr.py index 1d7bef8..299d360 100755 --- a/qrr.py +++ b/qrr.py @@ -3,8 +3,8 @@ import os.path import qrcode import qrcode.image.svg -import svgutils.transform as st - +from svgutils import transform as st +from ch_kreuz import swisscross as get_swisscross class qr_rechnung(): data = '' @@ -39,7 +39,7 @@ class qr_rechnung(): qrcode = st.fromfile(filepath) offset = self.calc_move_offset(qrcode.get_size()[0]) - swisscross = st.fromfile("CH-Kreuz_7mm.svg").getroot() + swisscross = get_swisscross() swisscross.moveto( x=offset['offset'], y=offset['offset'],