Hi theducks,
Quote:
Originally Posted by theducks
Kevin
Yes, I have seen this structure  :
chapter1/body.html
chapter1/Images/image001.jpg
chapter1/Images/image002.jpg
chapter1/Images/image003.jpg
chapter2/body.html
chapter2/Images/image001.jpg
chapter2/Images/image002.jpg
chapter3/body.html
chapter3/Images/image001.jpg
chapter3/Images/image002.jpg
chapter3/Images/image003.jpg
SEEN, not agree with the practice 
and there is no guaranteed parity between images of the same names
|
Okay, that makes the practice more concrete to me. Using the above example, could you live with the following flattening approach to fit the current Sigil file structure scheme?
In Text:
chapter1_body.html
chapter2_body.html
chapter3_body.html
In Images:
chapter1_Images_image001.jpg
chapter1_Images_image002.jpg
chapter1_Images_image003.jpg
chapter2_Images_image001.jpg
chapter2_Images_image002.jpg
chapter3_Images_image001.jpg
chapter3_Images_image002.jpg
chapter3_Images_image003.jpg
If so, and *if* there is some easy way to detect your use case upfront before import starts, then there should be a way to take the unique path from the manifest and covert it to a unique file name as above. And then go through and fix all of the relative links in all of the text files to the images and to other places in themselves. Sigil does this right now, it just doesn't look walk the epub contents first looking for duplicate files.
By the way, does it do the same thing with chapter specific css files too?
I have not looked at the Sigil file import code at all but I will look at it and see if there is something I can do.
If not ... if you are okay with using python tools in your work flows, I could whip up a epub converter that does the above and writes it out to a new epub that you can import and play with in Sigil. The old version would then be available to check against the original.
Just let me know. I can't do this right now, but I can put it on my todo list for my free time over the remainder of the summer.
KevinH