File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Introduction
13
13
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_miniQR
14
14
:alt: Build Status
15
15
16
- .. todo :: Describe what the library does.
16
+ A non-hardware dependant miniature QR generator library. All native Python!
17
17
18
18
Dependencies
19
19
=============
@@ -28,7 +28,13 @@ This is easily achieved by downloading
28
28
Usage Example
29
29
=============
30
30
31
- See examples folder for QR generating and displaying/drawing
31
+ .. code-block :: python
32
+ import adafruit_miniqr
33
+
34
+ qr = adafruit_miniqr.QRCode()
35
+ qr.add_data(b ' https://www.adafruit.com' )
36
+ qr.make()
37
+ print (qr.matrix)
32
38
33
39
Contributing
34
40
============
Original file line number Diff line number Diff line change 6
6
WHITE = "\x1b [1;47m \x1b [40m"
7
7
BLACK = " "
8
8
9
- def print_QR (matrix ):
9
+ def prettyprint_QR (matrix ):
10
10
# white 4-pixel border at top
11
11
for _ in range (4 ):
12
12
for _ in range (matrix .width + 8 ):
@@ -30,4 +30,5 @@ def print_QR(matrix):
30
30
qr = adafruit_miniqr .QRCode (qr_type = 3 , error_correct = adafruit_miniqr .L )
31
31
qr .add_data (b'https://www.adafruit.com' )
32
32
qr .make ()
33
- print_QR (qr .matrix )
33
+ print (qr .matrix )
34
+ prettyprint_QR (qr .matrix )
You can’t perform that action at this time.
0 commit comments