Skip to content

Expose barcode metadata through the API.#8

Open
kousu wants to merge 1 commit into
lubo:masterfrom
kousu:coords
Open

Expose barcode metadata through the API.#8
kousu wants to merge 1 commit into
lubo:masterfrom
kousu:coords

Conversation

@kousu
Copy link
Copy Markdown
Contributor

@kousu kousu commented Mar 31, 2019

This lets me find out the coordinates and type of the barcodes detected. It remains backwards compatible.

Copy link
Copy Markdown
Contributor Author

@kousu kousu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests.

Comment thread zxinglight/_zxinglight.cpp
Copy link
Copy Markdown
Owner

@lubo lubo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @kousu. I'm so sorry it took me so long to react, I've been very busy. I've done the initial round of the review, so let me know what you think. Also, as you mentioned above, this needs tests. I can't merge it without them.

Comment thread zxinglight/__init__.py
https://zxing.github.io/zxing/apidocs/com/google/zxing/Binarizer.html
"""
codes = read_codes_full(*args, **kwargs)
return [text for text, points, format in codes]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this library is supposed to be lightweight, I'd rather break backward compatibility than have multiple functions, which do practically the same thing.

Comment thread zxinglight/__init__.py

Returns:
A list of barcode values.
A list [(code, position, type), ...] containing each barcode found.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be great if we returned namedtuples here instead of regular tuples. Working with long/nested tuples can quickly become awkward.

@kousu
Copy link
Copy Markdown
Contributor Author

kousu commented May 1, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants