mirror of
https://codeberg.org/hyperreal/go-transmission-stats
synced 2024-11-01 16:53:10 +01:00
Remove Gemini template
This commit is contained in:
parent
9ccc7efde7
commit
8932b4ff6e
@ -71,7 +71,7 @@ func main() {
|
||||
fmt.Println("20 text/gemini\r")
|
||||
fmt.Println("```")
|
||||
|
||||
transmissionbt, err := transmissionrpc.New("192.168.122.121", "", "", nil)
|
||||
transmissionbt, err := transmissionrpc.New(os.Getenv("RPC_HOST"), os.Getenv("RPC_USER"), os.Getenv("RPC_PASSWD"), nil)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
14
main.go
14
main.go
@ -151,18 +151,4 @@ func main() {
|
||||
if err = htmlTemplate.Execute(htmlFile, data); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
gmiTemplate, err := template.ParseFiles("template.gmi")
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
gmiFile, err := os.Create(os.Getenv("GMI_FILE"))
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
if err = gmiTemplate.Execute(gmiFile, data); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
26
template.gmi
26
template.gmi
@ -1,26 +0,0 @@
|
||||
# Torrent Stats
|
||||
As of {{.Date}}
|
||||
|
||||
## Session Stats
|
||||
{{range .SessionStats}}
|
||||
{{.Label}}: {{.Value}}
|
||||
{{end}}
|
||||
|
||||
## Current Stats
|
||||
{{range .CurrentStats}}
|
||||
{{.Label}}: {{.Value}}
|
||||
{{end}}
|
||||
|
||||
## Cumulative Stats
|
||||
{{range .CumulativeStats}}
|
||||
{{.Label}}: {{.Value}}
|
||||
{{end}}
|
||||
|
||||
## Torrent Info
|
||||
{{range .TorrentInfo}}
|
||||
Name: {{.Name}}
|
||||
Date Added: {{.DateAdded}}
|
||||
Total Size: {{.TotalSize}}
|
||||
Peers Connected: {{.PeersConnected}}
|
||||
Peers Getting From Us: {{.PeersGettingFromUs}}
|
||||
{{end}}
|
Loading…
Reference in New Issue
Block a user