how to write Inkscape extensions

Discussion about writing code for Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

how to write Inkscape extensions

Postby brynn » Fri Jan 09, 2015 9:24 pm

Hi Friends,
I finally have some info that I've wished I could provide, for a long time, for those times when someone posts on this forum, asking how to write Inskcape extensions, or asking something specific about writing one. And it turns out, it's been around all this time, and I never knew where or how to find it.


If you are trying to write an extension, and you get stuck, you could try posting on this board. But if no one seems to know the answer, the developer mailing list will be able to help. Archives are here, so you can try searching, before having to subscribe: https://sourceforge.net/p/inkscape/mail ... cape-devel (although, I realize it's not in the best format for searching "cold") But if you do have to subscribe,info here: https://inkscape.org/en/community/mailing-lists/.

All best :D
Last edited by brynn on Sat Jan 10, 2015 6:03 pm, edited 1 time in total.
Reason: fixed link

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: how to write Inkscape extensions

Postby ragstian » Sat Jan 10, 2015 3:30 am

Hi Brynn.

Nice post.

My problems writing extensions is that I forget most of the "stuff" between sessions - which can be months apart - and have to "start over".
Another hurdle for me is that most examples are using OOP - object orientated programming - principles which is "heavy" for me!

Nice then to be able to find the info in one place.
BTW - the last link in your post is "broken".
Last edited by ragstian on Sat Feb 28, 2015 3:06 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: how to write Inkscape extensions

Postby brynn » Sat Jan 10, 2015 6:15 pm

Sorry about the link. Thanks for letting me know. It's fixed now.

Well, the only reason I found that info in the first place, is because I asked on the dev mailing list if someone could write a guide. That was the best answer I got. I do wish someone would write an all-in-one-place guide. I think the problem with doing that, is that it's kind of a wide-open subject....meaning that I think there are a number of approaches to writing an extension. And people who know enough to be able to write one, are much too busy, probably with working on other parts of Inkscape!

User avatar
samueldellicour
Posts: 26
Joined: Mon Jul 01, 2013 11:03 pm
Location: Belgium
Contact:

Re: how to write Inkscape extensions

Postby samueldellicour » Sat Feb 21, 2015 5:50 am

There is the Extensions category page in the wiki, with links to useful pages, some of which you have mentioned, some not.

For helping making the UI (user interface with options), there is also this ready to use Inkscape template/boilerplate as a starting point.

And there is this page from Sugar Pill Studios: Inkscape Extensions in Any Language.

For french speaking people, there is this pdf guide for drawing basic shapes and writing text through an extension: Comment installer et programmer des scripts Python dans Inkscape ? (where inkex.unittouu should probably be updated with self.unittouu for Inkscape 0.91)

Another advice that I often hear is to check out the existing Inkscape extensions, to see how they do it.
Samuel


Return to “Programming”