1
0
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:
Matt Baer 2015-01-31 21:40:26 -05:00
parent 391ad2e275
commit c0c1ccf233

View File

@ -12,8 +12,11 @@ import (
"text/template"
)
var (
scoresPath = "/home/krowbar/Code/irc/tildescores.txt"
)
const (
scores = "/home/krowbar/Code/irc/tildescores.txt"
scoreDeltasPath = "/home/bear/scoredeltas.txt"
deltaDelimiter = "+++"
)
@ -23,11 +26,16 @@ func main() {
// Get any arguments
outPtr := flag.String("o", "tildescores", "Output file name")
isTestPtr := flag.Bool("t", false, "Specifies we're developing")
flag.Parse()
if *isTestPtr {
scoresPath = "/home/bear/tildescores.txt"
}
headers := []string{ "User", "Tildes", "Last Collected", "Last Amt.", "# Asks", "Avg." }
scoresData := readData(scores, "&^%")
scoresData := readData(scoresPath, "&^%")
updatesData := readData(scoreDeltasPath, deltaDelimiter)
scoresData = checkScoreDelta(scoresData, updatesData)