Re: Python extension extend to all Inkscape function and             width height of any element

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Python extension extend to all Inkscape function and             width height of any element

Lex Neva

> 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 [hidden email] wrote:

Send Inkscape-devel mailing list submissions to
  [hidden email]

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
  [hidden email]

You can reach the person managing the list at
  [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Inkscape-devel digest..."




Today's Topics:

      1. Python extension extend to all Inkscape function and width
            height of any element. (Lrn Lf)
      2. Re: Spreadshirt absurdity (Mihaela)
      3. Re: Python extension extend to all Inkscape function and
            width height of any element. (Martin Owens)
      4. Re: Spreadshirt absurdity (C R)




[Inkscape-devel] Python extension extend to all Inkscape function and width height of any element.
From: Lrn Lf <[hidden email]>
Date: Apr 16, 1:18 PM
To: [hidden email]

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
FromMihaela <[hidden email]>
DateApr 16, 1:27 PM
ToMartin Owens <[hidden email]>, C R <[hidden email]>
CCinkscape-devel <[hidden email]>

Spreadshirt published the changes, here's the notification:

https://www.spreadshirt.com/blog/2018/04/03/your-brand-new-detail-page-has-arrived/#more-17253

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python extension extend to all Inkscape function and             width height of any element

Martin Owens-2
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

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Python extension extend to all Inkscape function and             width height of any element

Lex Neva
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 <[hidden email]> 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
>



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel