View Single Post
Old 03-22-2016, 03:41 AM   #1
Capricorn
Belgian Pommes Frites
Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.
 
Posts: 122
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
Case of path different according to the tool used

Hi everyone,

I am not sure where to post this.

Occasionally I have an epub where the case of the path is wrong. It is "../images/picture.jpg" and should be ../Images/picture.jpg"

Up till now I just changed that manually. As it is rather annoying I thought to automate this process by using the tool powergrep (see www.powergrep.com). And by doing so, I have come across strange things.

Using powergrep I search for the literal string (with the option "case sensitive" activated)src="../images/ and replace it with src="../Images/
On testing it finds some files.

However, when I open these files with Sigil, in the code view it says the path is:
src="../Images/picture.jpg"

But, when I open the same epub in Calibre editor, in the code view it says:
src="../images/picture.jpg"

and in the files browser of calibre editor the image folder is shown with capital "Images".

In Sigil AND in calibre editor the picture is shown properly.

Is there some sort of explanation for this? I am confused.
And how do I go about finding the ones that are truly wrong?
Any info would be much appreciated.

Last edited by Capricorn; 03-22-2016 at 03:47 AM.
Capricorn is offline   Reply With Quote