Hi all,
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
As the svg-files are just text files, I am considering a script to do this to find and renumber the effects; the finding part can be achieved by e.g.
,---- | cat my_svg_file_with_jessyink.svg|grep "sodipodi:role="line">[0-9]*</tspan></text>"|grep [0-9]* `----
This gives all the lines with effect numbers, maybe sed or awk can be used in a loop to renumber in order and increment by a desired step (e.g. 10). Now, my skills are not really up to the task, so before embarking, the question is is this really the best route to go or are there any better ideas?
Thanks and cheers!
Footnotes: [1] http://code.google.com/p/jessyink/
Hi Jonny,
currently, there is no way to reassign the order numbers. As you said, it should not be very hard to write one. For the implementation I would prefer Python to avoid problems when using the script on other platforms.
Also, keep in mind that the effect numbering of one slide is independent from the next.
Cheers, Hannes
Hi all,
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
As the svg-files are just text files, I am considering a script to do this to find and renumber the effects; the finding part can be achieved by e.g.
,---- | cat my_svg_file_with_jessyink.svg|grep "sodipodi:role="line">[0-9]*</tspan></text>"|grep [0-9]* `----
This gives all the lines with effect numbers, maybe sed or awk can be used in a loop to renumber in order and increment by a desired step (e.g. 10). Now, my skills are not really up to the task, so before embarking, the question is is this really the best route to go or are there any better ideas?
Thanks and cheers!
Footnotes: [1] http://code.google.com/p/jessyink/
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Hi Hannes and thanks for your reply. I will try to get around to develop some renumbering scheme to rebaseline. Thanks for the reminder of different slides/layers; as I do not use this but only transformations it had not occured to me.
Regards,
Johnny
"Hannes Hochreiner" <hannes@...2460...> writes:
Hi Jonny,
currently, there is no way to reassign the order numbers. As you said, it should not be very hard to write one. For the implementation I would prefer Python to avoid problems when using the script on other platforms.
Also, keep in mind that the effect numbering of one slide is independent from the next.
Cheers, Hannes
Hi all,
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
As the svg-files are just text files, I am considering a script to do this to find and renumber the effects; the finding part can be achieved by e.g.
,---- | cat my_svg_file_with_jessyink.svg|grep "sodipodi:role="line">[0-9]*</tspan></text>"|grep [0-9]* `----
This gives all the lines with effect numbers, maybe sed or awk can be used in a loop to renumber in order and increment by a desired step (e.g. 10). Now, my skills are not really up to the task, so before embarking, the question is is this really the best route to go or are there any better ideas?
Thanks and cheers!
Footnotes: [1] http://code.google.com/p/jessyink/
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
I made an attempt as I outlined by using grep and sed, but this seems to break the file somewhere. Basically, I just look for all lines ,---- | sodipodi:role="line">[0-9]*</tspan></text>" `---- and renumber them in increments of 10. I thought this was only used for effects, but apparently not? Any ideas of why this fails?
I attach the trivial bash script below (my Python skills are not up to the task). This is a simplistic way that do not respect the slides as mentioned below and as mentioned breaks the file (partly), so use on some test file!
Johnny <yggdrasil@...2719...> writes:
Hi Hannes and thanks for your reply. I will try to get around to develop some renumbering scheme to rebaseline. Thanks for the reminder of different slides/layers; as I do not use this but only transformations it had not occured to me.
Regards,
Johnny
"Hannes Hochreiner" <hannes@...2460...> writes:
Hi Jonny,
currently, there is no way to reassign the order numbers. As you said, it should not be very hard to write one. For the implementation I would prefer Python to avoid problems when using the script on other platforms.
Also, keep in mind that the effect numbering of one slide is independent from the next.
Cheers, Hannes
Hi all,
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
As the svg-files are just text files, I am considering a script to do this to find and renumber the effects; the finding part can be achieved by e.g.
,---- | cat my_svg_file_with_jessyink.svg|grep "sodipodi:role="line">[0-9]*</tspan></text>"|grep [0-9]* `----
This gives all the lines with effect numbers, maybe sed or awk can be used in a loop to renumber in order and increment by a desired step (e.g. 10). Now, my skills are not really up to the task, so before embarking, the question is is this really the best route to go or are there any better ideas?
Thanks and cheers!
Footnotes: [1] http://code.google.com/p/jessyink/
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Hi Johnny,
I am not quit sure where your script fails. Do you have an example or can you provide more information about how it fails? Your expression looks quite general. I imagine that it also catches values that you don't intend to change (e.g. the duration of the effects).
Next week, I will have access to my laptop again. I'll look into the issue in more detail then.
Cheers, Hannes
P.S: Sorry for the typo in your name last time. I'm still not used to these on-screen keyboards :-)
I made an attempt as I outlined by using grep and sed, but this seems to break the file somewhere. Basically, I just look for all lines ,---- | sodipodi:role="line">[0-9]*</tspan></text>" `---- and renumber them in increments of 10. I thought this was only used for effects, but apparently not? Any ideas of why this fails?
I attach the trivial bash script below (my Python skills are not up to the task). This is a simplistic way that do not respect the slides as mentioned below and as mentioned breaks the file (partly), so use on some test file!
Johnny <yggdrasil@...2719...> writes:
Hi Hannes and thanks for your reply. I will try to get around to develop some renumbering scheme to rebaseline. Thanks for the reminder of different slides/layers; as I do not use this but only transformations it had not occured to me.
Regards,
Johnny
"Hannes Hochreiner" <hannes@...2460...> writes:
Hi Jonny,
currently, there is no way to reassign the order numbers. As you said, it should not be very hard to write one. For the implementation I would prefer Python to avoid problems when using the script on other platforms.
Also, keep in mind that the effect numbering of one slide is independent from the next.
Cheers, Hannes
Hi all,
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
As the svg-files are just text files, I am considering a script to do this to find and renumber the effects; the finding part can be achieved by e.g.
,---- | cat my_svg_file_with_jessyink.svg|grep "sodipodi:role="line">[0-9]*</tspan></text>"|grep [0-9]* `----
This gives all the lines with effect numbers, maybe sed or awk can be used in a loop to renumber in order and increment by a desired step (e.g. 10). Now, my skills are not really up to the task, so before embarking, the question is is this really the best route to go or are there any better ideas?
Thanks and cheers!
Footnotes: [1] http://code.google.com/p/jessyink/
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/____________________________... Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
"Hannes Hochreiner" <hannes@...2460...> writes:
Hi Johnny,
Hi Hannes,
I am not quit sure where your script fails. Do you have an example or can you provide more information about how it fails? Your expression looks quite general. I imagine that it also catches values that you don't intend to change (e.g. the duration of the effects).
This is probably the case. It may not be feasible to edit the XML using grep and sed, as this indiscriminately changes the text based on the line match and does not look at context. I have played around with Python and lxml to mitigate this; I attach the commented script which should be ok to follow. This still fails as some effects appear to be incorrectly numbered / ordered. I.e. the file can still be opened in a brower and some effects are displayed, but in the wrong order, and some seem lost.
Looking at the nodes in Inkscape XML editor however seems fine to me, so I am not sure why the problem occurs.
I cannot see why this fails, but maybe someone else can spot it.
Basically, what the script does is:
- Load the .svg (xml) file as an etree in Python - Loop through the tree until a jessink effect node is found - Loop through the children of this node to find the element specifying the order (there will be some overlap with the loop above as when this loop exits, the above loop goes to the next element; however this shouldn't - be a problem due to the conditionals not being fulfilled for other nodes) - Save the all effect order numbers in a vector that is then sorted - Create a dictionary from the sorted vector and remap the numbers in increments of 10 - Loop through the tree in the same way again and when the order attribute is found, replace it by the value in the dictionary - Write the file back through etree.write()
On a test file, renumbering could be done by ./jessy_renumber -v test_file.svg
Next week, I will have access to my laptop again. I'll look into the issue in more detail then.
I'd be obliged if you have some ideas on this :)
Regards,
Johnny
I made an attempt as I outlined by using grep and sed, but this seems to break the file somewhere. Basically, I just look for all lines ,---- | sodipodi:role="line">[0-9]*</tspan></text>" `---- and renumber them in increments of 10. I thought this was only used for effects, but apparently not? Any ideas of why this fails?
I attach the trivial bash script below (my Python skills are not up to the task). This is a simplistic way that do not respect the slides as mentioned below and as mentioned breaks the file (partly), so use on some test file!
Johnny <yggdrasil@...2719...> writes:
Hi Hannes and thanks for your reply. I will try to get around to develop some renumbering scheme to rebaseline. Thanks for the reminder of different slides/layers; as I do not use this but only transformations it had not occured to me.
Regards,
Johnny
"Hannes Hochreiner" <hannes@...2460...> writes:
Hi Jonny,
currently, there is no way to reassign the order numbers. As you said, it should not be very hard to write one. For the implementation I would prefer Python to avoid problems when using the script on other platforms.
Also, keep in mind that the effect numbering of one slide is independent from the next.
Cheers, Hannes
Hi all,
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
As the svg-files are just text files, I am considering a script to do this to find and renumber the effects; the finding part can be achieved by e.g.
,---- | cat my_svg_file_with_jessyink.svg|grep "sodipodi:role="line">[0-9]*</tspan></text>"|grep [0-9]* `----
This gives all the lines with effect numbers, maybe sed or awk can be used in a loop to renumber in order and increment by a desired step (e.g. 10). Now, my skills are not really up to the task, so before embarking, the question is is this really the best route to go or are there any better ideas?
Thanks and cheers!
Footnotes: [1] http://code.google.com/p/jessyink/
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
-- Johnny
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/____________________________... Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
On Fri, 16 Mar 2012 15:30:10 +0000 Johnny <yggdrasil@...2719...> wrote:
"Hannes Hochreiner" <hannes@...2460...> writes:
Hi Johnny,
Hi Hannes,
This is probably the case. It may not be feasible to edit the XML using grep and sed, as this indiscriminately changes the text based on the line match and does not look at context. I have played around with Python and lxml to mitigate this; I attach the commented script which should be ok to follow. This still fails as some effects appear to be incorrectly numbered / ordered. I.e. the file can still be opened in a brower and some effects are displayed, but in the wrong order, and some seem lost.
Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com
Consider using Gvim as an editor.
"Hannes Hochreiner" <hannes@...2460...> writes:
I am not quit sure where your script fails. Do you have an example or can you provide more information about how it fails?
After further investigations, simple files seem to work. I tried to create a MWE but failed (to make it fail :)), and then started stripping my file down, and after some tearing down, the renumbering seemed to work ok. So I went back to the complex file, created two copies and renumbered one, and then ran a diff in emacs. There were minor unexpected differences (e.g. a layer name, most likely due to having to open and save the file in inkscape after renumbering, as lxml in Python saves in a different layout), so I copied those across to the renumbered file ensuring only the order number is changed.
To my surprise, the problem persists! Could there be a limit in the effect numbering (I believe the renumber gives a max order number 0f ~500, where it previously was ~240).
,---- | EDIT: I just tested the renumbering scheme to increment by steps of 1 | | instead of 10, and voila, it works! There seems to be a limitation in | | Jessyink on the effect order number. | `----
If it helps, I can send an anonymised version of the file(s) off-list.
Hi Johnny:
To my surprise, the problem persists! Could there be a limit in the effect numbering (I believe the renumber gives a max order number 0f ~500, where it previously was ~240).
,---- | EDIT: I just tested the renumbering scheme to increment by steps of 1 | | instead of 10, and voila, it works! There seems to be a limitation in | | Jessyink on the effect order number. | `----
If it helps, I can send an anonymised version of the file(s) off-list.
That is indeed somewhat surprising as there should not be a limitation in the maximum order number. You can send the file to the email address I am writing from (hannes@...2460...). Just strip out all the information that you don't consider to be public.
Cheers, Hannes
Hannes Hochreiner <hannes@...2460...> writes:
Hi Johnny:
To my surprise, the problem persists! Could there be a limit in the effect numbering (I believe the renumber gives a max order number 0f ~500, where it previously was ~240).
,---- | EDIT: I just tested the renumbering scheme to increment by steps of 1 | | instead of 10, and voila, it works! There seems to be a limitation in | | Jessyink on the effect order number. | `----
If it helps, I can send an anonymised version of the file(s) off-list.
That is indeed somewhat surprising as there should not be a limitation in the maximum order number. You can send the file to the email address I am writing from (hannes@...2460...). Just strip out all the information that you don't consider to be public.
Hi Hannes,
Sent the files off list, if you have time to confirm (or discard) my concluision that the higher order numbers of the effects causes the issue, I'd be much obliged. I have not been able to identify any other suspects... :-/
Thanks,
Johnny
(cc'd to the Firefox list as the Jessyink effects order number seems to hit a javascript limitation in Firefox. Example files attached.)
Johnny <yggdrasil@...2719...> writes:
Hannes Hochreiner <hannes@...2460...> writes:
Hi Johnny:
To my surprise, the problem persists! Could there be a limit in the effect numbering (I believe the renumber gives a max order number 0f ~500, where it previously was ~240).
,---- | EDIT: I just tested the renumbering scheme to increment by steps of 1 | | instead of 10, and voila, it works! There seems to be a limitation in | | Jessyink on the effect order number. | `----
If it helps, I can send an anonymised version of the file(s) off-list.
That is indeed somewhat surprising as there should not be a limitation in the maximum order number. You can send the file to the email address I am writing from (hannes@...2460...). Just strip out all the information that you don't consider to be public.
Sent the files off list, if you have time to confirm (or discard) my concluision that the higher order numbers of the effects causes the issue, I'd be much obliged. I have not been able to identify any other suspects... :-/
After Hannes confirmed this was reproducible in Firefox, but not in Chrome, I installed Chrome and, voila, with Chrome it works! (Thanks Hannes!)
For the benefit of anyone else on this list interested in this curiosity, I changed the renumbering script to use increments of 100 and applied it to the jessyink demo file. After renumbering, the file still shows fine in Chrome, but not in Firefox.
For the sake of making playing around easier I have made the step size a command line option to the script and attach the new version.
E.g. To renumber the demo file above in increments of 3, just do ,---- | ./jessy_renumber5.py -v -r 3 jessyink_2_0_0_alpha_1.svg `----
Playing around with this, I get that using the demo file and a step size of 31 works (last effect order: 248), but a step size of 32 fails (last effect order: 256)!
256 seems a familiar binary number, could this have something to do with it...?
Jessyink [1]is really a very nice extension to Inkscape to enable doing dynamic presentations, I can really recommend it! There are two versions, I use the latter, Jessyink 2.0.0-alpha1.
However, I usually end up adding effects and manually setting the order and eventually running out of numbers. E.g. I start to number the effects by 10, 20, 30, etc. but soon end up having orders 1, 2, 3, 4, ... and wanting to insert a new efect between e.g. 2 and 3. Therefore I wonder, is there some way to renumber the effects to make some space that I have missed?
Footnotes: [1] http://code.google.com/p/jessyink/
For completion and closing this out, a renumbering and reordering function is now available as an Inkscape extension in the JessyInk trunk on launchpad.
https://code.launchpad.net/~jessyink-team/jessyink/version_2
participants (3)
-
Hannes Hochreiner
-
john Culleton
-
Johnny