]> Sergey Matveev's repositories - feeder.git/commitdiff
Use stdin for simplicity and flexibility
authorSergey Matveev <stargrave@stargrave.org>
Fri, 17 Feb 2023 18:55:12 +0000 (21:55 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 17 Feb 2023 18:55:13 +0000 (21:55 +0300)
"opml2feeds < file.opml" instead of "opml2feeds file.opml", without
requiring file.opml existence on filesystem.

opml2feeds

index 2e6022e29e4d322aa9711ae0368bd03f6be526a3..36ccc9628d34fb15f85b2867118fd87368c9baf6 100755 (executable)
@@ -4,7 +4,7 @@
 # The folder name will be the title as defined in the @text attr
 
 set -e
-cat $1 | xq '.opml.body.outline[]' -rc | while read outline ; do
+xq '.opml.body.outline[]' -rc | while read outline ; do
        url=$(echo $outline | jq '."@xmlUrl"' -r)
        dir=$(echo $outline | jq '."@text"' -r)
        mkdir -p "$dir"/{cur,new,tmp} # make it maildir