View Full Version : Free epub creation tool: eCub


Julian Smart
12-04-2008, 03:17 PM
A new free application for creating simple e-books:

http://www.juliansmart.com/ecub

eCub is a cross-platform tool for creating EPUB and MobiPocket books. It offers a convenient way to import text and XHTML files and create all the necessary components of an EPUB file. It also makes it easy to view and edit files, and check the generated EPUB, using external tools.

A wizard allows you to create a new project in seconds, with options for generating a table of contents, a cover page, and a title page. You can create a simple cover design image using templates and a basic design tool. Then you can compile, check and try out the EPUB at the click of a button.

To summarize, this is what eCub does:

* Creates unencrypted EPUB files from text or XHTML files;
* Creates MobiPocket files if you have the mobigen application;
* allows editing of the text or XHTML files with a simple internal editor or designated external editors;
* helps you create a simple cover design image;
* optionally creates title, content and cover pages;
* can be run from the command line as part of a build script;
* can be used in portable mode (data and settings are stored locally).

eCub is available for Windows, Mac, Linux, FreeBSD and Solaris x86.

All feedback welcome - this is an initial release.

Julian Smart

zelda_pinwheel
12-04-2008, 03:34 PM
hi Julian, i've stuck this thread. thanks so much for this tool ; i think one of the things stopping more people from making epub is the lack of a simple offline creation tool. perhaps this is the answer every one is waiting for. i will definitely take a look myself.

cheers !

kovidgoyal
12-04-2008, 03:47 PM
Why aren't you open sourcing it?

Julian Smart
12-04-2008, 04:15 PM
Why not open source - there are a few bits and pieces from our other commercial apps in the source, plus open-sourcing implies a level of admin (and loss of control) which I'm not keen on right now. It's not that I'm not a fan of open source (see my wxWidgets work), it's just not appropriate for everything.

kovidgoyal
12-04-2008, 04:31 PM
Why not open source - there are a few bits and pieces from our other commercial apps in the source,


That, I get.


plus open-sourcing implies a level of admin (and loss of control) which I'm not keen on right now.

That, I don't. In any case, having a closed source app is better than having none at all :) Does the epub creator respect the html and img size limits for the PRS 505/700?

KindleDude
12-04-2008, 04:37 PM
I'm happy that there's a Mac version...I'm going to try it with the story I'm working on.

Julian Smart
12-04-2008, 05:43 PM
That, I get.



That, I don't. In any case, having a closed source app is better than having none at all :) Does the epub creator respect the html and img size limits for the PRS 505/700?

Hi,

Ah - no, it doesn't do anything special to most images (they're just imported into the project); eCub only creates a cover image and that has a user settable size. Still, this is just the first version - no doubt I'll learn a lot more about reader constraints etc. in due course!

Thanks,

Julian

kovidgoyal
12-04-2008, 06:55 PM
Have a look at the tool epubpreflight, it checks for a few of the known device constraints.

DaleDe
12-04-2008, 07:39 PM
wiki page created for eCub.

Julian Smart
12-05-2008, 04:49 AM
Have a look at the tool epubpreflight, it checks for a few of the known device constraints.

Sounds good, I'll check it out a.s.a.p.

Thanks!

Jellby
12-05-2008, 02:45 PM
* helps you create a simple cover design image;


How do you include the cover image in the ePUB file? I mean, how is it marked up in the .opf file or whatever? Do readers (e.g. the Sony ones) display the covers in thumbnail view?

I seem understand there's no real standard way to include covers in ePUB, but I'm interested in some sort of work-around or de facto standard that would work often at least.

Julian Smart
12-05-2008, 04:29 PM
How do you include the cover image in the ePUB file? I mean, how is it marked up in the .opf file or whatever? Do readers (e.g. the Sony ones) display the covers in thumbnail view?

I seem understand there's no real standard way to include covers in ePUB, but I'm interested in some sort of work-around or de facto standard that would work often at least.

Hi,

I just followed this spec:

http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen&File=cover.htm

and the covers display OK on Mobipocket Reader and Adobe Digital Editions. However I don't have a real e-book reader to try it on yet...

Julian

llasram
12-05-2008, 04:36 PM
How do you include the cover image in the ePUB file? I mean, how is it marked up in the .opf file or whatever? Do readers (e.g. the Sony ones) display the covers in thumbnail view?

I seem understand there's no real standard way to include covers in ePUB, but I'm interested in some sort of work-around or de facto standard that would work often at least.

The "standard" way is to simply have the "cover" be the first page in the markup stream. Adobe's "EPUB Best Practices Guide" recommends using an SVG image set to scale to fill the display, with no margins (either through CSS body/@page or the Adobe-extension page master stylesheet), which certainly works and looks good in AdobeDE on both the desktop and the PRS-505/700.

For specifying a raster "cover image," Mobipocket suggests (http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen&File=cover.htm) having a metadata/meta element with a @name of "cover" and a @content of the manifest/item/@id of your cover image. I'm not sure who else does anything with that, but the DRM-free EPUB books I bought from HarperCollins UK do it too.

HTH.

Jellby
12-05-2008, 04:49 PM
I just followed this spec:

So... no need to add:

<spine toc="ncx">
<itemref idref="Cover" linear="no" />
...
</spine>


(where "Cover" is the id of an xhtml-wrap for the cover image)

or:

<guide>
<reference type="cover" href="images/Cover.png"></reference>
...
</guide>


? (this is all a question)

The "standard" way is to simply have the "cover" be the first page in the markup stream.

What do you mean "the markup stream"? The first zipped file after "mimetype"? The first entry in the <spine>?

I think I used the markup suggested in the page both of you linked, in my test file (http://www.mobileread.com/forums/showthread.php?t=32036), could you try it and tell me whether it's working as it should?

PS. Sorry I didn't intend to hijack the thread, you can reply by PM...

llasram
12-05-2008, 05:59 PM
What do you mean "the markup stream"? The first zipped file after "mimetype"? The first entry in the <spine>?

The latter, just the first spine/itemref.

I think I used the markup suggested in the page both of you linked, in my test file (http://www.mobileread.com/forums/showthread.php?t=32036), could you try it and tell me whether it's working as it should?

It certainly does work, although Iíd suggest a few changes:


Definitely incorrect is that your guide/reference[@type="cover"] @href should refer to "Cover.xhtml" instead of the cover raster image. The OPS states that "each reference must have an href attribute referring to an OPS Content Document included in the manifest."
Iím not sure the @id="Cover" itemref should be @linear="no". AdobeDE ignores the @linear attribute when rendering the linear reading-order, but another system could use it and consider the first page of the first @linear="yes" content-stream as the "cover." Certainly all the books Iíve looked at have the cover as (an implied) @linear="yes".
You might try making the content of Cover.xhtml be an SVG encapsulation of the cover image, which will allow the image to fill the first whole "page" in SVG-supporting reading systems (which according to the spec should be all of them, but hey...). Check out the Adobe EPUB Best Practices Guide (http://www.adobe.com/devnet/digitalpublishing/epubs/EPUBBestPractices-1_0_3.epub) for an example.
You may want to consider not having @id attributes distinguished only by case. Not that itís wrong Ė just confusing. :-)

Jellby
12-06-2008, 05:30 AM
Definitely incorrect is that your guide/reference[@type="cover"] @href should refer to "Cover.xhtml" instead of the cover raster image. The OPS states that "each reference must have an href attribute referring to an OPS Content Document included in the manifest."

I’m not sure the @id="Cover" itemref should be @linear="no". AdobeDE ignores the @linear attribute when rendering the linear reading-order, but another system could use it and consider the first page of the first @linear="yes" content-stream as the "cover." Certainly all the books I’ve looked at have the cover as (an implied) @linear="yes".

Well, I hoped the link in the guide could be directly to the image file... at least epubcheck didn't complain about that, but it did complain if I did the same in the <spine> (and that's why I added the xhtml wrapper, with just the case change in the id attribute :D ).

As for the linear="no", that's what the mobipocket document recommends. I sort of hope that complying systems would honour the <meta name="cover"> element and ignore the linear="no" element in the spine, while others would do the opposite.

You might try making the content of Cover.xhtml be an SVG encapsulation of the cover image, which will allow the image to fill the first whole "page" in SVG-supporting reading systems (which according to the spec should be all of them, but hey...). Check out the Adobe EPUB Best Practices Guide (http://www.adobe.com/devnet/digitalpublishing/epubs/EPUBBestPractices-1_0_3.epub) for an example.

I may try that, thanks. But I'm not sure I'd want small cover images to be stretched to fill the whole page, if that's what it does...

JSWolf
12-06-2008, 10:24 AM
Is there a possibility that eCub is going to be made to follow the standards for mobile DE so the ePub it generates will be fully compatible?

llasram
12-06-2008, 01:31 PM
As for the linear="no", that's what the mobipocket document recommends. I sort of hope that complying systems would honour the <meta name="cover"> element and ignore the linear="no" element in the spine, while others would do the opposite.

Hmm. I'm going to go out on a limb and say that Mobipocket is the one in the wrong here. The the Mobipocket pages gives the following result to marking the HTML cover as @linear="no" (and following their other syntax): "This makes sure that the user reading the book normally from the beginning does not see the cover twice."

What that means it that they are deforming the linear content flow by pre-inserting the cover, which is incorrect. I can see the usefulness of having a "cover image" for things like generating a cover thumbnail, but they shouldn't be randomly inserting it into the document flow. Shenanigans, I say!

Falbe Publishing
12-06-2008, 03:07 PM
I'll check out this tool when I get a chance. Thanks.

Julian Smart
12-07-2008, 03:50 AM
Is there a possibility that eCub is going to be made to follow the standards for mobile DE so the ePub it generates will be fully compatible?

Hi,

I'll definitely try to make it standards-compliant within the scope of the tool (i.e. given it's not a fancy HTML editor).

Forgive my ignorance but what's mobile DE?

Thanks,

Julian

Julian Smart
12-07-2008, 09:51 AM
Hi,

I'll definitely try to make it standards-compliant within the scope of the tool (i.e. given it's not a fancy HTML editor).

Forgive my ignorance but what's mobile DE?

Thanks,

Julian

Ah, mobile Digital Editions? I can only see the Sony Reader being mentioned as supported by Digital Editions on the Adobe site, but I'll keep an eye on PR505 and other readers' requirements - in the next release of eCub I'll add integration of the epubpreflight checker so it'll be apparent if (some) constraints have been violated.

Julian

Timoleon
12-07-2008, 07:50 PM
Hi Julian,

Thanks for your software! Two questions, however:

1) Using your wizard, jpeg images used for the cover don't seem to scale properly on the first page (cover page?) of the book (way too big!); however, the thumbnails look fine on the library page, and the text itself is fine.

2) I used the Sony Library to add the epub to my PR505, but the reader refuses to open it and gives a generic error message.

Any ideas on what it going awry?

Thanks,
Tim :thanks:

Julian Smart
12-08-2008, 04:29 AM
Hi Julian,

Thanks for your software! Two questions, however:

1) Using your wizard, jpeg images used for the cover don't seem to scale properly on the first page (cover page?) of the book (way too big!); however, the thumbnails look fine on the library page, and the text itself is fine.

2) I used the Sony Library to add the epub to my PR505, but the reader refuses to open it and gives a generic error message.

Any ideas on what it going awry?

Thanks,
Tim :thanks:

Hi Tim,

1) All I'm doing in the cover page is scaling the image width to 100% (this can be switched off from the Project Properties/Options page). Perhaps there's a better way of scaling the image?

2) Sorry, alas I don't know what the PR505 issue could be - I don't yet have a Sony Reader (holding out for the new version!) If I did have one then I'd probably start with a simple .epub that worked with the PR505 and gradually replace files with the ones generated by eCub... it's possible I'm doing something wrong with the OPF, but files work OK with MobiPocket and Digital Editions, and epubchecker gives it the OK too. Mysterious...

Julian

igorsk
12-08-2008, 06:33 AM
You can also check the book info dialog in Digital Editions - if it shows any warnings, the book will likely be not readable on Sony Reader.

astra
12-08-2008, 07:12 AM
2) Sorry, alas I don't know what the PR505 issue could be - I don't yet have a Sony Reader (holding out for the new version!) If I did have one then I'd probably start with a simple .epub that worked with the PR505 and gradually replace files with the ones generated by eCub... it's possible I'm doing something wrong with the OPF, but files work OK with MobiPocket and Digital Editions, and epubchecker gives it the OK too. Mysterious...

Julian

I believe you can install eBook Library software and test epub there?(for Sony Reader PRS-505 issues)

llasram
12-08-2008, 09:56 AM
2) Sorry, alas I don't know what the PR505 issue could be - I don't yet have a Sony Reader (holding out for the new version!)

The issue the OP described is almost certainly a result of having a single XHTML markup stream greater than 100k compressed / 300k uncompressed.

Julian Smart
02-08-2009, 01:48 PM
Hi,

Just to say I've uploaded a new version of the eCub epub creation tool, with finer control of metadata and a few other small features and bug fixes.

Download eCub 1.04 from here:

http://www.juliansmart.com/ecub

Regards,

Julian

Julian Smart
02-13-2009, 01:26 PM
Hi,

I've added WAV/MP3 creation from HTML content using the free eSpeak text-to-speech generator and LAME MP3 encoder. See:

http://www.juliansmart.com/ecub

Obviously it's not going to beat a human reader, but it may be useful in some circumstances, for example if you want to read a document while you're on the move. It's a bit of fun anyway...

Regards,

Julian

nalioth
03-17-2009, 01:37 AM
Hello

I am trying to get ecub to output mobipocket format ebooks, but get this error:

The mobigen command was empty. MobiPocket file not generated.

I have mobigen_linux in /usr/local/bin and symlinked as mobigen to /usr/bin and /usr/share/ecub [with the ecub binary].

Any ideas?

ETA: Well, nothing like showing yourself an idiot with your 2nd post :p

I've been spoiled by the *nix command line, but finally had a look at the prefs. After telling it where to look, it works fine now.

Thank you, Mr. Smart for ecub.

gwynevans
04-07-2009, 10:14 AM
One for Julian: Have you considered having eCub be able to create a project file & sources from an ePub file?

Julian Smart
04-10-2009, 03:41 AM
One for Julian: Have you considered having eCub be able to create a project file & sources from an ePub file?

Hi,

Yes, you can do that by opting to import from an existing file in the New Project wizard (from 1.03). Hope that helps!

Regards,

Julian

gwynevans
04-10-2009, 06:18 AM
Ah, yes, I see...

Mind you, to get there, you've got to have entered values for title, author & identifier, then project location & ePub filename - If you do any more development on it, might it be worth adding the option to open an ePub & auto-fill those values?

Julian Smart
04-10-2009, 12:11 PM
Ah, yes, I see...

Mind you, to get there, you've got to have entered values for title, author & identifier, then project location & ePub filename - If you do any more development on it, might it be worth adding the option to open an ePub & auto-fill those values?

Good point - I'll keep that in mind for the next version.

Thanks!

Lord KiRon
04-12-2009, 08:26 AM
Great tool, it covers 1st part of the need for EPUB creatotion tool. However the 2nd part is still remains unaddressed.
I mean actual editing of the text.
I know there are many tools to edit HTML but that's not called "one simple tool". What needed is ability to edit HTML , and may be even run some kind of scripts.
Many books created out of OCR software where you have DOC or text PDF as a result but you want to do more and you want to do it in same application you create it.
Hope at some point you will be able to add this as well.

nathanb
09-13-2009, 11:05 AM
Is it possible to create a hyperlinked Table of Contents with eCub?

I am new to all of this so I really don't know what I am doing, just trying to figure it out by myself. I want to create a Table of Contents in a file but one that actually works, that will take you to the chapter. Is that possible with eCub?

Thanks,

Nathan

Julian Smart
09-18-2009, 08:18 AM
Is it possible to create a hyperlinked Table of Contents with eCub?

I am new to all of this so I really don't know what I am doing, just trying to figure it out by myself. I want to create a Table of Contents in a file but one that actually works, that will take you to the chapter. Is that possible with eCub?

Thanks,

Nathan

Hi Nathan,

Yes, eCub generates a simple table of contents with links to the chapters.

Currently it only generates one entry per file, and not multiple entries and links within a file, so you need to have one file per chapter (or other kind of section) in your book.

Julian

brewt
09-23-2009, 08:28 PM
Say, this isn't too bad.

But:

I've got a fileset that I've converted with MobiCreator, and one with Ecub (for Mobi). The Ecub.mobi is double in size of the mobicreator.mobi file. Is there a compression option in ecobu (like in Creator)?

And:

When I make an epub, the epub seems to be structurally sound in both ADE and calibre, but the text is all invisible in ade - what did I do wrong? (and don't say OMG you used WORD???). (yeah, I did.)

Also:

If I am importing my Word-created htm file, what's the "right" unicode encoding I should be saving the file in, so it won't argue with me, and appear right, etc?



Groovy stuff, btw.
-bjc

Julian Smart
09-25-2009, 04:02 AM
Hi,

Say, this isn't too bad.

But:

I've got a fileset that I've converted with MobiCreator, and one with Ecub (for Mobi). The Ecub.mobi is double in size of the mobicreator.mobi file. Is there a compression option in ecobu (like in Creator)?

And:

When I make an epub, the epub seems to be structurally sound in both ADE and calibre, but the text is all invisible in ade - what did I do wrong? (and don't say OMG you used WORD???). (yeah, I did.)

Also:

If I am importing my Word-created htm file, what's the "right" unicode encoding I should be saving the file in, so it won't argue with me, and appear right, etc?



Groovy stuff, btw.
-bjc

The increased file size might be because eCub is including all images in the project folder - you need to keep working files that shouldn't be included out of that folder (probably I should change the way that works). There's no compression option in eCub for the .mobi, but I see that if you add -c2 (the Mobipocket huffdic compression option) to the command line in Preferences/Helpers/MobiPocket compiler, it reduces the size considerably.

You might also check if there's unnecessary stuff, e.g. in the .epub since it's just a zip file. You may need to change the extension to .zip for an unzip app to recognize it; the OPS folder may have extraneous content which could be eliminated by removing the files from the project folder. Or you can just check the build/OPS folder that eCub creates under the project folder.

Without seeing the HTML, I'm not sure what could be causing the invisible text... strange.

The best encoding to choose is probably UTF-8, which is the default for eCub.

Regards,

Julian

Juliette
09-27-2009, 07:47 AM
I'm going to test it asap. Thank you :)

brewt
09-29-2009, 11:17 AM
Atatched is a file set made with ecub this morning with all the basic stuff:

The html file (utf-8 encoded)
Text file for grins
All the files ecub made, including the epub output and the mobi output.

Funny thing: In Calibre Reader and Mobipocket Desktop Reader, everything looks basically fine.

But on ADE 1.7.1085 (at least mine), the epub is blank as far as the htm file is concerned. The text doc and the toc show up ok.

Ideas?

-bjc

cmbs
09-30-2009, 11:53 AM
The test and toc show up ok? Those are the only html pages you have in the epub. They display fine for me in adobe digital editions. I don't understand what html you think isn't displaying correctly.

brewt
09-30-2009, 03:08 PM
rotten nowhere-near-big-enough-monitor.

Attached are 2 shots of the display of the Basic Set file(s) produced with Ecub from the same fileset.

Mobi-Calibre.jpg shows the file opened to the first chapter, "normal normal normal normal", and it all shows up fine in both the epub and the mobi version(s).
Ade.jpg shows the same epub file (that calibre had open) to the same page Calibre did, and it seems to be all blank-like to me.

Obviously, something went whoinky with the file render that made it seem blank on that page in ADE, but not Calibre, or mobi.

So What'd I Do?

-bjc

cmbs
09-30-2009, 06:27 PM
The ebkproj file you included is not the one you used to create the epub you included, so that makes it confusing and hard to figure out what you may have done.

When I make the three html files in your epub valid utf-8 xhtml and create a new ebkproj and make an epub with them, it works. ePub and ebkproj files are attached.

It's a lot easier for me to make a good epub from scratch than to try and figure out what you did wrong. I suggest you start with valid html and make the epub and use epubcheck and correct any errors it finds.

If you're still having problems, check the options (edit -> options) you're choosing. I don't use all those options you've got checked, I just make an epub, and I usually have it make a guide, but I didn't in this case. I did let it generate the style sheet, but I usually write my own.

You've checked the option to make a cover, but you didn't use the cover dialogue to actually make the cover, and I think that may be one problem.

You've also got the option to make a guide checked, but you haven't actually made the guide in the files dialogue. (you've got to highlight the html page and select a "guide type".)

I don't have mobigen on my computer so I can't use ecub to make mobi files so I don't know if that part might be giving you trouble.

Try starting from scratch, valid html files, uncheck most options and just make the epub. Correct all errors found by epubcheck. Then if you want the other options, add them one at a time and that will let you find which one is creating the problem.

Good luck.

JMCornwell
04-21-2011, 01:03 PM
I don't know if this is the right place to ask, but how do you fix parsing errors in epub that has already gone through Meatgrinder? Since ePub is not right, I can't get my book through to the Apple store. Any advice would be helpful.

JSWolf
04-21-2011, 09:31 PM
I don't know if this is the right place to ask, but how do you fix parsing errors in epub that has already gone through Meatgrinder? Since ePub is not right, I can't get my book through to the Apple store. Any advice would be helpful.

Could you fix it up yourself and send it to Apple directly? Don't they have a way of self publishing?