convert.sh
563 Bytes
#!/bin/sh
IN="/Volumes/michal.rudolf/KDP/ODT/do wrzucenia/"
OUT=~/Programowanie/clarin/odt2tei/odt/
if [ -d /Volumes/michal.rudolf ]; then
echo "Syncing ODT..."
rsync -av --delete "$IN" "$OUT"
fi
usage() {
python odt2tei -h
exit
}
# Read options
OPTIONS=""
while getopts ":fsv" arg; do
case "${arg}" in
f) OPTIONS="$OPTIONS -f" ;;
s) OPTIONS="$OPTIONS -s" ;;
v) OPTIONS="$OPTIONS -v" ;;
?) echo "Incorrect option ${arg}"; usage ;;
esac
done
shift $((OPTIND -1))
if [ "$1" ]; then
rm -rf output/tei
python odt2tei.py $OPTIONS -o output $@
fi