davical.sh
490 Bytes
#/bin/env bash
source config.sh
COOKIES=$(mktemp)
FILE=$(mktemp)
./parse.py $EDT -o $FILE
curl --data "username=$USERNAME&password=$PASSWORD" \
--cookie-jar $COOKIES \
$BASELINK/ > /dev/null
curl -v \
-F "collection_id=$CID" \
-F "ics_file=@$FILE;type=text/calendar" \
-F "mode=off" \
-F "_editor_action[editor_1]=update" \
-F "submit=true" \
--cookie $COOKIES \
"$BASELINK/admin.php?action=edit&t=collection&id=$CID" > /dev/null
rm $COOKIES $FILE