]> Sergey Matveev's repositories - feeder.git/blobdiff - opml2feeds
Raise copyright years
[feeder.git] / opml2feeds
index 2e6022e29e4d322aa9711ae0368bd03f6be526a3..6392eda55d80b3c556893fcd786373da96f7f25b 100755 (executable)
@@ -4,10 +4,10 @@
 # The folder name will be the title as defined in the @text attr
 
 set -e
 # 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
-       url=$(echo $outline | jq '."@xmlUrl"' -r)
-       dir=$(echo $outline | jq '."@text"' -r)
-       mkdir -p "$dir"/{cur,new,tmp} # make it maildir
-       echo "$url" > $dir/url
-       echo $dir
+${XML:-xml} sel -T -t -m opml/body/outline -v @xmlUrl -n -v @text -n |
+while read url ; do
+       read dir
+       mkdir -p -- "$dir"/cur "$dir"/new "$dir"/tmp # make it maildir
+       echo "$url" >"$dir"/url
+       printf "%s\n" "$dir"
 done
 done