Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80502120
convert.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Sep 1, 02:15
Size
1 KB
Mime Type
text/x-shellscript
Expires
Tue, Sep 3, 02:15 (2 d)
Engine
blob
Format
Raw Data
Handle
20383667
Attached To
rNIETZSCHEPYTHON nietzsche-python
convert.sh
View Options
#!/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
Log In to Comment