omsai / journals

Metamorph 7 journals
support.meta.moleculardevices.com
1 stars 1 forks source link

parse .jnl files and generate readable code #2

Open omsai opened 12 years ago

omsai commented 12 years ago

The XML in the .JNL files needs to be made suitable for online viewing. This XSLT code adds auto-indentation, but further work can be done to make it more human readable with a script generating such files.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">
        <xsl:output indent="yes"/>
        <xsl:template match="@* | node()">
                <xsl:copy>
                        <xsl:apply-templates select="@* | node()"/>
                </xsl:copy>
        </xsl:template>
</xsl:stylesheet>
omsai commented 12 years ago

Mostly implemented in doc_jnl.py

Minor remaining issue are:

  1. IfThenElseEntry does not indent correctly and adds extra commas
  2. Sometimes the comment header tag is ignored and documentation gets appended to the README file instead of overwriting existing documentation
omsai commented 11 years ago

There rules for parsing various journal XML entries are arbitrary. Since #10 will be addressed sooner than later, it would be better to instead use screenshots in the documentation. One would need to set capture specifications to ensure the screenshots are legible. Leaving this issue open till such a document is made.