|
@@ -150,6 +150,7 @@ func main() {
|
|
config := flag.String("config", "config.json", "The path to the configuration-file to read")
|
|
config := flag.String("config", "config.json", "The path to the configuration-file to read")
|
|
timeout := flag.Duration("timeout", 5*time.Second, "The timeout used for fetching the remote feeds")
|
|
timeout := flag.Duration("timeout", 5*time.Second, "The timeout used for fetching the remote feeds")
|
|
schedule := flag.String("schedule", "@every 5m", "The cron schedule for fetching the remote feeds")
|
|
schedule := flag.String("schedule", "@every 5m", "The cron schedule for fetching the remote feeds")
|
|
|
|
+ startup := flag.Bool("startup", false, "Run on startup (first check)")
|
|
flag.Parse()
|
|
flag.Parse()
|
|
|
|
|
|
// Setup the default timeout and TTL
|
|
// Setup the default timeout and TTL
|
|
@@ -187,7 +188,9 @@ func main() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
// TODO: URL validiy checks
|
|
// TODO: URL validiy checks
|
|
- // feed.Unread = 0
|
|
|
|
|
|
+ if !*startup {
|
|
|
|
+ feed.Unread = 0
|
|
|
|
+ }
|
|
feeds[i] = *feed
|
|
feeds[i] = *feed
|
|
}(i, ent)
|
|
}(i, ent)
|
|
}
|
|
}
|