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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-05-2017, 04:51 AM   #1
sv_lary
Junior Member
sv_lary began at the beginning.
 
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?
sv_lary is offline   Reply With Quote
Old 10-05-2017, 05:19 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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.
JSWolf is offline   Reply With Quote
Advert
Old 10-05-2017, 08:53 AM   #3
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
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
Tex2002ans is offline   Reply With Quote
Old 10-05-2017, 09:08 AM   #4
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
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.
patrik is offline   Reply With Quote
Old 10-05-2017, 01:41 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by patrik View Post
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.
That is a really bad idea. Converting is going to change the files and make it more difficult to make the ePub. So recommending something like this is a really bad idea.

Renaming the XHTML files and putting them in the same directory is the way to do it.
JSWolf is offline   Reply With Quote
Advert
Old 10-05-2017, 01:48 PM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-05-2017, 02:04 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
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 loose 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.
I almost mentioned that, but then I couldn't find the commit/changelog entry that specified it. I knew that the procedure for updating urls in css files was (fairly) recently updated to accommodate identical filenames in subdirectories.

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).
DiapDealer is online now   Reply With Quote
Old 10-05-2017, 03:43 PM   #8
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 647
Karma: 4566069
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Quote:
Originally Posted by JSWolf View Post
That is a really bad idea. Converting is going to change the files and make it more difficult to make the ePub. So recommending something like this is a really bad idea.
Maybe, but I have done this several times. Worked fine for me. If you have an actual way to do it better I am more than willing to adapt.

Quote:
Renaming the XHTML files and putting them in the same directory is the way to do it.
That's not helping. Please add all necessary steps to make it into an epub if you want to help.
patrik is offline   Reply With Quote
Old 10-05-2017, 05:35 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by patrik View Post
That's not helping. Please add all necessary steps to make it into an epub if you want to help.
Do you not know how to rename files?
JSWolf is offline   Reply With Quote
Old 10-05-2017, 06:16 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is online now   Reply With Quote
Old 10-05-2017, 06:27 PM   #11
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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?
KevinH is offline   Reply With Quote
Old 10-05-2017, 06:30 PM   #12
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-05-2017, 06:56 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
@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?
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.
DiapDealer is online now   Reply With Quote
Old 10-05-2017, 07:01 PM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
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?
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.
DiapDealer is online now   Reply With Quote
Old 10-05-2017, 08:37 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,458
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by sv_lary View Post
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?
So, copy the Part1, Part2 and Part3 directories to a Scratch folder and rename the files there, in the manner suggested in Post #3

Any half decnet renamer with have a way to prefix an existing file name with parent directory name.

BR
BetterRed is offline   Reply With Quote
Reply

Tags
hierarchy, sigil

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:48 PM.


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