Build your EPUBs with Eclipse, and read them too


Published on

EclipseCon Europe 2011 short talk:

EPUB is rapidly becoming a preferred format for electronic publications and is thus supported by many reading systems; from desktop applications to handheld devices such as Android or iOS driven ones. The newest specifications which allows very rich publications is bound to make the format even more popular. EPUB is now used for everything from romantic novels to highly technical content. Maybe even for your next user guide?

Assembling EPU files correctly is a fairly complex task. It sometimes involves deep knowledge of the specification, even when using currently available authoring software. This process has become much easier with new tooling for Eclipse which will be presented and demonstrated. It will also be shown how publications of this format can be read from within your Eclipse based IDE.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Build your EPUBs with Eclipse, and read them too

  1. 1. Build your EPUBs with Eclipse ...and read them too By Torkild Ulvøy Resheim Senior Software Engineer Itema as, Trondheim, Norway
  2. 2. The stort story• EPUB is a open and free format for electronic books.• Most non-Kindle devices support it.• Increasingly popular for technical literature and user guides.
  3. 3. Traditional user guides• Users are able to add bookmarks and notes.• Big (heavy) tomes.• But still portable.• There is a natural reading order. DataFlex 2.2 User’s Manual 453 pages (1986)
  4. 4. Contemporary user guides• User are often allowed to add bookmarks.• Not portable. Sometimes embedded in the application.• Plain HTML with a few extras.• Sometimes only online.• Context help (good). Eclipse SDK 1.0 Help Quite a few pages (2001)• No natural reading order.
  5. 5. Your next user guide?• eBooks are increasingly popular!• Add bookmarks and notes.• Very portable, carry hundreds or thousands of books on one device.• Synchronisation between reading systems. Pro Git• Feels natural – there is a 813 pages (2011) beginning and an end.
  6. 6. Benefits of EPUB• Open and free, based on • Rich Content (video and existing standards – CSS, audio). XHTML, SVG...• Out-of-line content.• Allows DRM if required.• A large number of existing reading systems• EPUB3 allows JavaScript, HTML5, CSS3, MathML, Video and more.
  7. 7. How to build an EPUB • Export from Pages, Adobe Digital Editions, Indesign etc. • ePubtools, various command line tools (requires Python). • Online tools, Feedbooks and BookGlutton. • Sigil the WYSIWYG EPUB editor. • GUI apps Stanza and Calibre can convert from other formats.
  8. 8. New tooling for Eclipse• API for defining, reading and • Part of the Mylyn Docs writing EPUBs. Model project. represented using EMF. • Will be released 24. February• Apache Ant task for defining (Mylyn 3.7/Indigo SR2) and writing EPUBs.• UI for generating EPUBs from wiki markup format.• Supports EPUB 2.0.1 (3.0 was released in October).
  9. 9. Tooling features• Supports most EPUB 2.0.1 • Validation of EPUB content features. (Not DRM). and structure.• Table of contents can be • Allows multiple publications generated automatically. within one EPUB.• Referenced resources • Does not do any data (images, out-of-line content) conversion. can be added automatically.• Cover page (compatible with most readers) easily created.
  10. 10. The API (provisional)• The data model (OCF, OPF, NCX, Dublin Core) is built on EMF. public void createEPUB() throws Exception { EPUB epub = new EPUB(); OPSPublication oebps = new OPS2Publication(); oebps.addTitle(null, null, "My title");• Utility methods for retrieving oebps.addLanguage(null, "en"); oebps.addSubject(null, null, "My subject"); content by identifier, type, oebps.addItem(new File("My XHTML file")); epub.add(oebps); reference etc. epub.pack(new File("My new EPUB.epub")); }• Supports reading and writing of EPUBs.
  11. 11. Demo: UI Command Quickly generate EPUB from wiki markup
  12. 12. The Ant task• Structure resembles the OPF • Can be combined with structure. existing documentation generation schemes.• Supports filesets for adding non-spine resources. Markup HTML• Items are analysed for content so that correct MIME types are used. HTML• Makes some tasks, such as adding a cover page much easier. EPUB EclipseHelp
  13. 13. Demo: Ant taskSame source for Eclipse help and EPUB
  14. 14. In the pipeline...• EPUB reader and library manager inside Eclipse.• Support for EPUB 3.
  15. 15. Summary• EPUB is an excellent format for user guides!• Can be built in various (hard) ways. But new tooling makes it easier.• Coming to Eclipse in February.• Currently at• See
  16. 16. Apropos...• Thanks to Steffen Pingel and David Green of the Mylyn team for helping out!• Any questions?