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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-12-2009, 06:18 PM   #1
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
Text files with # and ##

these don't seem to work as title and chapter detection marks when converting a text file from the command line. Is there some new?
Thanks,
Paul
p3aul is offline   Reply With Quote
Old 10-12-2009, 08:43 PM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Use the --markdown option. I disabled processing with markdown (how #'s turn into chapter markings) by default a few versions ago. This decision was made because of the number of people who were having trouble with random formatting that was creeping into the output.
user_none is offline   Reply With Quote
Advert
Old 10-12-2009, 09:21 PM   #3
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
*exactly* how is the --markdown option used the skimpy user manual is not that clear.

Even converting the text to html and making <h1> and <h2> tags is no use. The TOC is just never generated.

It used to be so simple to generate an ebook file. Why is it so complicated now?

Last edited by p3aul; 10-12-2009 at 09:26 PM.
p3aul is offline   Reply With Quote
Old 10-12-2009, 10:22 PM   #4
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by p3aul
*exactly* how is the --markdown option used the skimpy user manual is not that clear.
Read about markdown here. Enable it in the TXT input conversion options in the GUI or use --markdown if you are using ebook-convert. Markdown itself is a simple syntax that allows for basic formatting of TXT files. When run though a markdown processor it turns those formatting identifies into equivalent HTML tags. E.G. # becomes h1, ## becomes h2.

Quote:
Originally Posted by p3aul
Even converting the text to html and making <h1> and <h2> tags is no use. The TOC is just never generated.

It used to be so simple to generate an ebook file. Why is it so complicated now?
Because of all the people complaining that they don't want a toc or their input file is structured in such a way that they need to be able to specify custom toc identifiers.

To get it working in your case, set the --level1-toc to "//*[name()='h1']" in the table of contents section to have it work. Use the same xpath with h2 and h3 for level 2 and 3 to get the sub items (## and ###).
user_none is offline   Reply With Quote
Old 10-12-2009, 10:31 PM   #5
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
I followed your link. it was about as clear as mud! now do I have to download and install some sort of pre-processor in order to use # and ## in my text files? Somehow I don't think that's an improvement. and you still didn't tell me how to use --markdown what options come after --markdown on the command line?
p3aul is offline   Reply With Quote
Advert
Old 10-13-2009, 06:35 AM   #6
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by p3aul View Post
I followed your link. it was about as clear as mud! now do I have to download and install some sort of pre-processor in order to use # and ## in my text files?
No. calibre includes a markdown preprocessor. That link details the syntax and what html the syntax changes to. It also has an online tool where you can test snippets to see how it will come out.

Quote:
Originally Posted by p3aul View Post
Somehow I don't think that's an improvement ...
This confusion is exactly why I disabled it by default.

Quote:
Originally Posted by p3aul View Post
... and you still didn't tell me how to use --markdown what options come after --markdown on the command line?
Nothing comes after it.

Last edited by user_none; 10-13-2009 at 06:37 AM.
user_none is offline   Reply With Quote
Old 10-13-2009, 03:10 PM   #7
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
OK, I understand --markdown now. Sorry for all the frustration! .6.17 is reinstalled and I have my beloved # and ## back now!
Paul
p3aul is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with formatting text files chooky Workshop 2 11-26-2009 04:16 AM
Text files blanked Halk Calibre 21 05-18-2009 01:31 PM
Do need help editing text files? Nate the great Workshop 3 04-01-2009 01:18 PM
Text tool for formatting Gutenberg text files bob_ninja Workshop 5 11-13-2007 12:28 PM
Reading Text Files ? grayfox iRex 8 10-17-2007 11:20 PM


All times are GMT -4. The time now is 09:23 AM.


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