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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-02-2011, 11:11 AM   #1
luckycharms
Connoisseur
luckycharms began at the beginning.
 
Posts: 69
Karma: 10
Join Date: Oct 2010
Device: Kobo Glo, PRS-650, iPad 1, iPhone 4S
table of contents code for converted oreilly chm

Hi Folks,

Not sure if this is the right sub-forum. I'm looking around for a way to properly detect multi-level tables of contents for an o'reilly chm that i'm converting to epub. Calibre is detecting the TOC, but just not in a multi-level fashion. Here's the XHTML (i think) for a chapter heading:

<TITLE>C.7. Chapter 7</TITLE>

and for a sub-section:

<TITLE>7.11. What About ORDER BY?</TITLE>

Perhaps I could somehow detect the "C." in the full chapter and the lack of it in a sub-section? I'd like to get these subsections indented, and ideally would like to find or help make a "recipe" (perhaps I'm mis-using that term) for processing these chm's.

thanks! any help greatly appreciated...
luckycharms is offline   Reply With Quote
Old 08-02-2011, 02:18 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by luckycharms View Post
Not sure if this is the right sub-forum.
Moderator Notice
This is a conversion question. I moved it for you.
Starson17 is offline   Reply With Quote
Advert
Old 08-02-2011, 03:57 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 5,771
Karma: 14391668
Join Date: Sep 2009
Location: UK
Device: Kobo: H2O, GloHD, KA1, ClaraHD, Forma
The <title>...</title> tags are not used by Calibre when defining chapters/TOC levels.

There are (at least) 2 ways to get the correct TOC nesting.
  1. The first is to find out exactly how the source document has defined each nest level in the XHTML files. It could be as simple as <h1> for level 1, <h2> for level 2 and <h3> for level 3... however you may not get that lucky! You can try opening the CHM in the Calibre Viewer then using the right-click Inspect feature. Once you have figured out exactly how the chapter headings have been defined you can use the info to construct the correct entries for the box Convert - StructureDetection - Detect chapters at and also for the 3 TOC level boxes on the Convert - TOC page. This method requires you to have a working knowledge of html.
  2. The second approach requires less technical ability. If you have done your CHM to EPUB conversion and you have a correct, but flat, TOC you could try this EpubFixer utility to massage your TOC to the appropriate nested structure. It's all done using drag-and-drop actions. The utility does more than just TOC editing but I personally don't use it for anything else.

If your CHM uses more than 3 nested levels I don't think you could use option 1. On the face of it option 2 seems to work but I don't know whether the various ereaders support nesting levels of 4 or more.
jackie_w is offline   Reply With Quote
Old 08-05-2011, 08:49 AM   #4
luckycharms
Connoisseur
luckycharms began at the beginning.
 
Posts: 69
Karma: 10
Join Date: Oct 2010
Device: Kobo Glo, PRS-650, iPad 1, iPhone 4S
thanks jackie. i know html, so i'll look into your option 1. I had been looking at the debug files from the conversion, but it made so many different html files, i'm not sure i was looking in the right place for the chapter tags.

So, how do i "inspect" the chm? I've already converted it to an epub once. When I open it in calibre, it opens as an epub. Right clicking on it's entry in the calibre library, i don't see any "inspect" menu option...

Last edited by luckycharms; 08-05-2011 at 08:54 AM.
luckycharms is offline   Reply With Quote
Old 08-05-2011, 09:31 AM   #5
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by luckycharms View Post
So, how do i "inspect" the chm? I've already converted it to an epub once. When I open it in calibre, it opens as an epub. Right clicking on it's entry in the calibre library, i don't see any "inspect" menu option...
As Jackie said, you open the chm file with the Calibre viewer. The inspect feature is in the Calibre viewer. Opening with the viewer causes the chm to be temporarily converted to XHTML. Try clicking on the chm file to open it. If your system doesn't use the Calibre viewer, then close it, and go into preferences and tell Calibre to use its own viewer to open chm files. That setting is in Preferences on the right side of the Behavior page.
Starson17 is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing navigation bars from converted CHM Gnungnu Conversion 5 06-22-2011 01:23 PM
epub converted from chm crash sony reader fdge Conversion 3 06-17-2011 02:09 AM
access directly the table of contents of cbc converted into epub Khawarizmi Sony Reader 4 12-27-2010 08:55 AM
Code block view (converted from CHM) Replika Calibre 3 10-19-2010 02:08 PM
Oreilly.com - eBooks for $5 each [NEW CODE - SEE POST #9] MikeFromHC Deals and Resources (No Self-Promotion or Affiliate Links) 9 06-22-2010 01:05 AM


All times are GMT -4. The time now is 08:00 AM.


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