mirror of
https://github.com/thebaer/tildes.git
synced 2018-07-20 07:15:21 +00:00
Test/develop mode with -t flag
This commit is contained in:
parent
391ad2e275
commit
c0c1ccf233
12
tablizer.go
12
tablizer.go
@ -12,8 +12,11 @@ import (
|
|||||||
"text/template"
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
scoresPath = "/home/krowbar/Code/irc/tildescores.txt"
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
scores = "/home/krowbar/Code/irc/tildescores.txt"
|
|
||||||
scoreDeltasPath = "/home/bear/scoredeltas.txt"
|
scoreDeltasPath = "/home/bear/scoredeltas.txt"
|
||||||
deltaDelimiter = "+++"
|
deltaDelimiter = "+++"
|
||||||
)
|
)
|
||||||
@ -23,11 +26,16 @@ func main() {
|
|||||||
|
|
||||||
// Get any arguments
|
// Get any arguments
|
||||||
outPtr := flag.String("o", "tildescores", "Output file name")
|
outPtr := flag.String("o", "tildescores", "Output file name")
|
||||||
|
isTestPtr := flag.Bool("t", false, "Specifies we're developing")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
if *isTestPtr {
|
||||||
|
scoresPath = "/home/bear/tildescores.txt"
|
||||||
|
}
|
||||||
|
|
||||||
headers := []string{ "User", "Tildes", "Last Collected", "Last Amt.", "# Asks", "Avg." }
|
headers := []string{ "User", "Tildes", "Last Collected", "Last Amt.", "# Asks", "Avg." }
|
||||||
|
|
||||||
scoresData := readData(scores, "&^%")
|
scoresData := readData(scoresPath, "&^%")
|
||||||
updatesData := readData(scoreDeltasPath, deltaDelimiter)
|
updatesData := readData(scoreDeltasPath, deltaDelimiter)
|
||||||
|
|
||||||
scoresData = checkScoreDelta(scoresData, updatesData)
|
scoresData = checkScoreDelta(scoresData, updatesData)
|
||||||
|
Loading…
Reference in New Issue
Block a user