View Single Post
Old 06-08-2010, 06:53 AM   #23
orwell2k
Addict
orwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheeseorwell2k can extract oil from cheese
 
orwell2k's Avatar
 
Posts: 357
Karma: 1112
Join Date: Oct 2008
Location: Euroland
Device: PocketBook 360°, BeBook (Hanlin V3), iRex DR1000S, iPad
Quote:
Originally Posted by acanthicus View Post
Hello orwell2k,

sorry if it is a silly question, but how do you import epub in BookDesigner? I tried it, but it opened only one html-file at once.
Second question: is fbreader capable of showing page breaks, empty paragraphs or basic styles, like italic, or centered paragraphs in fb2?
FBReader is not capable to show these in epub or mobi, so for me this program is unusable and I got back to using ADE , which is frustrating, too.
There's no stupid questions, only stupid people!... just kidding

But this is how I do it, and it did take a little effort to find a way that works.

(1) Extract your ePub (after 'liberating' it of DRM, if needed) to a folder using WinRAR, WinZIP, etc.

Inside you will have folders like OPS and META-INF, and probably in the OPS folder you will find a bunch of .xhtml files (probably one per chapter) and some other files like stylesheet.css and package.opf (the names may change, but the extensions will be the same: .opf, .css, .xhtml, etc.).

(2) Next join the xhtml files together using a tool like Multi HTML Converter (attached here).

The tool is self-explanatory, but basically:

(a) Click 'select the name of the first book's file' - I use the .opf file, which details what's in the ePub package, so you need to change the file type in the search window from '.html' to '.opf' then browse to either the ePub folder or the OPS folder (usually there).

(b) Once selected, enter the Author Name and Book Title

(c) Choose 'Save File As...' and the program will propose a file name based on the Book Author/Title you entered, located in the folder of the .opf file you chose. This is usually the best place for it. Choose 'Save'.

(d) Then choose 'Convert selected book from multi-html to html format'. You will get a message after a few seconds saying 'Successful conversion...' and that's it!

The combined HTML file will be in the folder you selected. It will expect to find a stylesheet.css file, so if the ePub uses another name for the css files you need to make a copy and rename it to stylesheet.css - that way when you open the file it will be styled.

The new joined HTML file probably still can't be opened directly by Book Designer, so I open it in an editor like MS Word and clean up any of the formatting (often all the text is bolded, or maybe centred, so I fix that). I don't like the Book Cleaner files in Book Designer, so I do some simple find/replace work, like em- or en-dashes with ' - ' (space-hyphen-space) - that way I can then open the file in Book Designer and do a global replace for all ' - ' with spaced en-dashes. Do a 'Save As...' and give a new file name (I add a '1' to the end - this keeps your original single-html file intact so you can revert if needed).

This new 'clean' html file can now be opened in Book Designer.

FB2 Styles:

FB2 uses some basice style types - Title, SubTitle, Para, Bold, Italics, Picture, and some others. These are defined by the FB2 schema.

Each reader handles FB2 styles in it's own way - remember, FB2 says what the files contains (text plus a style tag) not how it is displayed - that is up to your reader. But most readers allow styles to be defined by the user.

On the BeBook, there is a standard fb2.css file that 'defines' how CoolReader shows different types of text. A 'Title' will be centred, bold, font size X, and so on. Similarly for FBReader, you can define the styles you as a user want to use.

As I understand it, FBReader does not insert page breaks before chapters ('Title' style) but I believe you can detail this in a css file on your reader. Each reader and device is different, so I can't give a global 'howto' here.

I have attached two examples of fb2.css files here (fb2.css1.txt and fb2.css2.txt) - they are .txt files because .css is not allowed in an attachment. I used the fb2.css1.txt example on my BeBook with CoolReader, but both work. Just rename the file to fb2.css and place it in the appropriate place (e.g. /crengine folder on your SD card for BeBook)

But basically, I have never had a complaint about displaying FB2 books - the opposite in fact, they display in a much more reader-friendly manner than any other format, in my experience and humble opinion...
Attached Files
File Type: rar Multi_HTMl_Converter.rar (349.8 KB, 237 views)
File Type: txt fb2.css1.txt (2.5 KB, 268 views)
File Type: txt fb2.css2.txt (2.9 KB, 276 views)
orwell2k is offline   Reply With Quote