-
Notifications
You must be signed in to change notification settings - Fork 54
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
Can't observe support for mixed modes #76
Comments
Thanks for bringing up this issue. >>> qr = segno.make(['THE SQUARE ROOT OF 2 IS 1', '.', '41421356237309504880168872420969807856967187537694807317667973799'])
>>> qr.mode
>>> qr.designator
'3-L' Result: >>> qr = segno.make(['THE SQUARE ROOT OF 2 IS 1.', '41421356237309504880168872420969807856967187537694807317667973799'])
>>> qr.mode
>>> qr.designator
'3-L' I agree that Segno should recognize the modes and divide the content accordingly, see also #25. |
Ah, thanks, that is fair enough. In that case I would redirect this issue to be against incomplete documentation. It would be helpful if it would be mentioned there that manual segmentation is supported by passing an iterable as content, in addition to the listed str, int and bytes. https://segno.readthedocs.io/en/stable/api.html#segno.make.params.content |
@heuer , currently users can not pass mode in str type for different segments. For example, this is invalid input >>> qr=segno.make([('abcabcabc', 'byte'), ('123123123', 'numeric')]) I have to write >>> qr=segno.make([('abcabcabc', 4), ('123123123', 1)]) |
@neycyanshi, sorry for the late response. |
Yes, it is better to optimize chunks. Are you working on it? I'd like to help if you are busy now. |
According to the feature comparison table, segno is supposed to support mixing modes, and documentation further specifies that qr.mode is supposed to return None if mixed modes are used. However, I am unable to find any documented API for manually specifying the segmentation, and I can not observe any automatic segmentation either.
Optimal solution would be version 3, with two segments: alphanumeric and numeric.
The text was updated successfully, but these errors were encountered: