INX extension descriptor format

From Inkscape Wiki
Revision as of 13:16, 17 November 2006 by Acspike (talk | contribs)
Jump to navigation Jump to search


In order for Inkscape to make use of an external script or program, you must describe that script to inkscape using an INX file. See the inkscape share directory for examples. The INX file allows the author to:

  • label strings for translation
  • define parameters
  • chain extensions
  • etc

Be sure to read through the INX files that come with Inkscape. Nothing beats a working example.

Localisation of extensions

To allow localisation of strings in extension for Inkscape, some xml tags have to be adapted to variant readable by intltool. It means that tags or parametres has to have "_" prepended to their name, e.g. <_name>name of extension</_name>

Also the path to the extension has to be included in file to tell intltool where to look for translatable content.

Usefull information, before this section gets fully updated, can be found at Ted's blog.


More example INX files are available in the Inkscape distribution or in the Inkscape repository.

   <_name>{Friendly Extension Name}</_name>
     <dependency type="executable"
     <param name="{argumentName}" type="[int|float|string]"
            min="{number}" max="{number}"
            _gui-text="{Friendly Argument Name}">{default value}</param>
     <object-type>[all|{element type}]</object-type>
         <submenu _name="{Extension Group Name}"/>
     <command reldir="extensions"
              interpreter="[python|perl|bash|{some other}]">program.ext</command>


<!ELEMENT inkscape-extension (name, id, dependency*, param*,(input|output|effect),(script|plugin))>
<!ELEMENT input (extension, mimetype, filetype, filetypetooltip, output_extension?)>
<!ELEMENT output (extension, mimetype, filetype, filetypetooltip, dataloss?)>
<!ELEMENT effect (object-type)>
<!ELEMENT script (command, helper_extension*, check*)>
<!ELEMENT plugin (name)>
<!ELEMENT dependency (#PCDATA)>
<!ELEMENT param (#PCDATA)>
<!ELEMENT extension (#PCDATA)>
<!ELEMENT mimetype (#PCDATA)>
<!ELEMENT filetype (#PCDATA)>
<!ELEMENT filetooltip (#PCDATA)>
<!ELEMENT object-type (#PCDATA)>
<!ELEMENT command (#PCDATA)>
<!ELEMENT check (#PCDATA)>
<!ELEMENT dataloss (#PCDATA)>
<!ELEMENT helper_extension (#PCDATA)>
<!ELEMENT output_extension (#PCDATA)>

<!ATTLIST check reldir (absolute|path|extensions|plugins) #REQUIRED>
<!ATTLIST command reldir (absolute|path|extensions|plugins) #REQUIRED>
<!ATTLIST dependency type (executable|extension) #REQUIRED>
<!ATTLIST dependency location (absolute|path|extensions|plugins) #IMPLIED>
<!ATTLIST dependency description CDATA #IMPLIED>
<!ATTLIST param type (float|int) #REQUIRED>

See Also