devartis / passbook

Python library to create Apple Passbook (.pkpass) files
http://www.devartis.com/
MIT License
272 stars 108 forks source link

ISSUE 30: Add Code128 Support To BarcodeFormat #31

Closed johnksterling closed 8 years ago

johnksterling commented 8 years ago

Here is a minimalist patch to address https://github.com/devartis/passbook/issues/30. It does 2 things: 1) Starts setting the 'barcodes' field that has been added as of ios9 2) Adds the CODE128 type as a valid BarcodeFormat. Note that if you set the barcode format to CODE128 this code sets the legacy field to the default PDF417

I also added a couple of simple unit tests. Could use some more of those.

Possible Enhancements which would be slightly more invasive: a) Would be easy to allow the user to over-ride the legacy default if someone needs that. b) The apple wallet api supports a list of barcodes, but this code always creates a list of 1

jguinness commented 8 years ago

Are you planning on pushing a new version to pypi?