View Single Post
Old 03-03-2019, 09:13 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,600
Karma: 169712392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by theducks View Post
Are you sure this wont break ALL the linkages inside the HTML code
When you use Sigils rename, it adjusts ALL references (usage) in the book, to match the new name
Doing this to already imported images does break all the links. The one time I did this, I extracted the image files, renamed and re-injected them. I then used regex to do a search and replace on the old file names and replace them with the new file name on "all files" plus "current file" for content.opf. It was a bit easier than manually renaming 300 image files.

Something like (using the filename segment from taneal1):
Code:
search Pict_statesecret_(.*?)\.jpg
replace: \1.jpg
OTOH, the suggestion was doing this before importing files which is a bit hard when the files already exist in the epub.

OYAH, in future, I'm going to avoid this type of task. I wasn't the author who added the entire flipping path to the original image directory on his computer as part of the filename.
DNSB is offline   Reply With Quote