Skip to content

Commit b4b8470

Browse files
committed
0.9.1 PyPI published
1 parent ed8c5d9 commit b4b8470

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

MANIFEST

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# file GENERATED by distutils, do NOT edit
2+
qrplatba_fpdf.py
3+
setup.cfg
4+
setup.py

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
11
# qrplatba-fpdf
2-
another approach to print QRPlatba QR code, using fpdf/wfpdf/pyqrcode
2+
Another approach to print QRPlatba QR code, using fpdf/wfpdf/pyqrcode
3+
4+
This is alternative to the qrplatba module.
5+
6+
```
7+
install_requires = ['wfpdf', 'pyqrcode'] # wfpdf requires fpdf
8+
```
9+
10+
- 0.9.1 PyPI published
11+
12+
## Usage:
13+
```
14+
from wfpdf import PDF
15+
from qrplatba_fpdf import qrplatba
16+
17+
with PDF('test_qrplatba.pdf') as pdf:
18+
pdf.set_font('', style='B')
19+
qrplatba(pdf, IBAN, castka=2499)
20+
```
21+
22+
See qrplatba() method doc for more parameters.
23+
For the example see script call in qrplatba_fpdf.py (if __name__ == '__main__':).

qrplatba_fpdf.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import os
1414
import tempfile
1515

16-
import pyqrcode # pip install pyqrcode
17-
from wfpdf import PDF
16+
import pyqrcode # pip install pyqrcode
17+
from wfpdf import PDF # pip install wfpdf
1818

1919

2020
def qrplatba(pdf,
@@ -100,8 +100,20 @@ def getTemppngName():
100100
IBAN = 'CZ6255000000000001234567'
101101
castka = 2499
102102

103-
with PDF('test_qrplatba.pdf') as pdf:
103+
# just to make demo working: we need readwrite access
104+
outputname = 'test_qrplatba.pdf'
105+
try:
106+
with open(outputname, 'wb'):
107+
pass
108+
os.unlink(outputname)
109+
except IOError:
110+
outputname = os.path.join(tempfile.gettempdir(), outputname)
111+
112+
with PDF(outputname) as pdf:
104113
pdf.set_font('', style='B')
105114
qrplatba(pdf, IBAN, castka=2499)
106115
qrplatba(pdf, IBAN, castka='249.00', mena='USD', VS='2015111', msg='Smith J.', w=30, x=20, y=60,
107116
X_URL='HTTP://WWW.SOMEURL.COM/')
117+
118+
from __future__ import print_function
119+
print('%s was created.' % outputname)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
setup(
33
name = 'qrplatba-fpdf',
44
py_modules = ['qrplatba_fpdf'],
5-
version = '0.9.0',
5+
version = '0.9.1',
66
description = 'Another approach to print QRPlatba QR code, using fpdf/wfpdf/pyqrcode',
77
install_requires = ['wfpdf', 'pyqrcode'],
88
author = 'Mirek Zvolsky',
99
author_email = 'zvolsky@seznam.cz',
1010
url = 'https://github.com/zvolsky/qrplatba-fpdf',
11-
download_url = 'https://github.com/zvolsky/qrplatba-fpdf/tarball/0.9.0',
11+
download_url = 'https://github.com/zvolsky/qrplatba-fpdf/tarball/0.9.1',
1212
keywords = ['qr', 'qrplatba', 'qr code', 'qr platba'],
1313
classifiers=[
1414
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)