Releases: bofh69/nfc2klipper
Separate web API process
Changes
This release splits the nfc2klipper.py file into two new files:
nfc2klipper_backend.py, runs the code communicating with the NFC reader.nfc2klipper_api.pyruns the web API. It can now be started with a production ready web server. Gunicorn is included in the requirements to make it easy to start, but any Python WSGI supporting web server should work.
The two services communicate with each other through a unix domain socket. Its path is taken from the socket_path key under [webserver] in the config file, copy that from the default config file and update to a suitable path. The backend server need to have write permission to the dir it is in.
There is a new nfc2klipper.py file that will start the backend and the webserver as usual, making it possible to upgrade without changing the systemd service file.
For developers
The code now uses types everywhere. One can run mypy on the code with make typecheck.
There are mock objects for the code communicating with Spoolman, Moonraker and the NFC-reader. That way the code can be tested without them. Run it with make run-mock
More like the Klipper/Moonraker ecosystem
-
The config file is moved to
$HOME/.config/nfc2klipper/nfc2klipper.cfg, and has changed format to toml, looking like Klipper & Moonraker config files. -
Added a config file for moonraker (
moonraker-nfc2klipper.cfg) to use its update manager for future updates of nfc2klipper.
Bug fix release and minor polish
0.0.2 could only read one tag. See #13, that's now fixed.
There are a few improvements to the TUI and web GUI.
Thanks @scoggins
The systemd configuration file has been improved.
Thanks @thijstriemstra
0.0.2: Merge pull request #6 from bofh69/add_web_interface
This version uses a config file instead of command line arguments.
An experimental web server interface to write tags have been added.