Re: [Inkscape-devel] Python extension extend to all Inkscape function and width height of any element
Although I'm currently working on an updated API which should make it easier to discover the functionality. Come talk to me over at https://gitlab.com/inkscape/extensions/
Oh my, that sure is an interesting repo! Just from a cursory look, I can see that there's a lot in there that I've had to implement on my own in Ink/Stitch, and a lot of other really awesome stuff. How stable an production-ready would you say that code is?
I ask because I'm in a great position with Ink/Stitch: I don't actually have to wait until this ships with inkscape to start using it in my extension. We're using pyinstaller, so we could easily just bring this repo with us in our packaged installation archives. If you tell me it's even somewhat stable, I might just switch over to it now.
On April 17, 2018 8:05:26 AM inkscape-devel-request@lists.sourceforge.net wrote:
Send Inkscape-devel mailing list submissions to inkscape-devel@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/inkscape-devel or, via email, send a message with subject or body 'help' to inkscape-devel-request@lists.sourceforge.net
You can reach the person managing the list at inkscape-devel-owner@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific than "Re: Contents of Inkscape-devel digest..."
Today's Topics:
- Python extension extend to all Inkscape function and width height of any element. (Lrn Lf)
- Re: Spreadshirt absurdity (Mihaela)
- Re: Python extension extend to all Inkscape function and width height of any element. (Martin Owens)
- Re: Spreadshirt absurdity (C R)
[Inkscape-devel] Python extension extend to all Inkscape function and width height of any element. From: Lrn Lf <lv2lrn4lf@...400...> Date: Apr 16, 1:18 PM To: inkscape-devel@lists.sourceforge.net
Is there away to access Inkscape other function through Python to run Inkscape basic operation of really any operation you can run by hand through the gui. And do anyone know how to get the bounding box width and height of a g svg element or any element that don't have that information set as a attribute. The only solution I can fantom is iterating through the group to find the biggest element of them all but even that can be tricky.
Re: [Inkscape-devel] Spreadshirt absurdity From: Mihaela <mihaela.jurkovic@...400...> Date: Apr 16, 1:27 PM To: Martin Owens <doctormo@...400...>, C R <cajhne@...400...> CC: inkscape-devel inkscape-devel@lists.sourceforge.net
Spreadshirt published the changes, here's the notification:
https://www.spreadshirt.com/blog/2018/04/03/your-brand-new-detail-page-has-a...
There's a way to hide the color selector with CSS. I haven't tried it yet.
Mihaela
On 14.04.2018 21:42, Martin Owens wrote:
On Sat, 2018-04-14 at 17:26 +0000, C R wrote:
Regarding the website hack, yes I can do that. There are a few options:
Option 1: we can import it with the snippet provided by spreadshirt: https://freedom.support.tm/hc/en-us/articles/115001381253-Spreadshirt -How-do-I-embed-my-Spreadshirt-shop-into-my-own-website-
Then I can write more javascript code to hide unwelcome products.
Option 2: I (or we) can set up a page on the Inkscape website on which we list specific products manually, which then link through to spreadshirt items (which bypasses the need for the spreadshirt auto generated gallery).
Perhaps a combination of the above would be okay too. We make a featured item page with direct links, and a link at the bottom to "view all designs". That link would provide access to the full spreadshirt shop, while allowing us to control what visitors see first.
You could make a shop app in inkscape-web which provided an administrator the ability to add available products from the feed API. I expect most of it would be javascript, but python could help make you a more concrete shop.
Martin,
Re: [Inkscape-devel] Python extension extend to all Inkscape function and width height of any element. From: Martin Owens <doctormo@...400...> Date: Apr 16, 1:59 PM To: Lrn Lf <lv2lrn4lf@...400...>, inkscape-devel@lists.sourceforge.net
On Mon, 2018-04-16 at 13:18 -0400, Lrn Lf wrote:
Is there away to access Inkscape other function through Python to run Inkscape basic operation of really any operation you can run by hand through the gui. And do anyone know how to get the bounding box width and height of a g svg element or any element that don't have that information set as a attribute. The only solution I can fantom is iterating through the group to find the biggest element of them all but even that can be tricky.
Hi Lrn,
There's functions for finding the bounding box which does the right thing in python.
Although I'm currently working on an updated API which should make it easier to discover the functionality. Come talk to me over at https://g itlab.com/inkscape/extensions/
As for calling Inkscape from the python extension, some extensions already do this, but I wouldn't recommend it.
Best Regards, Martin Owens
Re: [Inkscape-devel] Spreadshirt absurdity From: C R <cajhne@...400...> Date: Apr 16, 4:38 PM To: Mihaela <mihaela.jurkovic@...400...> CC: Martin Owens <doctormo@...400...>, inkscape-devel inkscape-devel@lists.sourceforge.net
Unfortunately, this doesn't solve any of our problems. This only affects the details page, and our main problem is Spreadshirt showing an item listing for every item in the category. I'm happy enough to let people choose a colour shirt after they click on an item, as this extra doesn't force the user to wade through every possible colour option in the store view.
-C
On Mon, Apr 16, 2018 at 6:27 PM, Mihaela <mihaela.jurkovic@...400...> wrote:
Spreadshirt published the changes, here's the notification:
https://www.spreadshirt.com/blog/2018/04/03/your-brand-new-detail-page-has-a...
There's a way to hide the color selector with CSS. I haven't tried it yet.
Mihaela
On 14.04.2018 21:42, Martin Owens wrote:
On Sat, 2018-04-14 at 17:26 +0000, C R wrote:
Regarding the website hack, yes I can do that. There are a few options:
Option 1: we can import it with the snippet provided by spreadshirt: https://freedom.support.tm/hc/en-us/articles/115001381253-Spreadshirt -How-do-I-embed-my-Spreadshirt-shop-into-my-own-website-
Then I can write more javascript code to hide unwelcome products.
Option 2: I (or we) can set up a page on the Inkscape website on which we list specific products manually, which then link through to spreadshirt items (which bypasses the need for the spreadshirt auto generated gallery).
Perhaps a combination of the above would be okay too. We make a featured item page with direct links, and a link at the bottom to "view all designs". That link would provide access to the full spreadshirt shop, while allowing us to control what visitors see first.
You could make a shop app in inkscape-web which provided an administrator the ability to add available products from the feed API. I expect most of it would be javascript, but python could help make you a more concrete shop.
Martin,
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Tue, 2018-04-17 at 18:09 +0000, Lex Neva wrote:
Although I'm currently working on an updated API which should make
it easier to discover the functionality. Come talk to me over at http s://gitlab.com/inkscape/extensions/
Oh my, that sure is an interesting repo! Just from a cursory look, I can see that there's a lot in there that I've had to implement on my own in Ink/Stitch, and a lot of other really awesome stuff. How stable an production-ready would you say that code is?
I ask because I'm in a great position with Ink/Stitch: I don't actually have to wait until this ships with inkscape to start using it in my extension. We're using pyinstaller, so we could easily just bring this repo with us in our packaged installation archives. If you tell me it's even somewhat stable, I might just switch over to it now.
That's very interesting news. I'm trying to get a handle on how feasible it would be to manage our extensions using setup.py and a target directory pip. But that installation method is a work in progress.
As for the API. The old API from inkscape 0.x is stable, but it's also a bit crusty and untested. I intend to support it using deprecation warnings as much as possible in the 1.0 spec, a lot of the changes are cleanups, upgrades and trying to collect code together into python classes.
I'd say I'm probably about 50% through the 1.0 cleanup right now. If you have time to review, now is a great time to have a think about what kinds of functionality you think should be available. Free free to create issues or merge requests in the GitLab project.
Best Regards, Martin Owens
Awesome, thanks! The biggest thing I can think of would be automatic compensation for the viewbox. Given a viewbox that rescales and/or translates the svg, apply that import transformation to the paths to give the true paths in real-world units. Both inkscape-silhouette and ink/stitch have to do that since they work with machines in the real world.
Another useful thing, now that I think about it, would be a class wrapped around guides. The current code just gives you the guide XML elements (I think?), which is useful as is, but there's room for so much more awesomeness. When I tried to interpret guides, especially the angle, my code got really confusing, really quickly. It was almost as if the X and Y terms for the guide angle were reversed, or at least that was my impression. It'd be cool not to have to think about that.
I'm on vacation now but I'll try to file issues when I can.
On April 17, 2018 7:54:00 PM Martin Owens <doctormo@...400...> wrote:
On Tue, 2018-04-17 at 18:09 +0000, Lex Neva wrote:
Although I'm currently working on an updated API which should make
it easier to discover the functionality. Come talk to me over at http s://gitlab.com/inkscape/extensions/
Oh my, that sure is an interesting repo! Just from a cursory look, I can see that there's a lot in there that I've had to implement on my own in Ink/Stitch, and a lot of other really awesome stuff. How stable an production-ready would you say that code is?
I ask because I'm in a great position with Ink/Stitch: I don't actually have to wait until this ships with inkscape to start using it in my extension. We're using pyinstaller, so we could easily just bring this repo with us in our packaged installation archives. If you tell me it's even somewhat stable, I might just switch over to it now.
That's very interesting news. I'm trying to get a handle on how feasible it would be to manage our extensions using setup.py and a target directory pip. But that installation method is a work in progress.
As for the API. The old API from inkscape 0.x is stable, but it's also a bit crusty and untested. I intend to support it using deprecation warnings as much as possible in the 1.0 spec, a lot of the changes are cleanups, upgrades and trying to collect code together into python classes.
I'd say I'm probably about 50% through the 1.0 cleanup right now. If you have time to review, now is a great time to have a think about what kinds of functionality you think should be available. Free free to create issues or merge requests in the GitLab project.
Best Regards, Martin Owens
participants (2)
-
Lex Neva
-
Martin Owens