Update README

This commit is contained in:
Jeffrey Serio 2023-03-25 18:24:07 -05:00
parent 1d2c5295bf
commit 5b62c7c6d0

View File

@ -4,8 +4,10 @@ Get stats from a remote Transmission instance using the Transmission RPC API, an
For other people using this, change the stylesheet in `template.html` to your preferred one. Also edit the following for your remote Transmission instance: For other people using this, change the stylesheet in `template.html` to your preferred one. Also edit the following for your remote Transmission instance:
```go ```shell
transmissionbt, err := transmissionrpc.New("<your Transmission server ip>", "username", "password", nil) export RPC_HOST="<ip address of Transmission server>"
export RPC_USER="<rpc username>"
export RPC_PASSWORD="<rpc password>"
``` ```
My personal use case for this involves running the Go binary `go-transmission-stats` on a systemd timer that triggers the corresponding service every 12 hours. My personal use case for this involves running the Go binary `go-transmission-stats` on a systemd timer that triggers the corresponding service every 12 hours.
@ -35,6 +37,9 @@ ExecStart=sh -c '/usr/local/bin/go-transmission-stats > /home/user/public/html/t
User=<your user> User=<your user>
Group=<your user's group> Group=<your user's group>
WorkingDirectory=/home/user/go-transmission-stats WorkingDirectory=/home/user/go-transmission-stats
ENVIRONMENT="RPC_HOST=<ip address of Transmission server>"
ENVIRONMENT="RPC_USER=<rpc username>"
ENVIRONMENT="RPC_PASSWORD=<rpc password>"
``` ```
Create the systemd timer: Create the systemd timer: