Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-13-2024, 05:27 AM   #1
Repto
Member
Repto began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
Question 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.
Repto is offline   Reply With Quote
Old 10-13-2024, 06:36 AM   #2
Repto
Member
Repto began at the beginning.
 
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.
Repto is offline   Reply With Quote
Old 10-13-2024, 11:03 AM   #3
Repto
Member
Repto began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Nov 2020
Device: Pocketbook Inkpad 3
Here is the entire folder if that helps
Attached Files
File Type: zip xhtml.zip (425.0 KB, 23 views)

Last edited by Repto; 10-13-2024 at 12:41 PM.
Repto is offline   Reply With Quote
Old 10-13-2024, 11:18 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
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
chaley is offline   Reply With Quote
Old 10-13-2024, 11:57 AM   #5
Repto
Member
Repto began at the beginning.
 
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
Repto is offline   Reply With Quote
Old 10-13-2024, 12:18 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,021
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Repto View Post
Here is the entire folder if that helps : https://filetransfer.io/manage-package/IkMUervk
This link generates a 404 error. Why not attach it here as a ZIP?
chaley is offline   Reply With Quote
Old 10-13-2024, 12:24 PM   #7
Repto
Member
Repto began at the beginning.
 
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
Attached Files
File Type: zip xhtml.zip (425.0 KB, 24 views)

Last edited by Repto; 10-13-2024 at 12:36 PM. Reason: typo
Repto is offline   Reply With Quote
Old 10-13-2024, 12:42 PM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
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:
and from various other discourses—<a href="an6.73.xhtml">AN 6.73</a> and <a href="AN9.42.xhtml">AN 9.42</a> being prominent among them
The file mn26.xhtml contains on line 375:
Quote:
<aside id="note-10" epub:type="footnote"><p><a href="#noteref-10">10</a> See <a href="an9.42.xhtml">AN 9.42</a>. One is “confined” within the five strands of sensuality, i.e., for as long as one is alive, *something* will have to be experienced as pleasant and alluring. So the only true escape is *within* the confinement: learning how to be dispassionate and seeing the danger in the midst of those things (<a href="MN25.xhtml">MN 25</a>). However, this doesn't mean that it is possible to perform <i>actions</i> of sensual nature while still partaking in the escape; see the wrong view proclaimed by Ariṭṭha in <a href="MN22.xhtml">MN 22</a>.
These account for the three duplicates you mentioned. They are also the only examples I found with a quick "grep" where uppercase letters are used in a local link.
chaley is offline   Reply With Quote
Old 10-13-2024, 12:48 PM   #9
Repto
Member
Repto began at the beginning.
 
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
Repto is offline   Reply With Quote
Old 10-13-2024, 12:49 PM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
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.
chaley is offline   Reply With Quote
Old 10-13-2024, 12:56 PM   #11
Repto
Member
Repto began at the beginning.
 
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.
Repto is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 02:01 AM.


MobileRead.com is a privately owned, operated and funded community.