Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build your EPUB's with Eclipse

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Build your EPUB's with Eclipse

Avatar for Torkild U. Resheim

Torkild U. Resheim

October 27, 2011

More Decks by Torkild U. Resheim

Other Decks in Programming

Transcript

  1. Build your EPUBs with Eclipse ...and read them too By

    Torkild Ulvøy Resheim Senior Software Engineer Itema as, Trondheim, Norway
  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. 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. 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). • No natural reading order. Eclipse SDK 1.0 Help Quite a few pages (2001)
  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. • Feels natural – there is a beginning and an end. Pro Git 813 pages (2011)
  6. Benefits of EPUB • Open and free, based on existing

    standards – CSS, 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. • Rich Content (video and audio). Replace with video of rich media: video and out-of-line content?
  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. New tooling for Eclipse • API for defining, reading and

    writing EPUBs. Model represented using EMF. • Apache Ant task for defining and writing EPUBs. • UI for generating EPUBs from wiki markup format. • Supports EPUB 2.0.1 (3.0 was released in October). • Part of the Mylyn Docs project. • Will be released 24. February (Mylyn 3.7/Indigo SR2)
  9. Tooling features • Supports most EPUB 2.0.1 features. (Not DRM).

    • Table of contents can be generated automatically. • Referenced resources (images, out-of-line content) can be added automatically. • Cover page (compatible with most readers) easily created. • Validation of EPUB content and structure. • Allows multiple publications within one EPUB. • Does not do any data conversion.
  10. The API (provisional) • The data model (OCF, OPF, NCX,

    Dublin Core) is built on EMF. • Utility methods for retrieving content by identifier, type, reference etc. • Supports reading and writing of EPUBs. public void createEPUB() throws Exception { EPUB epub = new EPUB(); OPSPublication oebps = new OPS2Publication(); oebps.addTitle(null, null, "My title"); oebps.addLanguage(null, "en"); oebps.addSubject(null, null, "My subject"); oebps.addItem(new File("My XHTML file")); epub.add(oebps); epub.pack(new File("My new EPUB.epub")); }
  11. The Ant task • Structure resembles the OPF structure. •

    Supports filesets for adding non-spine resources. • Items are analysed for content so that correct MIME types are used. • Makes some tasks, such as adding a cover page much easier. • Can be combined with existing documentation generation schemes. Markup HTML HTML EPUB EclipseHelp
  12. 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 https://github.com/turesheim/ org.eclipse.mylyn.docs • Contact: [email protected] • More at http://torkildr.blogspot.com/search/label/eBook