|
78
|
1 #!/bin/sh
|
|
|
2 if [ "$1" = "-b" ]
|
|
|
3 then
|
|
|
4 shift
|
|
|
5 bi=1
|
|
|
6 tb="Bilingual c"
|
|
|
7 ff=bilingual/FP_ii.html
|
|
|
8 pat='x:div[@class="bilingual"][.//x:p[.~"'$1'"]]'
|
|
|
9 else
|
|
|
10 bi=0
|
|
|
11 tb="C"
|
|
|
12 ff=latin/sth????.html
|
|
|
13 pat='x:p[.~"'$1'"]'
|
|
|
14 fi
|
|
121
|
15 egrep -l "\b$1" /home/ht/Documents/Aquinas/summa/$ff | tr '\012' '\000' | \
|
|
78
|
16 xargs -0 lxgrep -xmlns:x="http://www.w3.org/1999/xhtml" -w x:div $pat | \
|
|
|
17 sed "s/\(\b$1\w*\)/<b>\1<\/b>/;
|
|
|
18 s/<x:/</g; s/<\/x:/<\//g;
|
|
|
19 s/xmlns:x/xmlns/;
|
|
|
20 1i \
|
|
|
21 <html xmlns='http://www.w3.org/1999/xhtml'>\
|
|
|
22 <head>\
|
|
|
23 <title>${tb}oncordance for $1</title>\
|
|
|
24 <style>\
|
|
|
25 h2, h3, h4 {margin-bottom: 0px; clear: both}\
|
|
|
26 .bilingual {clear: both; margin-top: .5em}\
|
|
|
27 div.eng {width: 45%; float: left}\
|
|
|
28 div.lat {width: 45%; float: right}\
|
|
|
29 </style>\
|
|
|
30 </head>\
|
|
|
31 <body>\
|
|
|
32 "
|
|
|
33 echo "</body></html>"
|
|
|
34
|