Skip to content

Commit f2a9d52

Browse files
committed
🐛 code_types property is now a string
This is a follow up for #42
1 parent 7eadd7f commit f2a9d52

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@
66
[![Documentation Status](https://readthedocs.org/projects/zbarcam/badge/?version=latest)](https://zbarcam.readthedocs.io/en/latest/?badge=latest)
77

88
Real time Barcode and QR Code scanner using the camera.
9-
It's built on top of [Kivy](https://github.com/kivy/kivy) and [pyzbar](https://github.com/NaturalHistoryMuseum/pyzbar).
9+
It's built on top of [Kivy](https://github.com/kivy/kivy) and works with both [pyzbar](https://github.com/NaturalHistoryMuseum/pyzbar) or [zbarlight](https://github.com/Polyconseil/zbarlight).
1010

1111
<img src="https://raw.githubusercontent.com/AndreMiras/garden.zbarcam/develop/screenshot.gif" align="right" width="256" alt="screenshot" />
1212

1313
## How to use
1414
Simply import and instanciate `ZBarCam` in your kvlang file and access its `symbols` property.
1515
```yaml
1616
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
17-
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
1817
BoxLayout:
1918
orientation: 'vertical'
2019
ZBarCam:
2120
id: zbarcam
2221
# optional, by default checks all types
23-
code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13
22+
code_types: 'QRCODE', 'EAN13'
2423
Label:
2524
size_hint: None, None
2625
size: self.texture_size[0], 50

src/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111

1212
DEMO_APP_KV_LANG = """
1313
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
14-
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
1514
BoxLayout:
1615
orientation: 'vertical'
1716
ZBarCam:
1817
id: zbarcam
1918
# optional, by default checks all types
20-
code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13
19+
code_types: 'QRCODE', 'EAN13'
2120
Label:
2221
size_hint: None, None
2322
size: self.texture_size[0], 50

0 commit comments

Comments
 (0)