summaryrefslogtreecommitdiff
path: root/comitium.go
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-03-19 08:29:44 -0600
committernytpu <alex@nytpu.com>2021-03-19 08:29:44 -0600
commit2974c5413c388ed904cb95bc1ba6bc7aea0b5e21 (patch)
tree2252b6f339480be0ecdfee48f2125122d346bb98 /comitium.go
parentdb626e0c662896ad6483d8834b0546e2f09e1a49 (diff)
remove list command and instead write "subscriptions.gmi" & "feed.gmi"
Diffstat (limited to 'comitium.go')
-rw-r--r--comitium.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/comitium.go b/comitium.go
index 9714a23..418e220 100644
--- a/comitium.go
+++ b/comitium.go
@@ -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.")