Blame view

davical.sh 490 Bytes
c7b78710   Geoffrey PREUD'HOMME   Possibilité d'env...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  #/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