View Single Post
Old 11-26-2012, 03:22 PM   #1
memenow
Junior Member
memenow began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2012
Device: nook
How to automatically create chapter titles and breaks in an epub file?

I have a big file that is separated into categories with an underscore beneath each category name. The file is constantly changing and there are 80 categories. It is a plain text file. I would like to make it so that each category name is a separate chapter in an epub file. I would also like to make sure each chapter name is the title of the chapter. Is there a way to do this automatically with Calibre? Maybe some regex magic? For example, I would like the chapter titles for the categories below to be: Fruit, Vegetables, Herbs. And I would like it to be parsed automatically (one way to do this would probably involve recognizing the underscores in a regex expression). How can I do this?


Fruit
________
Apples
Bananas

Vegetables
____________
Cucumbers
Zucchini

Herbs
_____
thyme
cayenne
memenow is offline   Reply With Quote