Remove Gemini template

This commit is contained in:
Jeffrey Serio 2023-04-01 21:22:55 -05:00
parent 9ccc7efde7
commit 8932b4ff6e
3 changed files with 1 additions and 41 deletions

View File

@ -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
View File

@ -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)
}
}

View File

@ -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}}