View Single Post
Old 08-18-2024, 10:41 PM   #7
vanceism7
Junior Member
vanceism7 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2024
Device: Pixel 4a
Quote:
Originally Posted by slm View Post
Did you actually try creating an HTML "table of contents" file as indicated by the link and then asking Calibre to add that file?
Yea, as I said, that was actually the first thing I tried. I had a script that generated a file something akin to

```
<html>
<body>
<h1>Table of Contents</h1>
<ol>
<li><a href="1-Foo/chapter-1.html>chapter-1</a></li>
... Etc etc
</ol>
</body>
</html>
```

And then tried the other structure more similar to the one in the manual. It successfully pulls in all of the files but it puts all the chapters in random order. I tried that also using the breadth-first option but it also didn't make a difference.

I'm sure it's probably because the algorithm is trying to follow links in the html, and the html links are somewhat malformed as this is a bit of a strange project I'm working on. But as I said, I really don't need a sophisticated algorithm here, I just need it to include the files using the same ordering the filesystem is using.

It would be nice if there was some ability to just zip up a directory and it just traversed the files in the natural ordering, but that doesn't seem to work as things are now. Unless there's a plugin or something, but I couldn't find anything in my search. (Admittedly I didn't look *very* hard though)
vanceism7 is offline   Reply With Quote