View Single Post
Old 02-20-2024, 10:39 AM   #32
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,532
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by xxyzz View Post
I'm now trying to figure out how sections are created, I guess each block level HTML tag is a section?
Each individual HTML file of the EPUB being converted becomes a section. For reflowable books sections usually correspond to chapters. For fixed-layout books, such as comics, sections are individual pages or page spreads. Sections are called skeletons in KF8 format.

Quote:
Originally Posted by xxyzz View Post
I think the kindle previewer cli must be able to "see" the book HTML since it could ignore hidden tags and find the css rules of a tag. The style rules are tricky to implement, maybe using a headless browser?
The Kindle Previewer parses the HTML and CSS contained in an EPUB to determine what styles are applied to each element and produces the KFX equivalents for those styles with some adjustments.

Quote:
Originally Posted by xxyzz View Post
Here is the code: https://github.com/xxyzz/kpfgen, it could only add the cover section for now.
I will take a look at it when I have some more free time.
jhowell is offline   Reply With Quote