Difference between revisions of "Script extensions"

From Inkscape Wiki
Jump to navigation Jump to search
(Getting started.)
 
Line 1: Line 1:
 
 
=== Introduction ===
 
=== Introduction ===
  
Line 8: Line 7:
 
Basically there are three functions that added with a script:
 
Basically there are three functions that added with a script:
  
- Input, providing translation from a file format to SVG
+
* Input, providing translation from a file format to SVG
- Output, providing translation from SVG to a format
+
* Output, providing translation from SVG to a format
- Filter, taking in SVG, changing it, and then outputing SVG
+
* Filter, taking in SVG, changing it, and then outputing SVG
  
 
While all of these are very similar in the scripting interface, there are slight differences between them.
 
While all of these are very similar in the scripting interface, there are slight differences between them.

Revision as of 04:01, 7 February 2004

Introduction

Inkscape provides the ability for it's functionality to be extended using traditional unix scripts. By this, we mean a program that takes in a stream of data through standard in, and then outputs that data on standard out. This is a very easy way to expand Inkscape, and provide custom functionality, without learning the internals of Inkscape. Plus, there are SVG read and writing libraries out there for almost any language, and the rest of them all have XML support (which is really what you probably want to use anyway). This HOWTO discusses the ends and outs of writing one of these scripts and getting it to work with the Inkscape core functionality.

Types of scripts

Basically there are three functions that added with a script:

  • Input, providing translation from a file format to SVG
  • Output, providing translation from SVG to a format
  • Filter, taking in SVG, changing it, and then outputing SVG

While all of these are very similar in the scripting interface, there are slight differences between them.