#!/usr/bin/sh


# This script can be used to automatically add 
# subscriptions to Liferea. Just supply a valid
# and correctly escaped feed URL as parameter.

if [ $# -ne 1 ]; then
	echo "Wrong parameter count!"
	echo ""
	echo "Syntax: $0 <feed URL>"
	echo ""
	exit 1
fi

NEWURL=`echo "$1" | sed 's/feed\:https/https/'`

/usr/bin/liferea --add-feed "$NEWURL"
