From: Matthieu Rakotojaona Date: Fri, 17 Feb 2023 17:13:07 +0000 (+0100) Subject: Add opml2feeds X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e2d088b4a539feb888d4be1e4899d7e1d030fdc9;hp=577d47665d9ba1d4ae6e3247a4fd370863007f47;p=feeder.git Add opml2feeds A little script to transform opml description (the standard for feeds) into a compatible list of maildirs --- diff --git a/opml2feeds b/opml2feeds new file mode 100755 index 0000000..6cb6989 --- /dev/null +++ b/opml2feeds @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +# Takes an opml file as first argument and creates a feeder-enabled maildir for each feed +# 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 +done