12-26-2014, 10:00 AM | #1 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Import files in order
I know it's in the manual, but I can't find it again (sorry)
I have a folder of list of html files (part1, part2 ... part10, part11, ... part33)that I wanted to build a book with, but the import order seems to be almost random I recall that as I was reading the manual there was a way (toc file maybe) to provide an import order. Could someone please provide a link? I guess I couldn't come up with the right search terms (possibly due to OD-ing on eggnog???) Thanks |
12-26-2014, 11:18 AM | #2 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
BUT Your files would still (partially) fail because of ASCII sort rules Part1 Part10 Part2 instead of Part01 Part02 Part10 |
|
Advert | |
|
12-26-2014, 12:36 PM | #3 |
Zealot
Posts: 119
Karma: 64428
Join Date: Aug 2011
Device: none
|
|
12-26-2014, 01:28 PM | #4 | |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
@signum -- yes, that was the reference I had seen before and vaguely recollected. I have to figure out how to use it
@theducks -- had I known the work I was making for myself, I would have planned ahead better From the manual ... Quote:
So the 'order' file is the only way Correct? Last edited by phossler; 12-26-2014 at 01:34 PM. |
|
12-26-2014, 01:33 PM | #5 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Maybe you can use a file renamer like metamorpose, to pad the leading 0's |
|
Advert | |
|
12-29-2014, 06:42 PM | #6 |
Zealot
Posts: 119
Karma: 64428
Join Date: Aug 2011
Device: none
|
Sort Order and Depth-FIrst
I recently did some experiments with Calibre to see what actually happens when you specify an index file referencing several other html files. I had several questions: 1. Does Calibre change the order of included files? I created 5 html files named part_1.html, part_2.html, part_10.html, part_11.html and part_20.html. Each file looks like: Code:
<html><body> <p>This is file 1.</p> </body></html> I tried to create an epub from just these five files: Code:
ebook-convert *.html foo.epub Code:
<html><body> <p><a href=file_1.html>file 1</a></p> <p><a href=file_2.html>file 2</a></p> <p><a href=file_10.html>file 10</a></p> <p><a href=file_11.html>file 11</a></p> <p><a href=file_20.html>file 20</a></p> </body></html> Code:
ebook-convert index.html foo.epub 2. Well, just when depth-first order important? Following Kovid's example, I changed file_2.html to include a link to file_11.html and made an epub out of this. The sequence of files turned out to be 1, 2, 11, 10, 20, just as Kovid warned it would be. The difference here is that there was a forward reference (in file_2.html) that needed to be chased down first. 3. What happens if you reverse the files in index.html? I arranged the links in index.html to be in reverse order. File_2.html still linked to file_11.html, but now it's a backward link. Made an epub out of this and the order was 20, 11, 10, 2, 1 without any need for a depth-first search. Conclusions: Simple forward links at the top (index) level behave nicely, coming out in the same order you list them. Actually, it's a depth-first search where the depth is 1. Forward links at the second (or lower) levels will include files in depth-first order. Backward links don't change the include order at all. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Import .asp files? | TheTruthBetween | Library Management | 3 | 11-16-2014 03:28 AM |
how to import files in specific order. not resolved | user743 | Editor | 29 | 05-21-2014 12:11 PM |
Import order when adding multiple books | Sparkling | Library Management | 5 | 07-08-2011 07:41 AM |
iPad How can we import files to iPad? | Over | Apple Devices | 15 | 10-20-2010 05:32 AM |
Import pdf files | pavlos555 | Calibre | 3 | 10-14-2010 10:18 AM |