XternalApps/myTool.xforms

46 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<XternalApps:tool xmlns:my="http://github.com/jsmaniac/XternalApps/myTool" xmlns:XternalApps="http://github.com/jsmaniac/XternalApps/v1" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<XternalApps:name>Fractalize</XternalApps:name>
<XternalApps:tooltip></XternalApps:tooltip>
<XternalApps:icon>MyTool.svg</XternalApps:icon>
<XternalApps:extended-description>
</XternalApps:extended-description>
<!-- Internal model and default values follow: -->
<xforms:model>
<xforms:instance>
<my:tool>
<my:svgfile filename="" />
<my:subdivs>6</my:subdivs>
<my:smooth>4.0</my:smooth>
</my:tool>
</xforms:instance>
<!-- to get a filename on the command-line, use:
<xforms:bind ref="my:svgfile" type="xsd:anyURI" required="true()"/>
-->
<!-- use XternalApps:pipe to have the file piped directly into the command being run -->
<xforms:bind ref="my:svgfile" type="mime:image/svg+xml" required="true()"/>
<xforms:bind ref="my:subdivs" type="xsd:integer" required="true()"/>
<xforms:bind ref="my:smooth" type="xsd:decimal" required="true()"/>
<!--<xforms:submission action="myTool.py" method="exec-double-dash" />-->
</xforms:model>
<XternalApps:command method="exec" name="/home/suzanne/perso/projects/paper-craft/py/Mod/XternalApps/run-inkscape-plugin.py">
<XternalApps:constant direction="input" value="fractalize.py" style="value" />
<XternalApps:default direction="input" style="double-dash" />
<XternalApps:exception direction="input" ref="my:svgfile" style="value" />
<XternalApps:exception direction="output" ref="my:output-svgfile" style="pipe" />
<XternalApps:exception direction="output" ref="my:output-exitcode" style="exitcode" />
</XternalApps:command>
<!-- Description of the user interface follows: -->
<xforms:group>
<xforms:label>Fractalize</xforms:label>
<xforms:input ref="my:subdivs" label="Subdivisions"/>
<xforms:input ref="my:smooth" label="Smoothness"/>
<xforms:upload ref="my:svgfile" accept="image/svg+xml" XternalApps:relevance="primary">
<xforms:label>Input path</xforms:label>
<xforms:filename ref="@filename" />
</xforms:upload>
</xforms:group>
</XternalApps:tool>