Newer
Older
xmpp-bot / python / report.sh
@lagfra lagfra 11 days ago 469 bytes refactor
#!/bin/bash

function print_usage() {
    echo "Usage: ./report.sh <filename> <nexp> <lang> <optional: time period>"
}

if [[ "$#" -lt 3 ]]; then
    print_usage
    exit 1
fi

DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

source ${DIR}/bin/activate

if [[ "$#" -eq 3 ]]; then 
    python3 ${DIR}/report.py -f $1 -n $2 -l $3
elif [[ "$#" -eq 4 ]]; then
    python3 ${DIR}/report.py -f $1 -n $2 -l $3 -t $4
else
    print_usage
    exit 1
fi