added more options to fine tune positioning, omit/change prefix, modify QR code look and visual splitting of the printed number#25
Conversation
x/y offsets of whole label array, omit printing of the label, qr scale factor, qr border size and visual splitting of the printed number
|
Is this blocked by anything? Would love to use a different prefix :) |
alexanderbittner
left a comment
There was a problem hiding this comment.
After reviewing the code and running this locally to try out the new arguments, this appears to work well. No idea why the CI doesn't work on this PR, as posted above.
Let's hope a manual review helps!
promasu
left a comment
There was a problem hiding this comment.
The commit changes the file mode from 10644 to 10755. This should be reverted.
… first place ;) )
|
changed it back, not sure why it happend in the first place :) |
corrected typo Co-authored-by: Adrian Nöthlich <git@promasu.tech>
removed print statement Co-authored-by: Adrian Nöthlich <git@promasu.tech>
promasu
left a comment
There was a problem hiding this comment.
You are to quick :D
Please add the new parameters to the README as well so it's up to date
improved vertical alignment of scaled QR code (should now be centered somehow on the vertical axis)
I've added the options to the Readme, and also improved a bit the vertical alignment. This should help whith qr-scale-factors != 0.9 to have it centered along the vertical axis. |
There was a problem hiding this comment.
I'm not too sure about this now.
Feature wise it is surely great, but at the moment, our main.py is a big mess without proper classes.
I'm therefore right now not too happy about adding additional "globals" and "non-class-based abstraction", as it becomes more difficult to read and maintain.
is there alread any plan how this should be changed in the future? i.e. do you have a rough idea how to class everything and such, so it becomes more separated and easier to maintain? I would be willing to help, if I know how it will be changed, and maybe I'm even able to convert my changes to the new design... |
I'm right now preparing a more abstract label generation inside #53 especially with the different "Label Layouts" in mind. Thanks! |
|
Is there some progress? I am interested in this features, but honestly not so much in the maintainability. Do you expect much maintenance in the future? I cannot think of much more improvements to a "paperless-asn-qr-code" tool after this PR has been merged. |
This is one of my first tries to contribute something, so it might not be the perfect pull request...help appreciated :)
I Added new options to customize and fine tune the printed labels:
--prefix: Prefix in front of digits (default: ASN)--omit-prefix: Do not print prefix in front of digits (just use it in the generated QR code)--x-offset: Horizontal (X) offset in mm (default: 0)--y-offset: Vertical (Y) offset in mm (default: 0)--qr-scale-factor: Scale Factor of QR code (default: 0.9). Makes this option easier to play around until satisfied with the look.--qr-border-size: Size of white border around QR code (default: 4) Makes this option easier to play around until satisfied with the look.--split-at: visually split printed number at given digit position . Multiple timse allowed to add multiple spaces.