remove list command and instead write "subscriptions.gmi" & "feed.gmi"

This commit is contained in:
nytpu
2021-03-19 08:29:44 -06:00
parent db626e0c66
commit 2974c5413c
6 changed files with 60 additions and 34 deletions
+6 -4
View File
@@ -59,12 +59,14 @@ func main() {
fetch.RefreshAll(&core.Data, *refreshWorkersFlag)
err = core.Data.WriteSubs(dataPath)
if err != nil {
fmt.Fprintf(os.Stderr, "Error saving subscriptions: %v\n", err)
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 "list":
argCheck(c.Args(), 0, false, "'list' doesn't take an argument!")
core.Data.Export(os.Stdout)
case "add":
argCheck(c.Args(), 1, true, "Please provide a URL to add.")