diff --git a/cgi-bin/main.go b/cgi-bin/main.go index a5317fa..20beda3 100644 --- a/cgi-bin/main.go +++ b/cgi-bin/main.go @@ -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) } diff --git a/main.go b/main.go index 0f7e6d2..282e8a9 100644 --- a/main.go +++ b/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) - } } diff --git a/template.gmi b/template.gmi deleted file mode 100644 index e602459..0000000 --- a/template.gmi +++ /dev/null @@ -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}}