wiki:HarriotWorkflow

Version 1 (modified by Klaus Thoden, 12 years ago) (diff)

--

The scholars of the Harriot online project are working with an enhanced version of the ECHO XML schema which allows them to insert commentary and editorial remarks. These markings have in a second step to be converted to the regular ECHO schema. Also, the LaTeX shorthand for math has to be transformed. This whole process is handled mainly by three scripts

A shell function is quite convenient for dealing with all the scripts in a row (adjust paths to your needs):

harriot() {
        # echo comment
           if [[ -r $(echo "$*" | sed s/.xml/-adjusted.xml/ ) ]]; then
            echo Removing previous conversion file
            rm -v $(echo "$*" | sed s/.xml/-adjusted.xml/ )
           fi
           echo Correcting urls in "$*"
           python cleanURL.py $* &&
           echo Checking for wellformed XML
           xmllint --noout 01_cleanedURL.xml &&
           echo Then math out put &&
           /opt/local/bin/python2.7 /Users/kthoden/eclipse/projects/digitizing-tools/scripts/mathml/mathml-wrapper.py --outputTextFile=02_mathConverted.xml --console=/tmp/console.txt 01_cleanedURL.xml &&
           echo Replacing things in "$*"
           java -jar /Users/kthoden/XML-ECHO-SVN/trunk/schema/thirdparty/saxonhe9-2-1-1j/saxon9he.jar -xsl:adjustHarriot.xsl -s:02_mathConverted.xml -o:$(echo $*| sed s/.xml/-adjusted.xml/g) &&
           echo Removing temporary files    
           rm -v 01_cleanedURL.xml 02_mathConverted.xml &&
           echo Is it valid?
           java -jar /Users/kthoden/XML-ECHO-SVN/trunk/schema/thirdparty/jing-20091111/bin/jing.jar -c /Users/kthoden/XML-ECHO-SVN/trunk/schema/schema/echo/echo.rnc $(echo $*| sed s/.xml/-adjusted.xml/g)
           echo Finished
}

The resulting files carry an -adjusted-infix and will then have to be moved and renamed to trunk/texts/eXist/echo/en (for the time being) to then ingested into the ECHO system.

Attachments (3)

Download all attachments as: .zip