Commit 9ce3a07b authored by kroovy's avatar kroovy
Browse files

script that grabs the raw pad of the same day and put's it in the cloud

parent e0f5f099
#!/bin/bash
### TODO: add email to fr@finf.uni-hannover.de
#
# must be placed in "pter" folder
USERNAME=""
PASSWORD=""
SEMESTER="2016WS"
DATE=$(date +%Y%m%d)
if [ $# -eq 0 ]; then
echo "Usage:"
echo "./automation.sh { --upload | --preview }"
echo "./automation.sh { -u | -p }"
elif [ $1 = "-u" -o $1 = "--upload" ]; then
wget --quiet https://pad.finf.uni-hannover.de/p/protokoll$DATE/export/txt -O protokoll.$DATE.md
./makepdf.sh protokoll.$DATE.md
curl -X PUT -u $USERNAME:$PASSWORD "https://cloud.finf.uni-hannover.de/remote.php/webdav/Fachrat/Protokolle/Finf/$SEMESTER/protokoll.$DATE.pdf" --data-binary @"protokoll.$DATE.pdf"
elif [ $1 = "-p" -o $1 = "--preview" ]; then
wget --quiet https://pad.finf.uni-hannover.de/p/protokoll$DATE/export/txt -O protokoll.$DATE.md
./makepdf.sh protokoll.$DATE.md
google-chrome-stable protokoll.$DATE.pdf
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment