-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgethtmls.sh
100 lines (86 loc) · 3.02 KB
/
gethtmls.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
#doc1 = selim_docname.folia.xml and doc2 = sumercan_docname.folia.xml
doc1="$1"
doc2="$2"
BOTH=$(echo ${doc1} | sed 's/batch\/selim_/both_/')
cp $doc1 $BOTH
python3 iaafoliaxml.py -t entity -s https://github.com/OsmanMutlu/rawtext/raw/master/protes8-Event.foliaset.xml $doc1 $doc2
python3 iaafoliaxml.py -t entity -s https://github.com/OsmanMutlu/rawtext/raw/master/protes5-Participant.foliaset.xml $doc1 $doc2
python3 iaafoliaxml.py -t entity -s https://github.com/OsmanMutlu/rawtext/raw/master/protes4-Organizer.foliaset.xml $doc1 $doc2
python3 iaafoliaxml.py -t entity -s https://github.com/OsmanMutlu/rawtext/raw/master/protes1-Target.foliaset.xml $doc1 $doc2
BOTH_EVENT=$(echo ${doc1} | sed 's/batch\/selim_/both_Event_/')
BOTH_PART=$(echo ${doc1} | sed 's/batch\/selim_/both_Participant_/')
BOTH_ORG=$(echo ${doc1} | sed 's/batch\/selim_/both_Organizer_/')
BOTH_TARGET=$(echo ${doc1} | sed 's/batch\/selim_/both_Targeted_/')
rm $BOTH
mv $BOTH_EVENT xmls/$BOTH_EVENT
python3 foliatohtml.py xmls/$BOTH_EVENT
mv xmls/$BOTH_EVENT $BOTH_EVENT
if [ ! -f $BOTH_ORG ]
then
if [ ! -f $BOTH_TARGET ] && [ ! -f $BOTH_EVENT ] && [ ! -f $BOTH_PART ]
then
:
elif [ ! -f $BOTH_TARGET ] && [ ! -f $BOTH_PART ]
then
python3 cleanannot.py $BOTH_EVENT
elif [ ! -f $BOTH_TARGET ] && [ ! -f $BOTH_EVENT ]
then
python3 cleanannot.py $BOTH_PART
:
elif [ ! -f $BOTH_PART ] && [ ! -f $BOTH_EVENT ]
then
python3 cleanannot.py $BOTH_TARGET
:
elif [ ! -f $BOTH_TARGET ]
then
python3 foliamerge.py -a $BOTH_EVENT $BOTH_PART
elif [ ! -f $BOTH_PART ]
then
python3 foliamerge.py -a $BOTH_EVENT $BOTH_TARGET
elif [ ! -f $BOTH_EVENT ]
then
python3 foliamerge.py -a $BOTH_PART $BOTH_TARGET
else
python3 foliamerge.py -a $BOTH_EVENT $BOTH_PART $BOTH_TARGET
fi
elif [ ! -f $BOTH_TARGET ]
then
if [ ! -f $BOTH_EVENT ] && [ ! -f $BOTH_PART ]
then
python3 cleanannot.py $BOTH_ORG
elif [ ! -f $BOTH_PART ]
then
python3 foliamerge.py -a $BOTH_EVENT $BOTH_ORG
elif [ ! -f $BOTH_EVENT ]
then
python3 foliamerge.py -a $BOTH_PART $BOTH_ORG
else
python3 foliamerge.py -a $BOTH_EVENT $BOTH_PART $BOTH_ORG
fi
elif [ ! -f $BOTH_PART ]
then
if [ ! -f $BOTH_EVENT ]
then
python3 foliamerge.py -a $BOTH_ORG $BOTH_TARGET
else
python3 foliamerge.py -a $BOTH_EVENT $BOTH_ORG $BOTH_TARGET
fi
elif [ ! -f $BOTH_EVENT ]
then
python3 foliamerge.py -a $BOTH_PART $BOTH_ORG $BOTH_TARGET
else
python3 foliamerge.py -a $BOTH_EVENT $BOTH_PART $BOTH_ORG $BOTH_TARGET
fi
#cp /home/osman/work/iaa-folia/xmls/$BOTH_EVENT /home/osman/work/iaa-folia/xmls/$BOTH
mv $BOTH_EVENT xmls/$BOTH_EVENT
mv $BOTH_PART xmls/$BOTH_PART
mv $BOTH_ORG xmls/$BOTH_ORG
mv $BOTH_TARGET xmls/$BOTH_TARGET
python3 foliatohtml.py xmls/$BOTH_PART
python3 foliatohtml.py xmls/$BOTH_ORG
python3 foliatohtml.py xmls/$BOTH_TARGET
rm xmls/$BOTH_EVENT
rm xmls/$BOTH_PART
rm xmls/$BOTH_ORG
rm xmls/$BOTH_TARGET