10-05-2017, 04:51 AM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Oct 2017
Location: Tomsk, Russia
Device: onyx-boox
|
Nested directories of HTML documents
I try to build the book from the available HTML-files. They are located in directories thus:
Part1 Chapter_1.html Chapter_2.html Chapter_3.html Part2 Chapter_1.html Chapter_2.html ... Part3 Chapter_1.html Chapter_2.html ... Names of files in the directories match. I cannot rename them. How to load these files in the SIGIL editor? |
10-05-2017, 05:19 AM | #2 |
Resident Curmudgeon
Posts: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Um.. just no. That's just wrong. All the XHTML files go in one directory. Just make sure you don't use the same filename more than once.
|
Advert | |
|
10-05-2017, 08:53 AM | #3 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
On opening an EPUB in Sigil, Sigil automatically moves everything into the Text/Styles/Images/Fonts folders.
EPUBs with multiple same-name files in subfolders will open in Calibre's Editor since Calibre doesn't insist on a certain folder scheme. If you still want to use this EPUB in Sigil, I would recommend renaming the files into something like this: Part1-Chapter01.html Part1-Chapter02.html [...] Part3-Chapter03.html |
10-05-2017, 09:08 AM | #4 |
Guru
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
One way would be:
Use whatever tool you like and add the html-files, with path, to a new text file (with html extension). (i.e. find . -iname '*.html' > main-file.html) Add the new html-file to calibre. Convert to epub in calibre. Open the epub with Sigil. Remove the "book" in calibre. Edit. |
10-05-2017, 01:41 PM | #5 | |
Resident Curmudgeon
Posts: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Renaming the XHTML files and putting them in the same directory is the way to do it. |
|
Advert | |
|
10-05-2017, 01:48 PM | #6 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
Have you tried simply adding the epub to Sigil. I have long ago modified Sigil to force uniqueness of file names upon first import. So Recent versions of Sigil should not lose any links or things on import when loading a book like that.
Please give it a try with the most recent version of Sigil and let me kniw what happens. Last edited by KevinH; 10-05-2017 at 03:08 PM. |
10-05-2017, 02:04 PM | #7 | |
Grand Sorcerer
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I think the problem here might be that there is no epub to open with Sigil. The OP seems to want a way to get the files loaded into a new epub project (if I'm understanding correctly). |
|
10-05-2017, 03:43 PM | #8 | ||
Guru
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Quote:
Quote:
|
||
10-05-2017, 05:35 PM | #9 |
Resident Curmudgeon
Posts: 73,660
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
10-05-2017, 06:16 PM | #10 |
Grand Sorcerer
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm thinking that a rough and ready import plugin could allow a user to create an epub/opf from a directory structure. That way, Sigil handles all of the necessary file-renaming and link updating. The spine order might have to be adjusted (depending on file-naming scheme) after opening the epub, but such a thing could eliminate a lot of tedium and potential human-error.
|
10-05-2017, 06:27 PM | #11 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
What am I missing... You can select multiple files with Add Existing, right? So doing that once for each subdirectory (ie book in this case) should work properly. How many subdirectories (separate books) are there?
|
10-05-2017, 06:30 PM | #12 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
@DiapDealer,
Perhaps an input plugin that accepts a zip or path to a directory that walks the files building up a simplistic epub that it passes to Sigil. Is that what you are suggesting? Last edited by KevinH; 10-05-2017 at 10:18 PM. |
10-05-2017, 06:56 PM | #13 |
Grand Sorcerer
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yep. That's basically what I'm suggesting. Something that builds a bare-bones opf from the file-walk and puts it all into a simple epub that Sigil can then normalize. It would have to be pretty easy/quick to accomplish, though. Unless someone foresees a large demand for such a thing (which I don't), I can't see putting much effort into it (unless someone's looking for a practice project).
Last edited by DiapDealer; 10-05-2017 at 11:10 PM. |
10-05-2017, 07:01 PM | #14 |
Grand Sorcerer
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I don't think that would work. You'd have to find a way to add all the files from all the subdirectories all at once. Otherwise Add Existing won't let you add file names that already exist in the epub.
Last edited by DiapDealer; 10-05-2017 at 07:35 PM. |
10-05-2017, 08:37 PM | #15 | |
null operator (he/him)
Posts: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Any half decnet renamer with have a way to prefix an existing file name with parent directory name. BR |
|
Tags |
hierarchy, sigil |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KT3: nested (or even un-nested) document collections? | milo1984 | Amazon Kindle | 1 | 12-24-2016 02:09 PM |
Adding complex HTML documents | C Alberga | Library Management | 1 | 10-30-2015 10:31 AM |
Touch Kobo Touch web browser and local html documents | dds | Kobo Reader | 4 | 11-19-2013 06:43 PM |
Html Documents to Ebook (something Iliad can read) | alanboss | iRex | 5 | 06-01-2010 10:32 PM |
Unipage Unifier turns Websites into HTML documents | doctorow | Lounge | 4 | 02-21-2006 03:41 AM |