Threepress Consulting blog

Threepress creates software for publishers, educators and authors.

Geo-aware ebook demo

by Liza Daly

Geo ebook demo

We’re making the geo demo featured in the Interactivity in EPUB talk available for download under the MIT License.

About the demo

In the demo, the geolocation capability of the web browser transmits your latitude/longitude. The code then queries the Geonames database to get an English placename.

After that, the code will continually poll for your current location. If you remain still, text will be displayed to indicate that the main character is bored and waiting to set off on her adventure. When your lat/long changes, it displays new text.

What’s in the demo

This is a ZIP file bundle of the following resources:

  • The geo code itself, in JavaScript, CSS and XHTML
  • A copy of the Monocle ereader by Inventive Labs
  • A copy of geo-location-javascript, which provides a simplified API to the HTML5 geolocation feature
  • The embedded font IM Fell English Pro, converted to SVG format for use on iPads/iPhones.

The book content is in the form expected by Monocle, not EPUB, though if someone wanted to produce an EPUB version I would be happy to link to it. It should be possible to produce a valid EPUB file though very few ereaders would be able to run it.

Download the source code.

Try it now

You can also try it out in a geo-aware browser. This should work in Chrome, Firefox and Safari 5, as well as on iPads and iPhones (and probably Android), though the user interface will need to be changed to support smaller devices.

Keep in mind that if you’re on a real computer, you’ll never see the “you’ve moved” state change since your location is based on your internet service provider. Even on a mobile device, it can take quite some distance to update your position as GPS does not discriminate very finely.

On digital distractions: quote in New York Times blog

by Liza Daly

Only indirectly related to ebooks, but a familiar problem for those who now juggle multiple ereaders and mobile devices:

Article in the New York Times

I’ve got a quote further down the page:

Liza Daly comment on article in the New York Times

Read the complete quote and also try some of the associated distraction tests.

Interactivity in EPUB using JavaScript, HTML5 and CSS3: BEA/IDPF video posted

by Liza Daly

I re-recorded my talk at IDPF Digital Book as a video. Getting the audio synced properly was no fun so I apologize for a few production issues.

Here’s the executive summary of the talk:

  • You can add interactivity to an EPUB book using either the <object> or <script> elements.
  • Currently object has the best support, especially using Flash in Adobe Digital Editions.
  • The script element is specifically discouraged (though not disallowed) in EPUB 2.0.1, and no major reading system supports it. However, all browsers do!
  • The primary advantage of interactivity using script is that the content creator has the ability to manipulate every part of the ebook: all of the text, its layout, even potentially the user interface of the reading system itself. With object you can apply interactivity to just an arbitrary rectangle.
  • There is a great deal of interesting animation and even interactivity possible using CSS3, which is allowed in EPUB 2.0.1 and is supported by iBooks and other WebKit-based ereaders.
  • Interactivity is also possible using JavaScript combined with the HTML5 canvas element, though canvas is not part of EPUB 2.0.1.
  • With access to JavaScript on mobile devices, ebooks can potentially gain access to information about the reading device itself, such as the location of the reader in the physical world, or the device’s orientation, or even add photos and video from the device’s camera.
  • Any ereader that allows JavaScript provides the ability for ebooks to access live data on the web.
  • The primary blocker for extremely rich interactive ebooks is ereader support, but by embedding browser-based reading systems like Monocle, content creators can distribute such ebooks today.
  • It remains to be worked out how to handle JavaScript in larger ereading systems both safely and with proper fallbacks to non-interactive content.

I’ll also be posting some of the example files used in the tutorial in a forthcoming post.

docbook2epub updated to version 1.0.2

by Liza Daly

Our Python script to convert from DocBook to ePub using the DocBook XSL has been updated to version 1.0.2.

I’ve added some command-line options to override the location of the DocBook XSL (previously it was stuck in a settings file) and to also point to an optional CSS file.


$ db2epub.py
Usage: db2epub.py docbook1.xml [docbook2.xml]... --xsl [DocBook XSL or customization] --css [css file]

Book Expo America and IDPF Digital Book 2010

by Liza Daly

I’ll be presenting at this year’s IDPF Digital Book 2010 conference, which is attached to Book Expo America:

EPUB Enhanced, Interactive & Connected

eBook content authored in the IDPF EPUB standard is not limited to text and images. Publishers and developers are integrating into EPUB titles audio, video, animation, and a growing array of interactive educational content. This session will include updates to the EPUB standard and how readers will interact with eBooks utilized enhancements that take titles far beyond what print could ever offer.

I’ll also be around for the remainder of BEA and would be happy to meet up with people, especially other victims of the London ash-cloud who have been conference-deprived.

Tutorial on building ePubs now freely available

by Liza Daly

My tutorial Build a digital book with EPUB, posted on IBM DeveloperWorks, has been out for some time (November 2008!) but it has recently been updated with some minor corrections. It also no longer requires registration thanks to a policy change at DeveloperWorks.

EPUB Tutorial screenshot

Designing ebooks for ePub reading engines (video)

by Liza Daly

The video of my session at BookNet Canada Tech Forum is now posted over on their site (scroll down to 1pm):

BookNet Canada presentation

In the video you can enjoy the dramatic moment when the lights inexplicably dim and I think I’m being thrown off stage.

(Slides for ‘Designing ebooks for ePub reading engines’)

London Book Fair

by Liza Daly

No speaking engagements this time (whew!) but I’ll be at London Book Fair 2010 and would love to meet up with folks who want to talk ebooks.

Update April 19, 2010: Like many others, I was unable to fly to London and will not be attending LBF.

Add your own catalogs to Ibis Reader

by Keith Fahlgren

Readers are finding new things to read from an ever-expanding range of retailers, publishers, aggregators, and authors, so we’ve just released an update to Ibis Reader that allows you to customize the list of ebook catalogs you see whenever you want to Get Books.

Just click Add your own catalog at the bottom of the Get Books page and we’ll show you some catalogs we recommend that are just one click away. If you know of another catalog of ePubs in OPDS format, just use the form at the bottom to add it by file upload or point it at a URL (your Calibre library in the cloud, perhaps):

Adding new catalogs to Ibis Reader is just a few clicks away

Read the rest of this entry »

HTML5 for publishers

by Keith Fahlgren

The launch of the iPad and iBooks and the tremendous stream of one-off demos reimagining publishing have made it extremely difficult to understand what technologies for enriched content are available to publishers today. In particular, I’ve seen a lot of confusion about what HTML5 might actually mean and what specific opportunities it might bring for digital reading.

To try to shed some light on some complicated work, I’ve pieced together a very incomplete introduction to some of the new things that HTML5 and related specifications might bring (remember: they aren’t finished or implemented everywhere).

Read the rest of this entry »