feat: add QR code generation and printing support#28
Open
gandzekas wants to merge 1 commit into
Open
Conversation
- Add function/qrcode_inp.py with QR code generation using qrcode library - Add --qrcode CLI flag to daily_arg.py for printing QR codes - Update README.md with QR code usage documentation - Remove 'QR codes' from Future Ideas (now implemented) - qrcode dependency already present in requirements.txt QR codes can be printed via: python daily_arg.py --qrcode "https://example.com" Supports both thermal printers and --test mode (ASCII output).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements QR code generation and printing for thermal printers, addressing the "QR codes" item from the Future Ideas list in README.md.
Changes
function/qrcode_inp.py: New module with QR code generation and printing:
generate_qr_code(data, box_size, border)- generates PIL Image QR codeprint_qr_code(printer, data, box_size, border, title)- prints to thermal printerprint_qr_code_from_args(printer, data, box_size)- CLI convenience functiondaily_arg.py: Added
--qrcodeargument:python daily_arg.py --qrcode "https://github.com/gandzekas"--testmodesREADME.md: Documented the new feature with usage example, removed "QR codes" from Future Ideas list
Testing
python -m py_compilepasses for all modified files--testmode: QR code renders correctly as ASCII art in terminalprinter.image()methodRelated