XSLTools

Changeset

341:837527dca4f6
2005-10-24 paulb raw files shortlog changelog graph [project @ 2005-10-24 21:35:13 by paulb] Added scripts for the preparation of Qt Designer output stylesheets and Web templates.
scripts/xslform_qt_prepare.py (file) scripts/xslform_qt_template.py (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/xslform_qt_prepare.py	Mon Oct 24 21:35:13 2005 +0000
     1.3 @@ -0,0 +1,20 @@
     1.4 +#!/usr/bin/env python
     1.5 +
     1.6 +"Prepare a templating stylesheet from a Qt Designer file."
     1.7 +
     1.8 +import XSLForms.Prepare
     1.9 +import sys
    1.10 +
    1.11 +if __name__ == "__main__":
    1.12 +    try:
    1.13 +        input_xml = sys.argv[1]
    1.14 +        output_xml = sys.argv[2]
    1.15 +    except IndexError:
    1.16 +        print "Please specify a template and an output filename."
    1.17 +        print "For example:"
    1.18 +        print "xslform_qt_prepare.py template.ui output.xsl"
    1.19 +        sys.exit(1)
    1.20 +
    1.21 +    XSLForms.Prepare.make_qt_stylesheet(input_xml, output_xml)
    1.22 +
    1.23 +# vim: tabstop=4 expandtab shiftwidth=4
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/scripts/xslform_qt_template.py	Mon Oct 24 21:35:13 2005 +0000
     2.3 @@ -0,0 +1,20 @@
     2.4 +#!/usr/bin/env python
     2.5 +
     2.6 +"Prepare a template from a Qt Designer file."
     2.7 +
     2.8 +import XSLForms.Prepare
     2.9 +import sys
    2.10 +
    2.11 +if __name__ == "__main__":
    2.12 +    try:
    2.13 +        input_xml = sys.argv[1]
    2.14 +        output_xml = sys.argv[2]
    2.15 +    except IndexError:
    2.16 +        print "Please specify a template and an output filename."
    2.17 +        print "For example:"
    2.18 +        print "xslform_qt_template.py template.ui output.xhtml"
    2.19 +        sys.exit(1)
    2.20 +
    2.21 +    XSLForms.Prepare.make_qt_template(input_xml, output_xml)
    2.22 +
    2.23 +# vim: tabstop=4 expandtab shiftwidth=4