summaryrefslogtreecommitdiffstats
path: root/fern.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2021-12-01 21:59:43 -0500
committersiddharth <s@ricketyspace.net>2021-12-01 21:59:53 -0500
commit0c77489b553990ee9f9072afe715a0cf60d78dc6 (patch)
treed05ab5a179b69e5414654c12b0c825e06b0e71d0 /fern.go
parent1f748cc2394e28c384497dcdfaf92fb7d5af202e (diff)
fern.go: add doc
Diffstat (limited to 'fern.go')
-rw-r--r--fern.go38
1 files changed, 37 insertions, 1 deletions
diff --git a/fern.go b/fern.go
index 5d3f3d2..21f9206 100644
--- a/fern.go
+++ b/fern.go
@@ -1,6 +1,42 @@
// SPDX-License-Identifier: ISC
// Copyright © 2021 siddharth <s@ricketyspace.net>
+// fern is a simple media feed downloader.
+//
+// It depends on yt-dlp to download the media found in the media feeds
+// to your computer.
+//
+// fern currently supports YoutTube and NPR feeds.
+//
+// Information about what media feeds to download, the location of
+// yt-dlp program on your computer, and the directory where the media
+// should be downloaded to must be specified in a config file which
+// fern expects to be at $HOME/.config/fern/fern.json
+//
+// fern's config file contains three fields:
+//
+// {
+// "ydl-path": "/usr/local/bin/yt-dlp",
+// "dump-dir": "~/media/feeds", // media feed download directory
+// "feeds": [...] // list of media feeds.
+// }
+//
+// Each item in the media "feeds" must be:
+//
+// {
+// "id": "media-feed-id", // uniquid identifier for the media feed
+// "source": "https://feeds.npr.org/XXXX/rss.xml", // media feed url
+// "schema": "npr", // should be "youtube" or "npr"
+// "last": 5 // The last N items that should be downloaded
+// }
+//
+// You may download an example config file for fern from
+// https://ricketyspace.net/fern/fern.json
+//
+// fern does not take any arguments, to run it just do:
+//
+// $ fern
+//
package main
import (
@@ -25,7 +61,7 @@ func init() {
os.Exit(1)
}
- // Initialize process state.
+ // Initialize process state.
pState = state.NewProcessState()
// Open database.