View Single Post
Old 10-16-2020, 05:38 AM   #1
JJ Johnson
Connoisseur
JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.JJ Johnson ought to be getting tired of karma fortunes by now.
 
Posts: 70
Karma: 2119794
Join Date: Feb 2020
Location: Colorado
Device: Kobo Libra H20
Where do displayed chapter titles come from?

I have some text file renderings of books that I'm running through a python script to break up into chapters and generate epubs. I'm just getting started, but so far, I break it up and format the content into chapter html files, generate container.xml and content.opf, then zip it up along with a standard css file. Still to do is to generate a table of contents and add a cover image.

When I load the epub (using calibre, which is converting to kepub) onto my Kobo Libra, it looks great, except that the chapter titles shown are the actual html filenames. In each hmtl file I have a <title> tag in the header (with "Chapter One", "Chapter Two", etc.), which is where I assumed it would get this data, but apparently not.

My content.opf is pretty simple, along with headers and metadata, it looks like:
Code:
  <manifest>
    <item href="chapter00.html" id="chapter00" media-type="application/xhtml+xml"/>
    <item href="chapter01.html" id="chapter01" media-type="application/xhtml+xml"/>
  </manifest>
  <spine>
    <itemref idref="chapter00"/>
    <itemref idref="chapter01"/>
  </spine
Does it require a toc? Or is there something additional I can add to the manifest items?

Last edited by JJ Johnson; 10-16-2020 at 05:51 AM.
JJ Johnson is offline   Reply With Quote