Commit ce2fc9f8 authored by thorsten.vitt's avatar thorsten.vitt
Browse files

Switched HTML transformation to per-directory calabash.

Seems to be a working compromise between speed and OOMs.
parent 9cf0e634
#!/bin/sh
#!/bin/bash
. ./workflow.rc
calabash html.xpl path="file:$odir/final" output="file:$odir/html"
exit $?
########################################################
#. ./lib-nailgun.sh
rm -rf "$odir/html"
# rm -rf "$odir/html"
for subdir in $odir/final/*
do
# start_saxon_server -Xmx1024m 2114
# trap stop_nailgun 1 2 3 13 15
find -L $subdir -name '*.item.xml' \
| sed -e "s,^$odir/final/,," \
| while read f
do
intermediate=`mktemp --tmpdir enzXXXXX.html`
echo "Converting $f to html ..."
saxon -xsl:html/stylesheets/db2xhtml.xsl \
-s:$odir/final/$f \
-o:$intermediate
if saxon -s:$intermediate \
-xsl:html/frame.xsl \
-o:$odir/html/${f}.html
then
rm $intermediate
else
echo "Failed to put $f into the textgridrep frame, using raw html"
mkdir -p `dirname "$odir/html/${f}.html"`
mv $intermediate $odir/html/${f}.html
fi
done
# stop_nailgun
# trap - 1 2 3 13 15
target=$odir/html/$(basename "$subdir")
echo "HTML transformation for $subdir ..."
calabash -p verbose=false html.xpl path="file:$subdir" output="file:$target"
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment