Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hydrogen602/printer-interface-to-shortcuts
Interface for octoprint's API to simple produce endpoints for various common tasks
https://github.com/hydrogen602/printer-interface-to-shortcuts
octoprint
Last synced: about 2 months ago
JSON representation
Interface for octoprint's API to simple produce endpoints for various common tasks
- Host: GitHub
- URL: https://github.com/hydrogen602/printer-interface-to-shortcuts
- Owner: hydrogen602
- License: mit
- Created: 2023-08-30T05:55:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-25T04:56:25.000Z (6 months ago)
- Last Synced: 2024-06-25T05:54:15.960Z (6 months ago)
- Topics: octoprint
- Language: Rust
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Project
Provides a simple interface to complex common actions via the octoprint API
### Makefile
`copy` - Copies the rust source to the octoprint server
`remote-run` - Runs the code on the octoprint server interactively, i.e. can be quit with ^C
`run` - Connects to the octoprint server, copies over the code, kills the current process and spawns the new one
`clippy` - Runs the clippy linter on the code with `__CARGO_FIX_YOLO`
`read-log` - Reads the log file from the process spawned by `run`
`kill-remote` - Kills the existing process on the octoprint server
### Service
To setup it to run as a service with systemd, run
```bash
sudo ln -s "$(pwd)/printer-actions.service" /etc/systemd/system/
```
in the folder where all the files are located.
Then run
```bash
sudo systemctl daemon-reload
```
to load the new service. **This needs to be done every time the service file changes**
To enable it, start it, and check on it:
```bash
sudo systemctl enable printer-actions.service
sudo systemctl start printer-actions.service
sudo systemctl status printer-actions.service
```