Skip to content

Conversation

@bofh69
Copy link
Owner

@bofh69 bofh69 commented Jan 13, 2026

The OpenPrintTag support seems to work fine as well as OpenTag3D and reading nfc2klipper's own formatted tags.

There is no support for updating the auxiliary section with the usage yet. Unless using the spool back and forth between a printer with klipper and a Prusa with NFC reader, that's not a drawback.

Copilot AI and others added 4 commits January 13, 2026 11:12
- Created abstract NfcInterface base class
- Refactored NfcHandler to NfcpyHandler implementing NfcInterface
- Added create_nfc_handler factory function to select implementations
- Added --nfc-implementation command-line option to nfc2klipper_backend.py
- Updated MockNfcHandler to implement NfcInterface
- Default implementation is 'nfcpy' (current behavior)
- Placeholder for 'pn5180-tagomatic' implementation ready for future addition

Co-authored-by: bofh69 <[email protected]>
@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA d5f0a53.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

License Issues

requirements.txt

PackageVersionLicenseIssue Type
pn5180-tagomatic0.1.1rc2NullUnknown License
simple_parsing~> 0.1.7NullUnknown License
numpy~> 2.2.3NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
pip/cbor2 5.8.0 🟢 6.1
Details
CheckScoreReason
Maintained🟢 1017 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Code-Review⚠️ 2Found 6/29 approved changesets -- score normalized to 2
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Vulnerabilities🟢 100 existing vulnerabilities detected
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Packaging🟢 10packaging workflow detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
pip/ndeflib 0.3.3 UnknownUnknown
pip/numpy ~> 2.2.3 🟢 7.2
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Dependency-Update-Tool🟢 10update tool detected
Maintained🟢 1030 commit(s) and 26 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ 0Project has not signed or included provenance with any releases.
Vulnerabilities⚠️ 024 existing vulnerabilities detected
SAST🟢 9SAST tool detected but not run on all commits
License🟢 9license file detected
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Security-Policy🟢 9security policy file detected
Fuzzing🟢 10project is fuzzed
CI-Tests🟢 1012 out of 12 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 101 contributing companies or organizations
pip/pn5180-tagomatic 0.1.1rc2 UnknownUnknown
pip/referencing ~> 0.37.0 🟢 7.2
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ -1Found no human activity in the last 16 changesets
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Security-Policy🟢 4security policy file detected
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ 0Project has not signed or included provenance with any releases.
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Vulnerabilities🟢 73 existing vulnerabilities detected
Packaging🟢 10packaging workflow detected
SAST🟢 10SAST tool is run on all commits
pip/simple_parsing ~> 0.1.7 UnknownUnknown

Scanned Files

  • requirements.txt

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Bandit found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@bofh69
Copy link
Owner Author

bofh69 commented Jan 13, 2026

@copilot Fix the mypy errors.

Copy link
Contributor

Copilot AI commented Jan 13, 2026

@bofh69 I've opened a new pull request, #63, to work on those changes. Once the pull request is ready, I'll request review from you.

@bofh69 bofh69 force-pushed the support-openprinttag branch from 3530688 to 651fd7a Compare January 13, 2026 19:47
@bofh69
Copy link
Owner Author

bofh69 commented Jan 13, 2026

@copilot Fix build errors

Copy link
Contributor

Copilot AI commented Jan 13, 2026

@bofh69 I've opened a new pull request, #64, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI mentioned this pull request Jan 13, 2026
5 tasks
@bofh69 bofh69 force-pushed the support-openprinttag branch from ae85347 to e5ddcba Compare January 13, 2026 20:15
@bofh69
Copy link
Owner Author

bofh69 commented Jan 13, 2026

@copilot fix the mypy and pylint errors, without changing the files under open_print_tag

Copy link
Contributor

Copilot AI commented Jan 13, 2026

@bofh69 I've opened a new pull request, #65, to work on those changes. Once the pull request is ready, I'll request review from you.

@bofh69 bofh69 force-pushed the support-openprinttag branch 3 times, most recently from eb0cc50 to 4d24068 Compare January 14, 2026 09:43
@bofh69 bofh69 requested a review from Copilot January 17, 2026 15:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for OpenPrintTag NFC tags by integrating the OpenPrintTag data format parser and adding PN5180 reader support. The main changes enable nfc2klipper to read OpenPrintTag tags (which use NFC Type-V), parse their structured data, and automatically create corresponding entries in Spoolman.

Changes:

  • Added OpenPrintTag parser implementation with field mapping support
  • Integrated PN5180 reader support for NFC Type-V tags
  • Introduced NFC handler abstraction layer with interface-based design

Reviewed changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
open_print_tag/utils/* OpenPrintTag reference implementation copied from upstream project
lib/openprinttag_parser.py New parser for OpenPrintTag format with Spoolman integration
lib/nfc_handler.py Refactored to support multiple reader implementations (nfcpy, PN5180)
lib/nfc_interface.py New abstract interface for NFC handlers
lib/config.py Added configuration methods for OpenPrintTag field mappings
nfc2klipper_backend.py Integrated OpenPrintTag parser and PN5180 support
nfc2klipper.cfg Added configuration sections for PN5180 and OpenPrintTag
README.md Updated documentation for PN5180 reader and OpenPrintTag support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bofh69 bofh69 force-pushed the support-openprinttag branch from 5f23435 to d15d74e Compare January 17, 2026 22:25
@bofh69 bofh69 changed the title [WIP] - Support OpenPrintTag tags Support OpenPrintTag with PN5180 reader Jan 18, 2026
@bofh69 bofh69 force-pushed the support-openprinttag branch 3 times, most recently from ea3b48f to e8a0b1c Compare January 18, 2026 09:09
The intro is updated. Removed the secion about write_tags.py.
Minor clarifications.
@bofh69 bofh69 force-pushed the support-openprinttag branch from e8a0b1c to d5f0a53 Compare January 18, 2026 09:12
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