Introduction
Introduction Statistics Contact Development Disclaimer Help
jf2sfeed.1: add example to use with sfeed_update in sfeedrc - jfconvert - JSON …
git clone git://git.codemadness.org/jfconvert
Log
Files
Refs
README
LICENSE
---
commit 25c567e55f7c5b507bac399b684f2a85ecd1221d
parent dd5f1d67da802e210e66abf707c4741a2c2b5845
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 9 Sep 2024 18:19:27 +0200
jf2sfeed.1: add example to use with sfeed_update in sfeedrc
Diffstat:
M jf2sfeed.1 | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/jf2sfeed.1 b/jf2sfeed.1
@@ -1,4 +1,4 @@
-.Dd April 5, 2023
+.Dd September 9, 2024
.Dt JF2SFEED 1
.Os
.Sh NAME
@@ -21,10 +21,30 @@ An example to support JSON Feed in sfeed:
.Bd -literal
curl -s 'https://codemadness.org/jsonfeed_content.json' | jf2sfeed | sfeed_cur…
.Ed
+.Pp
+Another example shows how to use
+.Nm
+with sfeed_update by overriding the
+.Fn parse
+function in the sfeedrc file.
+.Bd -literal
+# parse(name, feedurl, basesiteurl)
+parse() {
+ case "$2" in
+ *.json) jf2sfeed;;
+ *) sfeed "$3";;
+ esac
+}
+
+feeds() {
+ feed "codemadness_jsonfeed" "https://www.codemadness.org/jsonfeed_cont…
+}
+.Ed
.Sh SEE ALSO
.Xr awk 1 ,
.Xr curl 1 ,
-.Xr sfeed 1
+.Xr sfeed 1 ,
+.Xr sfeedrc 5
.Sh STANDARDS
.Rs
.%T JSON Feed Version 1.1
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.