~sircmpwn/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Add -S flag for specifying a file with feed URLs

Details
Message ID
<20201118220839.30631-1-skuzzymiglet@gmail.com>
DKIM signature
pass
Download raw message
Patch: +14 -0
---
 openring.go | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/openring.go b/openring.go
index 4f74631..994b608 100644
--- a/openring.go
+++ b/openring.go
@@ -1,6 +1,7 @@
package main

import (
	"bufio"
	"html"
	"html/template"
	"io/ioutil"
@@ -51,6 +52,7 @@ func main() {
		narticles  = getopt.Int("n", 3, "article count")
		perSource  = getopt.Int("p", 1, "articles to take from each source")
		summaryLen = getopt.Int("l", 256, "length of summaries")
		urlsFile   = getopt.String("S", "", "file with URLs of sources")
		sources    []*url.URL
	)
	getopt.Var((*urlSlice)(&sources), "s", "list of sources")
@@ -65,6 +67,18 @@ func main() {
		panic(err)
	}

	if *urlsFile != "" {
		file, err := os.Open(*urlsFile)
		if err != nil {
			panic(err)
		}
		sc := bufio.NewScanner(file)
		for sc.Scan() {
			(*urlSlice)(&sources).Set(sc.Text())
		}
		file.Close()
	}

	input, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		panic(err)
-- 
2.29.2
Details
Message ID
<C76QENSIQ662.4VF4JSYKFLBH@taiga>
In-Reply-To
<20201118220839.30631-1-skuzzymiglet@gmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~sircmpwn/openring
   f13edb5..  master -> master
Reply to thread Export thread (mbox)