Bryce Harrington wrote:
Hmm, I've not tried out svgslice but am familiar with the need for having multi-file output from extensions.
Ted, I see your point about the conceptual cleanness of having a single file output, however I'd encourage you to be open minded on this. From a practical point of view it may be quite useful to have the output be a directory of files.
I think you're saying "conceptual cleanness" to capture a large list of issues. It isn't just the simple issue of what to do with the files, it is how the application should work. Here are some examples:
Should the save dialog be a file browser or a directory browser? Or both? I can't think of a way to do this intuitively, or similar to other applications, where one can select either a directory or a file. They have different semantics of things like double clicking and how you'd specify creating a new directory.
We could make it different based on which output format is selected. Well yeah, but what if the user has it as "selected from extension"? Disable the directory ones? How does that work? Changing the file format changes how the filename chooser dialog works?
So, the user interface issues get figured out... what happens on conflicts? If all the files require overwriting, that's a pretty simple case. What about one? What if two, is one so important that all the others should be cleaned up if it isn't written? Should we only allow saving into clean directories?
How should this work as a script? If files aren't passed through the pipe, what is? Is it a zip file that has all the files in it, or a list of file names in some temporary storage area? But, since this is all different, it will probably require a new extension type. Not a huge deal, but also non-trivial.
Yes, none of this is unsolvable, but it is a significantly different use model than all of these constructs were designed for. There are also significant concerns here that haven't been widely addressed. I see no solution in the short term.
I would think that a final solution would involve a "Export to Directory..." type menu item. Where a dialog that is better suited for multi-file output would come up. The a special extension type can be designed to handle these issues. The special cases listed above can be handles in a consistent way. I don't currently have any plans to work on this. I have too much on my plate as it is.
Anyway, in the spirit of "patch first, discuss later", perhaps you could have Lee add his code in and then you can focus on the specific implementational issues where you see there may be better ways of doing things. I think you two can come up with a pretty brilliant feature if you work together on it.
I agree, I think that adding where it saves as a single compressed file is a good start. Figuring out how to do it so that it is more useful and works within Inkscape can come in the future.
My favorite idea so far is Aaron's. But, it seems other solutions will not be considered.
--Ted