10-13-2024, 05:27 AM | #1 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
XHTML to ZIP is duplicating some files
Hello, i'm trying to import/convert my XHTML files in calibre so as to create en EPUB version of these files. My issue happens when I'm importing the nav file into calibre so as to create the original zip with "HTML to ZIP" plugin.
So I created a nav file listing all my files (120+ files) like so: https://pastebin.com/9EunDx7A Every files listed in this nav exist with these exact names in the same directory, no additionnal files exists in it. My issue: Everything is working fine except for 3 files "an9.42.xhtml", "mn22.xhtml" and "mn25.xhtml" which are duplicated. The files with these names are created but there are also the duplicated files "AN9.421.xhtml", "MN221.xhtml" and "MN251.xhtml" that are created, and I can't figure why that is. Here is mn22.xhtml for example: https://pastebin.com/pnzfNQgE Settings: I already customized the plugin "HTML to ZIP" to "Add linked files in breadth first order" Additionnal infos: The fact that these duplicate files are created is a problem because they are added at the end after all the other chapters, and I have some links in other chapters that are pointing to these duplicated chapters instead of pointing to the original chapter. Last edited by Repto; 10-13-2024 at 09:03 AM. |
10-13-2024, 06:36 AM | #2 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
Additionnal infos:
The links pointing to these duplicated files after the conversion were correct and linking to the original files before converting with "HTML to ZIP". Last edited by Repto; 10-13-2024 at 09:07 AM. |
10-13-2024, 11:03 AM | #3 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
Here is the entire folder if that helps
Last edited by Repto; 10-13-2024 at 12:41 PM. |
10-13-2024, 11:18 AM | #4 |
Grand Sorcerer
Posts: 12,021
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You seen to say that some files contain internal links to the uppercased filenames, which are missing. Calibre might be resolving that problem by copying the lowercase-named version to an uppercased version, with the goal of making it work on a case sensitive filesystem.
Try searching the files for links to duplicated files, that is links to the uppercased version. Change those links to point to the lowercased version, thereby making the collection of files internally consistent. Last edited by chaley; 10-13-2024 at 11:22 AM. Reason: Fix redundant info |
10-13-2024, 11:57 AM | #5 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
Thanks for your answer, I checked but it doesn't seem to be the issue.
I made sure that every file is lowercase, and that every "<a></a>" link in my html files are lowercase as well. What I was saying is that: - Before the "HTML to ZIP" conversion: every links are lowercase, and points to lowercase files, and every files exists and are lowercase. - After the "HTML to ZIP" conversion: some duplicate pages with uppercase names are added (e.g.: "AN9.421.xhtml" which is a duplicate to "an9.42.xhtml") and some internal links are modified to point to the duplicated uppercase files instead of the lowercase ones (but only for the 3 files I mentionned in the first post) Edit: I could modify the ZIP files after the conversion so that they point to the correct lowercase files as a last resort, but I would like to know if there is a way to make everything consistent during the conversion, without having to make modifications after. Last edited by Repto; 10-13-2024 at 12:06 PM. Reason: added edit |
10-13-2024, 12:18 PM | #6 | |
Grand Sorcerer
Posts: 12,021
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
10-13-2024, 12:24 PM | #7 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
My bad I didn't think I could.
I tried to change every files and links to uppercase like that "MN1.xhtml" and the issue seem to be resolved. Not sure what the issue was in the first place though Last edited by Repto; 10-13-2024 at 12:36 PM. Reason: typo |
10-13-2024, 12:42 PM | #8 | ||
Grand Sorcerer
Posts: 12,021
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The file an4.162.xhtml contains on line 43:
Quote:
Quote:
|
||
10-13-2024, 12:48 PM | #9 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
Well shit, I looked for "MN221.xhtml" but not for "MN22.xhtml", now it makes sense.
Thanks for you help and sorry, I could have find that myself |
10-13-2024, 12:49 PM | #10 |
Grand Sorcerer
Posts: 12,021
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
BTW: I am assuming that nothing in the shared folder is under copyright. If it is then please delete the attachment and the link (if it works for you). Let me know and I will delete the text I quoted.
And you are welcome. |
10-13-2024, 12:56 PM | #11 |
Member
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
|
Yes, nothing is under copyright, no problems.
Thanks again and have a good day. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre and XHTML files | Snekguy | Conversion | 10 | 05-10-2022 02:49 PM |
Copy book data to separate library without duplicating the actual book files? | dewd | Library Management | 5 | 01-12-2022 04:11 PM |
Some files.html & toc.xhtml (also Cover.xhtml) | chaot | Workshop | 23 | 02-13-2017 01:20 PM |
Calibre2opds duplicating image files intended? | miquele | Related Tools | 2 | 06-29-2013 02:55 PM |
calibre duplicating HTML files | SkookumPete | Calibre | 0 | 03-23-2012 03:10 PM |