source: main/waeup.kofa/trunk/tools/download_exports.sh @ 14312

Last change on this file since 14312 was 9007, checked in by Henrik Bettermann, 12 years ago

Extend import file repair script.

Add shell script for downloading export files.

File size: 488 bytes
Line 
1#!/bin/sh
2
3## We expect at least three arguments...
4if [ $# -ne 3 ]; then
5    echo "Usage: $0 [user name] [password] [exporter]"
6    exit
7fi
8
9wget --save-cookies cookies.txt --keep-session-cookies --post-data "form.login=$1&form.password=$2" https://uniben-kofa.waeup.org/login
10wget --load-cookies cookies.txt  --output-document $3.csv https://uniben-kofa.waeup.org/datacenter/export.csv?exporter=$3
11tar -czf Kofa$3.tar.gz $3.csv
12rm $3.csv
13mv Kofa$3.tar.gz /home/ftp/uniben
Note: See TracBrowser for help on using the repository browser.