Diff support between revisions of an svg with hieghlighing support.
I think it would be nice to have a diffing tool inside of Inkscape. The idea is that we find areas that have change between two versions and it would visually hande a box around the idea showing what had changed. Ideally as a lay that can be turned on and off. I know my work would be better if there was a way to show what changed between versions without needing to look at the svg code itself. Do you think this kind of thing could work? BR, Jason Brower
To do that, Inkscape would either have to store change history inside the SVG file, or have some means of selecting two files at once. To my knowledge, it has neither of those things, so it would probably not be a trivial thing to implement.
For your own reference, you could create a layer in your inkscape document called "changed" and fill that layer only with red-outlined polygons (rectangles would work in most instances), highlighting waht was changed since the last version of the file was opened. You'd have to do that manually.
It's also a question of what constitutes a "change" in the svg file. A relatively simple change in grouping/breaking apart/regrouping can almost completely re-write the svg file, and look nearly the same. :)
It would be interesting to know your use case though. How would this feature make your work easier?
-C
On Fri, Oct 14, 2016 at 12:48 PM, Jason (spot) Brower <encompass@...400...> wrote:
I think it would be nice to have a diffing tool inside of Inkscape. The idea is that we find areas that have change between two versions and it would visually hande a box around the idea showing what had changed. Ideally as a lay that can be turned on and off. I know my work would be better if there was a way to show what changed between versions without needing to look at the svg code itself. Do you think this kind of thing could work? BR, Jason Brower
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 Fri, 2016-10-14 at 11:48 +0000, Jason (spot) Brower wrote:
I think it would be nice to have a diffing tool inside of Inkscape. The idea is that we find areas that have change between two versions and it would visually hande a box around the idea showing what had changed. Ideally as a lay that can be turned on and off. I know my work would be better if there was a way to show what changed between versions without needing to look at the svg code itself. Do you think this kind of thing could work?
It depends on exactly what you want. To find visual differences, one would need to be able to render both images then subtract pixel by pixel the results. Any resulting non-zero pixels could then be drawn in red and overlaid on top of one of the original images. To find differences in the SVG files you would need to invoke an XML diff tool which might not be all that useful as the internal representations of two identically rendering SVG files can be very different. Just opening and saving an SVG file in Inkscape can result in significant changes to the file. I did recently add the ability to save SVG files with the attributes and properties sorted in a canonical order which should significantly reduce the arbitrary changes between SVG files edited by Inkscape (set /options/svgoutput/sort_attributes=1 in the Inkscape preferences file). Tav
BR, Jason Brower
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%3E
Couldn't you do that with Git though? You can create your SVGs with Inkscape and then commit them using Git, then you can use Git's diff tool to look at the differences between commits, branches, etc.
-- Frédéric Guimont, Consultant en logiciels libres Savoir-faire Linux
Téléphone : 418-525-7354 #362 Ring ID : d9396b8004d26120f1e948ac7a075ab7dd165077 www.savoirfairelinux.com
----- Original Message -----
From: "Tavmjong Bah" <tavmjong@...8...> To: "Jason (spot) Brower" <encompass@...400...>, inkscape-devel@...842...rceforge.net Sent: Friday, October 14, 2016 8:25:16 AM Subject: Re: [Inkscape-devel] Diff support between revisions of an svg with hieghlighing support.
On Fri, 2016-10-14 at 11:48 +0000, Jason (spot) Brower wrote:
I think it would be nice to have a diffing tool inside of Inkscape. The idea is that we find areas that have change between two versions and it would visually hande a box around the idea showing what had changed. Ideally as a lay that can be turned on and off. I know my work would be better if there was a way to show what changed between versions without needing to look at the svg code itself. Do you think this kind of thing could work?
It depends on exactly what you want. To find visual differences, one would need to be able to render both images then subtract pixel by pixel the results. Any resulting non-zero pixels could then be drawn in red and overlaid on top of one of the original images. To find differences in the SVG files you would need to invoke an XML diff tool which might not be all that useful as the internal representations of two identically rendering SVG files can be very different. Just opening and saving an SVG file in Inkscape can result in significant changes to the file. I did recently add the ability to save SVG files with the attributes and properties sorted in a canonical order which should significantly reduce the arbitrary changes between SVG files edited by Inkscape (set /options/svgoutput/sort_attributes=1 in the Inkscape preferences file).
Tav
BR, Jason Brower
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
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
participants (4)
-
C R
-
Frédéric Guimont
-
Jason (spot) Brower
-
Tavmjong Bah