summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeedrc.518
1 files changed, 17 insertions, 1 deletions
diff --git a/sfeedrc.5 b/sfeedrc.5
index fe55f4d..022e696 100644
--- a/sfeedrc.5
+++ b/sfeedrc.5
@@ -1,4 +1,4 @@
-.Dd January 26, 2021
+.Dd July 6, 2021
.Dt SFEEDRC 5
.Os
.Sh NAME
@@ -147,6 +147,22 @@ feeds() {
feed "xkcd" "https://xkcd.com/atom.xml" "https://xkcd.com"
}
.Ed
+.Pp
+To change the default
+.Xr curl 1
+options for fetching the data, the
+.Fn fetch
+function can be overridden and added at the top of the
+.Nm
+file:
+.Bd -literal
+# fetch(name, url, feedfile)
+fetch() {
+ # allow for 1 redirect, hide User-Agent, timeout is 15 seconds.
+ curl -L --max-redirs 1 -H "User-Agent:" -f -s -m 15 \\
+ "$2" 2>/dev/null
+}
+.Ed
.Sh SEE ALSO
.Xr curl 1 ,
.Xr iconv 1 ,