Re: [Inkscape-user] [Inkscape-devel] how to write Inkscape extensions - guide needed
Thanks Shlomi Fish and Alex Valavanis!
Alex: Tutorial on the wiki? I didn't know there was any such. Where is it? Maybe it's what I've been looking for.
Are you suggesting I could use the Extension Subsystem section by itself, as a guide? I don't think I have the proper software to extract that section (copy it) and make it into a stand-alone PDF. Maybe would be simpler to delete everything else, but I don't think I have the tools. (I only have Adobe Reader)
I'm also not sure if a multi-page PDF can be uploaded to InkSpace..... But I'll test it.
Shlomi Fish:
When you say:
"4. My code demonstrates how to call one extensions from within another by piping it through a python command"
does that mean there is more than 1 way to make an extension?
Thanks again :-) brynn
-------------------------------------------------- From: "Alex Valavanis" <valavanisalex@...155...> Sent: Monday, January 05, 2015 10:19 AM To: "Shlomi Fish" <shlomif@...3008...> Cc: "Brynn" <brynn@...3089...>; "Inkscape-Devel" Inkscape-devel@lists.sourceforge.net; "Inkscape User Community" inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-devel] how to write Inkscape extensions - guide needed
I gave a presentation to my local Python Users group a while back... the first half is just a general intro to the project, and the second half of it is mostly based on the extensions subsystem. It's mostly based on the tutorial on the Wiki, but it might give you a few extra hints.
Disclaimer: I haven't written any of my own extensions; treat everything in the presentation with caution!
Best wishes,
AV
On 5 January 2015 at 13:05, Shlomi Fish <shlomif@...3008...> wrote:
Hi Brynn and all,
On Mon, 5 Jan 2015 04:36:16 -0700 "Brynn" <brynn@...3089...> wrote:
Hi Friends, I think I asked this before, but it was mixed up with another subject. And there seems to be a bit of a lull in the action, on the dev mailing list. So I thought it would be a good time to try again, when this is the only subject. In forums, probably 3 to 5 times in a year, people post a message asking either how to write an extension for Inkscape, or about some technical aspect of writing an extension. Or another version is - how to get an extension they wrote to be packed with Inkscape. Unfortunately, most of us don't have a clue about any of it, and there is no place to refer them. Now I'm working on fleshing out the Contribute page of the website, and it would be really nice to be able to provide a link to some kind of guide, or instructions, or article on the subject. It doesn't necessarily need to be a newbie's guide; so it wouldn't be teaching someone like me to write an extension. It would be addressed towards people who already have the needed skills and experience. So if anyone is interested, it would really be a great benefit to the Inkscape community, to have some information, in any kind of format, on how to write an Inkscape extension. It could be placed on the Inkscape wiki, or maybe even in your InkSpace (the gallery on the website) in Tutorials category. Thanks in advance, and thanks for listening. If anyone is interested, just let me know where to find it, when finished, and a link will be included on the Contribute page. :-)
I've originally wrote this Inkscape extension back in 2013 - https://github.com/shlomif/Shlomi-Fish-Back-to-my-Homepage-Logo . Since then my knowledge of writing extensions has become rusty.
Now what I know is:
- The extension accepts arguments on the command line including --id=...
and finally, the input SVG.
It emits the final SVG file to the STDOUT.
There is some support code written for manipulating SVG files written
in Python that is shipped in the Inkscape distribution and used by the Inkscape extensions.
- My code demonstrates how to call one extensions from within another by
piping it through a python command.
Hope it helps.
Regards,
Shlomi Fish
--
Shlomi Fish http://www.shlomifish.org/ Rethinking CPAN - http://shlom.in/rethinking-cpan
<rindolf> She's a hot chick. <rindolf> But she smokes. <go|dfish> She can smoke as long as she's smokin'. — http://www.shlomifish.org/humour/fortunes/show.cgi?id=she-can-smoke
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Mon, 5 Jan 2015 13:46:46 -0700 "Brynn" <brynn@...3089...> wrote:
Thanks Shlomi Fish and Alex Valavanis!
Shlomi Fish:
When you say:
"4. My code demonstrates how to call one extensions from within another by piping it through a python command"
does that mean there is more than 1 way to make an extension?
Not sure what you mean what you mean by that. What I demonstrate how an extension can call one or more different extensions to process the SVG markup that it generated so far into newer SVG markup so one can automate the process.
Regards,
Shlomi Fish
On Wed, Jan 07, 2015 at 04:46:37PM +0200, Shlomi Fish wrote:
On Mon, 5 Jan 2015 13:46:46 -0700 "Brynn" <brynn@...3089...> wrote:
Thanks Shlomi Fish and Alex Valavanis!
Shlomi Fish:
When you say:
"4. My code demonstrates how to call one extensions from within another by piping it through a python command"
does that mean there is more than 1 way to make an extension?
Not sure what you mean what you mean by that. What I demonstrate how an extension can call one or more different extensions to process the SVG markup that it generated so far into newer SVG markup so one can automate the process.
I can't parse that last sentence -- the one starting with "What I demonstrate". It seems locally coherent, but not globally. Presumably there's a typo or a misinterpretation orsomething that sends the languge processing centre of my brain astray.
... Ah. Did you maybe mean "What I demonstrate is how ..."? -- hendrik
On Wed, 7 Jan 2015 12:41:48 -0500 Hendrik Boom <hendrik@...2611...> wrote:
On Wed, Jan 07, 2015 at 04:46:37PM +0200, Shlomi Fish wrote:
On Mon, 5 Jan 2015 13:46:46 -0700 "Brynn" <brynn@...3089...> wrote:
Thanks Shlomi Fish and Alex Valavanis!
Shlomi Fish:
When you say:
"4. My code demonstrates how to call one extensions from within another by piping it through a python command"
does that mean there is more than 1 way to make an extension?
Not sure what you mean what you mean by that. What I demonstrate how an extension can call one or more different extensions to process the SVG markup that it generated so far into newer SVG markup so one can automate the process.
I can't parse that last sentence -- the one starting with "What I demonstrate". It seems locally coherent, but not globally. Presumably there's a typo or a misinterpretation orsomething that sends the languge processing centre of my brain astray.
What I meant is:
What I demonstrate is how an extension can call one or more different extensions to process the SVG markup that it generated so far into a modified SVG markup so one can automate the process of calling several extensions one after the other.
Regards,
Shlomi Fish
... Ah. Did you maybe mean "What I demonstrate is how ..."? -- hendrik
Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
participants (3)
-
Brynn
-
Hendrik Boom
-
Shlomi Fish