EPUB to HTMLZ Converion Image Order Issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
ebook-convert --version
returns: ebook-convert (calibre 7.13.0)
I currently use ebook-convert to automate the process of converting EPUB files to HTMLZ files.
During this process, ebook-convert renames the image files stored within the EPUB, and then places the renamed files `images` folder of the HTMLZ file.
The issue is that the order of the files changes between conversion runs.
If I convert a given EPUB file with three images in it, the conversion might happen like this:
Image00026.jpg --> 000000.jpg
Image00024.jpg --> 000001.jpg
Image00025.jpg --> 000002.jpg
But the next time I run ebook-convert on the same file, the order may change, like this:
Image00025.jpg --> 000000.jpg
Image00026.jpg --> 000001.jpg
Image00024.jpg --> 000002.jpg
This causes issues because after the first run, I have markdown that I am editing that points to the names of the images. If I have to redo the EPUB --> HTMLZ conversion, all the image file names end up changing, and I have to manually update the markdown to point to the new image file names.
If there are only three images as in the example above, it is not a problem. However if there are hundreds of images (how I discovered this issue...), manually updating the markdown is a very time consuming process.
Would it be possible to have the EPUB --> HTMLZ conversion rename the files consistently, perhaps in order of filename? This would be wonderfully helpful.
Image00024.jpg --> 000000.jpg
Image00025.jpg --> 000001.jpg
Image00026.jpg --> 000002.jpg
I was previously using v5.37.0, and the problem does seem to have lessoned with the latest v7.13.0. However, it still happens. Please see the attached screengrabs showing the same images with different filenames.
Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.