-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·45 lines (31 loc) · 992 Bytes
/
build.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
#!/bin/bash
if [ `which xmlstarlet` -a `which xml2rfc` -a `which svgcheck` ]
then
for f in svg/*.svg
do
cp $f $f.orig
rm prep/$f
# xmlstarlet ed -d "//svg:g/@inkscape:label" | xmlstarlet ed -d "//svg:g/@inkscape:groupmode" | \
# xmlstarlet ed -d "//svg:rect/@style" | \
# xmlstarlet ed -d "//svg:path/@style" | \
# xmlstarlet ed -d "//svg:text/@style" | \
# xmlstarlet ed -d "//svg:text/svg:tspan" | \
svgcheck -a -r $f | \
xmlstarlet ed -d "//sodipodi:namedview" | xmlstarlet ed -d "//svg:metadata" | \
xmlstarlet ed -d "//@inkscape:version" | xmlstarlet ed -d "//@sodipodi:docname" | \
xmlstarlet ed -d "//svg:text/@stroke" \
> prep/$f
# rm $f.1
done
D=draft-przygienda-rift-dragonfly++
# xml2rfc $D.xml
echo -- df++
echo -- to text
xml2rfc $D.xml
echo -- to pdf
xml2rfc --pdf $D.xml
xml2rfc --expand $D.xml
nl -ba $D.txt > $D.nl.txt
exit
fi
echo install xml2rfc/xmlstarlet/svgcheck to run ...