Typo beseitigt und Pfad der QR-Bilddatei in CSV aufgenommen.
This commit is contained in:
parent
756f7cca7c
commit
ef9dc7cc15
1 changed files with 6 additions and 4 deletions
10
generator.py
10
generator.py
|
@ -131,7 +131,8 @@ def generiere_platzhalter(anzahl=1, typ='audio', subject='DateTime', qrcodes=Fal
|
||||||
# QR-Code generieren
|
# QR-Code generieren
|
||||||
if qrcodes:
|
if qrcodes:
|
||||||
img = qrcode.make(aw.data['url'])
|
img = qrcode.make(aw.data['url'])
|
||||||
img.save('qr/' + prefix + '_{0:0>4d}.png'.format(i))
|
aw.data['qr_path'] = os.getcwd() + '/qr/' + prefix + '_{0:0>4d}.png'.format(i)
|
||||||
|
img.save(aw.data['qr_path'])
|
||||||
|
|
||||||
# Nummer hinzufügen
|
# Nummer hinzufügen
|
||||||
aw.data['number'] = i
|
aw.data['number'] = i
|
||||||
|
@ -146,14 +147,15 @@ def generiere_platzhalter(anzahl=1, typ='audio', subject='DateTime', qrcodes=Fal
|
||||||
|
|
||||||
# Liste in Datei schreiben
|
# Liste in Datei schreiben
|
||||||
with open(prefix + '_liste.csv', 'w') as datei:
|
with open(prefix + '_liste.csv', 'w') as datei:
|
||||||
datei.write('number, numbder_fmt, date, time, path, url\n')
|
datei.write('number, number_fmt, date, time, path, qr_path, url\n')
|
||||||
for link in linkliste:
|
for link in linkliste:
|
||||||
datei.write('{number}, {number_fmt}, {date}, {time}, {path}, {url}\n'.format(
|
datei.write('{number}, {number_fmt}, {date}, {time}, {path}, {qr_path}, {url}\n'.format(
|
||||||
number = link['number'],
|
number = link['number'],
|
||||||
number_fmt = link['number_fmt'],
|
number_fmt = link['number_fmt'],
|
||||||
date = link['date'],
|
date = link['date'],
|
||||||
time = link['time'],
|
time = link['time'],
|
||||||
path = link['path'],
|
path = link['path'],
|
||||||
|
qr_path = link['qr_path'],
|
||||||
url = link['url'])
|
url = link['url'])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue