From Martin Owens Mon Mar 17 14:37:04 2014
From: Martin Owens
To: inkscape-devel@lists.inkscape.org
Subject: [Inkscape-devel] Extension: Merge Style
Date: Mon, 17 Mar 2014 10:36:52 -0400
Message-ID: <1395067012.4146.8.camel@...2056...>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2918426442837542936=="
--===============2918426442837542936==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Hi devs,
I've committed in r13161 an extension which will take the inline styles
from the selected elements, find the common values and create a new css
style in the existing or new style element at the top of the document.
This replaces the inline styles with a class reference.
Becomes:
I've added this into the extensions menu under Stylesheets > Merge
Styles into CSS. And I decided to push it into trunk instead of just
keeping it on my hard drive because it might be useful to other users.
But I'd also like to sound it out too. So any issues you think, I'd love
to hear. This should make it easier to make web svg I think.
Best Regards, Martin Owens
--===============2918426442837542936==--
From unknown@example.com Tue Mar 18 13:11:19 2014
From: unknown@example.com
To: inkscape-devel@lists.inkscape.org
Subject: Re: [Inkscape-devel] Extension: Merge Style
Date: Tue, 18 Mar 2014 14:11:04 +0100
Message-ID: <168512975.609837352.1395148264643.JavaMail.root@...2840...>
In-Reply-To: <1395067012.4146.8.camel@...2056...>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6304198177034137378=="
--===============6304198177034137378==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Hi Martin
it sounds good, just 1 thing that came up when testing :
the script doesn't check if style exist when launching. So this can result i=
n duplicate style if you do it twice on a shape.
Personnally i think that doing 2 different actions :
- get_style_from_shape
- apply_style
would help avoid this situation and give more flexibility.
cheers
----- Mail original -----
De: "Martin Owens"
=C3=80: "Inkscape Developer Mailing List"
Envoy=C3=A9: Lundi 17 Mars 2014 15:36:52
Objet: [Inkscape-devel] Extension: Merge Style
Hi devs,
I've committed in r13161 an extension which will take the inline styles
from the selected elements, find the common values and create a new css
style in the existing or new style element at the top of the document.
This replaces the inline styles with a class reference.
Becomes:
I've added this into the extensions menu under Stylesheets > Merge
Styles into CSS. And I decided to push it into trunk instead of just
keeping it on my hard drive because it might be useful to other users.
But I'd also like to sound it out too. So any issues you think, I'd love
to hear. This should make it easier to make web svg I think.
Best Regards, Martin Owens
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel(a)lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
--===============6304198177034137378==--
From Martin Owens Tue Mar 18 13:15:58 2014
From: Martin Owens
To: inkscape-devel@lists.inkscape.org
Subject: Re: [Inkscape-devel] Extension: Merge Style
Date: Tue, 18 Mar 2014 09:15:49 -0400
Message-ID: <1395148549.14121.1.camel@...2056...>
In-Reply-To: <168512975.609837352.1395148264643.JavaMail.root@...2840...>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3478943765091292657=="
--===============3478943765091292657==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
On Tue, 2014-03-18 at 14:11 +0100, radar.map35(a)...8... wrote:
> Personnally i think that doing 2 different actions :
> - get_style_from_shape
> - apply_style
> would help avoid this situation and give more flexibility.
This sounds interesting, but I don't understand it. You advocate for a
two step process? Would the user copy the style onto the clipboard after
the first step?
Thanks for testing Radar.
Note: There's also a bug I need to fix #167937 which is making this
extension much less useful.
Best Regards, Martin Owens
--===============3478943765091292657==--
From unknown@example.com Tue Mar 18 13:44:57 2014
From: unknown@example.com
To: inkscape-devel@lists.inkscape.org
Subject: Re: [Inkscape-devel] Extension: Merge Style
Date: Tue, 18 Mar 2014 14:44:43 +0100
Message-ID: <1704727584.609964925.1395150283962.JavaMail.root@...2840...>
In-Reply-To: <1395148549.14121.1.camel@...2056...>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0580154508433522048=="
--===============0580154508433522048==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Yes a 2-step process i would use with 2 menus. At the end we can imagine ther=
e is a class window thatlet's the user interact with this.
But i was not really thinking a using clipboard but more :
- get_style : extract css from actual style attribute of the selected object =
(I would say only one), create and write the class in svg file
- apply_style : could provide a text entry (or best a list of available class=
) and add it to the selected element
the idea here is a bit different from yours but would avoid some strange beha=
viour it has for example when selected shapes are different (as many as they =
are).
I'll do some tests But i may submit a bug too.
pygmee
----- Mail original -----
De: "Martin Owens"
=C3=80: "radar map35"
Cc: "Inkscape Developer Mailing List"
Envoy=C3=A9: Mardi 18 Mars 2014 14:15:49
Objet: Re: [Inkscape-devel] Extension: Merge Style
On Tue, 2014-03-18 at 14:11 +0100, radar.map35(a)...8... wrote:
> Personnally i think that doing 2 different actions :
> - get_style_from_shape
> - apply_style
> would help avoid this situation and give more flexibility.
This sounds interesting, but I don't understand it. You advocate for a
two step process? Would the user copy the style onto the clipboard after
the first step?
Thanks for testing Radar.
Note: There's also a bug I need to fix #167937 which is making this
extension much less useful.
Best Regards, Martin Owens
--===============0580154508433522048==--