xmlstarlet ("xml" command) in general most likely to be installed on the
system and there is just single invocation of it.
# 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
-xq '.opml.body.outline[]' -rc | while read outline ; do
- url=$(echo $outline | jq '."@xmlUrl"' -r)
- dir=$(echo $outline | jq '."@text"' -r)
+${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
echo $dir
mkdir -p "$dir"/cur "$dir"/new "$dir"/tmp # make it maildir
echo "$url" > $dir/url
echo $dir