#!/bin/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 ${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