add regenerate command
This commit is contained in:
+12
@@ -67,6 +67,18 @@ func main() {
|
||||
fmt.Fprintf(os.Stderr, "Error writing feed: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
case "regenerate":
|
||||
argCheck(c.Args(), 0, false, "'regenerate' doesn't take an argument!")
|
||||
err = core.Data.WriteSubs(dataPath)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error writing subscriptions: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
err = core.Data.WriteFeed(dataPath)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error writing feed: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
case "add":
|
||||
argCheck(c.Args(), 1, true, "Please provide a URL to add.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user