Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 08-09-2009, 12:30 AM   #1
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
By request: How I made my ePub bible

Well, I recieved a PM from a member asking if I would provide details as to how I made my ePub version of the KJV Bible, so I decided to post the answer here for all to see.

First, I started with the HTML version of TedPark's bible, and stripped all the navigational links that had been built into it. I was left with a single HTML file that included all of the books of the bible.
I then went through and changed/made sure all of the BOOK headings were Heading 2, or <h2>. I put <span clas="(...)"> tags around the various portions of the Book titles to control font size.
Each chapter heading was wrapped with <h3 class="PageBreak"> tags, EXCEPT for chapter one of each book, which had <h3 class="noPageBreak"> tags instead. Now obviously this was done to insert page breaks at the appropriate places in the HTML. The first chapter of each book was not page breaked so that it would display on the same page as the book title.
Once all that was done, I put the appropriate styles in the <style></style> portion of the document to control all of the above 'settings'.

Once the HTML file was ready, I imported it into Calibre 0.5.14.
In Calibre, I used the default font size, and checked the option to remove spacing between paragraphs. For the structure, I left everything at their defaults. I made sure that the "Do not split on page break was left UNCHECKED.
When it came to the TOC, I set both the "Number of links to add to table of contents" and "Chapter Threshold" both to 99 - I don't know whether this was neccessary or not, but it seemed to work.
For the level 1 TOC Xpath expression I used
Code:
//h2
And for the level 2 TOC I used
Code:
//h3
I then hit the convert button, and went and had a drink or three.

This gave me a nicely formatted ePub bible, however, I wasn't finished yet...
Now it was time to tweak it for speed so that it would be fully usable on the PRS-505.
To do this, I opened up the file from within 7-zip, and edited the toc.ncx file found within. I then searched for <content src="..." #...> elements, and deleted everything from the # up to -- but excluding -- the closing bracket (>). More details about this here.

Once those deletions were made, I simply saved the toc.ncx file from within the .epub file and loaded the .epub onto my PRS-505.

Download the "CompleteA_revised(v3.0).htm.bz2" from the original bible thread to see how I made the HTML file. Explode the .epub file (change it's extension to .zip if needed) to see how the ePub is made up.

The only software used was Notepad++ (to edit all the files), Calibre (to create a nice ePub) and 7-zip (to manipulate the created ePub).

Note: I made heavy use of the Find/Replace box in notepad++, and regular expressions, to make the bulk changes.
sherman is offline   Reply With Quote
Old 08-09-2009, 04:41 PM   #2
sawdust
Junior Member
sawdust is on a distinguished road
 
Posts: 4
Karma: 60
Join Date: Aug 2009
Device: sony 505
Thanks for the details, Sherman. I'm gathering the needed software to give it a go. Fantastic job. Please download Sherman's KJV bible to appreciate how fast a massive book loads and navigates.
Thanks again,
Sawdust
sawdust is offline   Reply With Quote
Advert
Old 08-09-2009, 07:35 PM   #3
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Please not that the Calibre conversion WILL take a long time, as it has to split a single HTML file into 1,190 small XHTML files. This is not a quick process *this was for my version anyway - different bibles will have differing numbers of page breaks).
sherman is offline   Reply With Quote
Old 08-10-2009, 09:39 AM   #4
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
How many pages (or page-fulls) does the resulting eBook have on the PRS-505?

- Ahi
ahi is offline   Reply With Quote
Old 08-10-2009, 06:45 PM   #5
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by ahi View Post
How many pages (or page-fulls) does the resulting eBook have on the PRS-505?

- Ahi
The reader tells me it's 2,589 pages. Of course, there is actually more "pages" than that, but due to ADE's wacky page numbering scheme...
sherman is offline   Reply With Quote
Advert
Old 09-01-2009, 04:09 AM   #6
kome17
kome
kome17 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Location: Hong Kong
Device: Cybook
Hello to everyone, I m very new to MobilerRead and e-reading, I am really excited to get into this e-reading world with all you guys, it seems so much fun and making the world bigger and more interesting!

The first thing I thought of is to have my bible in my device. (Oh, I got a Cybook) And through searching and reading threads here, I think epub is the ideal format I would want to read my bible. Finally I get to this thread and trying to make myself a epub bible.

I download Ted's "Bible_KJV_htmlA.zip" and unzip it, putting the NewTestA.htm into Calibre and output it as epub. Yet, the link in the bible seems not working good. It direct me to wrong chapter.

Then I return to this thread and read again the detailed "making of" of the epub bible by sherman...I am now quite lost when I find out the epub is actually very complicated work for me (not a programming guy do me)

I tried to open and read the source of the htm file and starting wondering what's inside, and what can I do to make the links work well in a epub format.

I have a lot of questions:
1. How and where should I look for those heading and how to change and what to change it in to //h2??

2. Where is the pagebreak? what do you mean by "wrapping", how is it wrapped in the htm file?

3. Where is the table of content? Is it in the htm file? Where/How should I notice it and know whether it is probably working when it is in epub?

4. I heard of metadata, what is it? And how is it different from TOC?


I am really green to the e-books composing and all the techy things involved, but I really want to kick-it-off to learn and practice and start rolling here and over.

Sorry guys, it feel like i shouldn't raise this questions as a newbie in this thread. But this is the post which aroused my interest (the bible) into the making of ebook. Sorry again as I really want to raise my questions and know better from you guys here.

Lastly, as green as I am to the techy composing of epub, do you have any suggestion that I should go ahead and learn quickly for knowledge (such as reading htm file)?
I only know very little html stuff, like bolding, italic a sentence in "[]b []/b, []i []/i...."

Thanks for everyone who read my post.

Last edited by kome17; 09-01-2009 at 04:14 AM.
kome17 is offline   Reply With Quote
Old 09-01-2009, 05:14 AM   #7
kome17
kome
kome17 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Location: Hong Kong
Device: Cybook
By running here and there in MR, i get into this, and hoping to learn what I need:
https://www.mobileread.com/forums/showthread.php?t=43230
kome17 is offline   Reply With Quote
Old 09-02-2009, 09:27 PM   #8
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
First, most of what you need to know is XHTML and CSS. To learn more about these, head to w3schools. I highly recommend visiting there to learn more about html. The pther resource you'll find helpful is the Calibre user manual.

You are actually starting off with a html file that has a complex link system. Another option is to download my version and work from that.

And you're right, I just tried converting the New testament, and it stuffed up the links

as to your questions:

1. I defined a heading as anything within a pair of <hn> </hn> tags, where n is a number from 1 to 6. The //h2 I referred to can be found in the Table of Contents section of Calibre, and is an XPath expression. In this case, the //h2 referrs to any <h2> </h2> pair of tags.

2. Page breaks add breaks in the page. On an eBook reader, this usually means anything before (or after) gets put on a new page, or screen. When I said wrap tags, I simply meant enclose the text you want changed with a pair of tags.

3. Table of Contents can refer to two things. External TOC, and inline TOC. An external TOC is one that exists in the tox.ncx file (in the epub). Devices read this file and (hopefully) give the user some sort of way of navigating it. I do not know how the cybook handles external TOC I'm afraid. You'll have to experiment yourself. This is what my bible uses.
An inline TOC is what Ted's bible uses. It is the links within an HTML file that allows the reader to navigate within the file.
An ebook can have BOTH types of navigation for maximum compatibility, and often an external TOC can be generated from an inline one. Calibre tries to do this by default.

4. Metadata is stuff like "title", "author" etc. This is generally the information an eBook reader uses to display book title and author in its database. A book with no metadata will often show on a device as having an "unknown" title and/or author. This is device dependant though.


I hope this has been some sort of help for you. If you have more questions, please don't hesitate to ask. This isn't the sort of place where we tell you "Don't ask us - go and RTFM!"
sherman is offline   Reply With Quote
Old 09-09-2009, 03:17 AM   #9
kome17
kome
kome17 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Location: Hong Kong
Device: Cybook
Thanks for your answer, sherman.

All those info are useful to me as I learn the making

I am now referring to Jedisaber as I learn very basic stuff in epub format, but I am confused that i fail to make a recognizable epub file.

I check my file with threepress, it report to me that my minitype file is "not the first" in the epub file, what should i do to give it a "first place" in the zip file layout?
kome17 is offline   Reply With Quote
Old 09-09-2009, 03:36 AM   #10
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,495
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
The ePub format requires that the first file in the zpi archive should be the mimetype file and that is should be uncompressed.

See this thread for details of the commands needed to create such a zip file, and if you're on Mac, for a useful AppleScript aplication that does the hard work for you.

I'd also recommend that you take a look at Sigil, which will create ePub files and has a WYSIWYG and code-based editor.

Quote:
Originally Posted by kome17 View Post
Thanks for your answer, sherman.

All those info are useful to me as I learn the making

I am now referring to Jedisaber as I learn very basic stuff in epub format, but I am confused that i fail to make a recognizable epub file.

I check my file with threepress, it report to me that my minitype file is "not the first" in the epub file, what should i do to give it a "first place" in the zip file layout?
pdurrant is offline   Reply With Quote
Old 09-09-2009, 08:26 AM   #11
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
FYI, I'm not exactly an expert at creating ePub files from scratch - I'm too lazy

I let Calibre do most of the hard work for me, and just tweaked the resulting ePub to improve performance.

If Sigil had been around when I created my version of the Bible, I probably would have given that a go - alas Sigil was probably just a little something in the back of Valloric's mind at the time.
sherman is offline   Reply With Quote
Old 09-11-2009, 03:26 AM   #12
kome17
kome
kome17 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2009
Location: Hong Kong
Device: Cybook
Re: pdurrant
you really get me, it's not that simple to zip a folder into epub in Mac OS, which i am using, thanks! it does help!

Re: sherman
nvm, everyone ain't expert, but we get together, talk it over and learn from each other, right? at least you know well on how you work with your Calibre, I meet another problem again in getting through Calibre.

How do I edit the "GUI" as I convert the ebook to epub?
What actually is GUI? I would refer to "graphical user interface"...but I don't know what it mean in Calibre.

getting to learn sigil too, it's mac enable, great!
kome17 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spiritual Various: Holy Bible The New Testament ASV. ePUB. V3 27 May 2011 DaleDe ePub Books 4 07-19-2011 06:08 PM
Spiritual Various: Bible, King James Version, V3.0, 06.16.2009 [epub] (UPDATED!!) sherman ePub Books 65 03-15-2011 03:36 PM
ePUB English dictionary & ePUB Bible Sabrina Introduce Yourself 7 08-30-2010 10:30 PM
Spiritual Various: KJV Bible in epub, Shermans txt updated. Rootman ePub Books 3 12-23-2009 07:18 PM
More beginners hand made epub questions AlexBell ePub 9 08-29-2009 03:03 AM


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


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