From e2d088b4a539feb888d4be1e4899d7e1d030fdc9 Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona Date: Fri, 17 Feb 2023 18:13:07 +0100 Subject: [PATCH] Add opml2feeds A little script to transform opml description (the standard for feeds) into a compatible list of maildirs --- opml2feeds | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 opml2feeds 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 -- 2.48.1