Page MenuHomec4science

convert.sh
No OneTemporary

File Metadata

Created
Sun, Sep 1, 02:15

convert.sh

#!/bin/bash
#start:special option edit {{{1
##--edit: special option edit
if [[ `echo $@ | grep '[-][-]edit'` != "" ]];then
vi -s ~/bin/bin.vim $0
exit $?
fi
##--log: special option log
if [[ `echo $@ | grep '[-][-]log'` != "" ]];then
if [[ -e ${0/sh/log} ]];then
tail ${0/sh/log}
else
echo "File ${0/sh/log} is empty!"
fi
exit 0
fi
#end:special option edit 1}}}
logFile=${0/sh/log}
options=""
##--include-only
if [[ `echo $@ | grep '[-][-]include[-]only'` != "" ]];then
options="-I"
fi
function printLog () { #{{{1
echo "$(date) % $@" >> $logFile
} #1}}}
function usage () { #{{{1
echo "Usage: `basename $0` " #TODO:please edit
grep '^##[-]' $0
exit $1
}
##--help,-h: show help
if [[ `echo $@ | grep '\(^[-]h$\|[-][-]help\)'` != "" ]];then
usage 0
fi
#1}}}
if [[ -e xml/project.xml ]];then
rm *_DATA.ttl 2>/dev/null
python3 py2ttl/convert.py -c $options xml/project.xml
if [[ $? -eq 0 && $(ls *_DATA.ttl | wc -l) -gt 0 ]];then
if [[ -z "$options" ]];then
runEye.sh ~/githubs/nietzscheOntologie/machineReasoning_extendUnityWithHomotypicPart/ --ontology=tln-ontology_autogenerated.ttl . ~/ownCloud/Der_spaete_Nietzsche/DATA/
else
runEye.sh ~/githubs/nietzscheOntologie/machineReasoning_extendUnityWithHomotypicPart/ --ontology=tln-ontology_autogenerated.ttl . include-ttl/ --dontRunJoinedRules
fi
fi
else
echo "ERROR file \"xml/project.xml\" does not exist!"
fi

Event Timeline