Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-08-2018, 03:19 AM   #1
hfpop
Addict
hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.
 
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
EPUB internal file structure

I noticed a difference in behavior about naming the html files inside the EPUB archive.

(a) long-file-name.HTML -> author-title-filename.EPUB
The EPUB file has a list of HTML files named long-file-name-split-000.html etc.

(b) long-file-name.HTML -> author-title-filename.AZW3 -> author-title-filename.EPUB
The EPUB file has a text folder with a list of HTML files named part000.html etc.

I do not like what happens at (a): the internal html files should have simple names, as in (b). What can I do to change this behavior? Is there an option somewhere that I missed?
hfpop is offline   Reply With Quote
Old 04-08-2018, 04:44 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,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Why are you converting from HTML > KF8 > ePub? That makes no sense. What you could do is use the Calibre editor with the HTML. Split the HTML as needed, make your own CSS. Get rid of any internal code that should be in the CSS and rename as you feel appropriate.

Orif you feel converting is what you want to do then go HTML > ePub and then edit the ePub. You can rename the files and you can clean up the code. Once you get the ePub as you want, then you can convert to KF8 using the ePub as the source.
JSWolf is offline   Reply With Quote
Old 04-08-2018, 08:05 AM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by hfpop View Post
I noticed a difference in behavior about naming the html files inside the EPUB archive.

(a) long-file-name.HTML -> author-title-filename.EPUB
The EPUB file has a list of HTML files named long-file-name-split-000.html etc.

(b) long-file-name.HTML -> author-title-filename.AZW3 -> author-title-filename.EPUB
The EPUB file has a text folder with a list of HTML files named part000.html etc.

I do not like what happens at (a): the internal html files should have simple names, as in (b). What can I do to change this behavior? Is there an option somewhere that I missed?
I not an AZW3 user, but my understanding is that these don't have any separate internal files like epubs do. Hence, the conversion from HTML to AZW3 loses this. The conversion to ePub has to create files and uses a simple name.

For the conversion from HTML to ePub, the simplest thing to do is build an ePub that uses the HTML file with appropriate changes. The first pass at creating the ePub is this. And if you turn the functions off that create chapters, or it was a file that didn't need to be split, then that is the way t stays. If the conversion results in that file being split, then the current file name is used with "split-nnn" added to it.

And this naming is used for other conversions that start with multiple internal files. Keeping the names helps to track what is happening and reduces the risk of a name clash during the conversion.
davidfor is offline   Reply With Quote
Old 04-08-2018, 10:48 AM   #4
hfpop
Addict
hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.
 
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
Quote:
Originally Posted by JSWolf View Post
Why are you converting from HTML > KF8 > ePub? That makes no sense. What you could do is use the Calibre editor with the HTML. Split the HTML as needed, make your own CSS. Get rid of any internal code that should be in the CSS and rename as you feel appropriate.

Orif you feel converting is what you want to do then go HTML > ePub and then edit the ePub. You can rename the files and you can clean up the code. Once you get the ePub as you want, then you can convert to KF8 using the ePub as the source.
I followed both tracks for testing purposes. I wonder why the html files in the epub have that long name. If I change the long-ang-ugly-filename of the epub via different rules in Calibre, that will have no effect on the long-and-ugly-filename of the internal html files.
hfpop is offline   Reply With Quote
Old 04-08-2018, 10:50 AM   #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,970
Karma: 128903378
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 hfpop View Post
I followed both tracks for testing purposes. I wonder why the html files in the epub have that long name. If I change the long-ang-ugly-filename of the epub via different rules in Calibre, that will have no effect on the long-and-ugly-filename of the internal html files.
When Calibre converts HTML to ePub, it picks up the filename of the HTML and uses that. So rename the HTML and then convert.
JSWolf is offline   Reply With Quote
Old 04-08-2018, 10:51 AM   #6
hfpop
Addict
hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.
 
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
Quote:
Originally Posted by davidfor View Post
I not an AZW3 user, but my understanding is that these don't have any separate internal files like epubs do. Hence, the conversion from HTML to AZW3 loses this. The conversion to ePub has to create files and uses a simple name.
Exactly my point. Instead of using a simple name, the HTML -> EPUB track uses the long-and-ugly-filename of the original file. As I said, if later, the name of the EPUB file changes because of Calibre rules, this will have no impact on the names of the internal html files. And I will get two series of ugly filenames: the internal html files and the epub file itself. This is my issue.
hfpop is offline   Reply With Quote
Old 04-08-2018, 10:53 AM   #7
hfpop
Addict
hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.hfpop knows how many angels can dance on the head of a pin.
 
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
Quote:
Originally Posted by JSWolf View Post
When Calibre converts HTML to ePub, it picks up the filename of the HTML and uses that. So rename the HTML and then convert.
Right. I imagined this is the case. I hoped Calibre might have an internal switch to help here. But working in this way I lose the metadata reading from filename features. So the only way out is to use command like tools and set metadata via command line features.
hfpop is offline   Reply With Quote
Old 04-08-2018, 10:57 AM   #8
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,970
Karma: 128903378
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 hfpop View Post
Right. I imagined this is the case. I hoped Calibre might have an internal switch to help here. But working in this way I lose the metadata reading from filename features. So the only way out is to use command like tools and set metadata via command line features.
There are multiple ways to do this. One is to rename the HTML. Another is to rename the internal files after the conversion using the editor.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows file structure Pikachu Calibre 2 12-29-2014 02:17 PM
File suffixes and structure pwright2 Amazon Kindle 4 03-12-2012 05:29 PM
Flexible internal file structure and a Usability question GlennMaples Calibre 4 05-31-2010 04:50 PM
File Structure Question Tiburon Calibre 2 01-11-2010 09:21 PM
Question about the File structure bbusybookworm Amazon Kindle 3 11-23-2007 06:45 PM


All times are GMT -4. The time now is 06:03 PM.


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