Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 code_types property is now a string #50

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
[![Documentation Status](https://readthedocs.org/projects/zbarcam/badge/?version=latest)](https://zbarcam.readthedocs.io/en/latest/?badge=latest)

Real time Barcode and QR Code scanner using the camera.
It's built on top of [Kivy](https://github.com/kivy/kivy) and [pyzbar](https://github.com/NaturalHistoryMuseum/pyzbar).
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).

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

## How to use
Simply import and instanciate `ZBarCam` in your kvlang file and access its `symbols` property.
```yaml
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
BoxLayout:
orientation: 'vertical'
ZBarCam:
id: zbarcam
# optional, by default checks all types
code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13
code_types: 'QRCODE', 'EAN13'
Label:
size_hint: None, None
size: self.texture_size[0], 50
Expand Down
3 changes: 1 addition & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@

DEMO_APP_KV_LANG = """
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
BoxLayout:
orientation: 'vertical'
ZBarCam:
id: zbarcam
# optional, by default checks all types
code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13
code_types: 'QRCODE', 'EAN13'
Label:
size_hint: None, None
size: self.texture_size[0], 50
Expand Down