View Full Version : Building an EPUB Spotlight importer for MacOS X


cjkarr
04-09-2009, 10:52 AM
Hi. I'm the main developer of Books for Mac OS X:

http://books.aetherial.net/

I'm currently rebuilding the platform for Books 4, which will be based around EPUB documents for storing content and metadata about the items in your collection.

Recently, I began writing a Spotlight plugin for this project and I had a few questions that need clearing up before I release any public code. (Don't worry - I'll be looking for testers real soon.)

First of all, on the Mac, the system uses Universal Type Identifiers (UTIs) to keep track of the types of various files:

http://developer.apple.com/macosx/uniformtypeidentifiers.html

Is there an official UTI for EPUB documents? I searched and didn't find anything. If there isn't one, would any object to me assigning

org.idpf.epub

to EPUB documents on OS X? I ask because I'd like this plugin to be compatible with other products like Calibre and not step on anyone's toes.

Finally, the current version of the plugin indexes XHTML-based EPUB files without any problems. Are there any non-XHTML EPUB files in circulation that I should also support and test against. Is anyone doing anything with PDF-based EPUB? This probably sounds silly, but I thought that I should ask.

Thanks in advance!

pilotbob
04-09-2009, 10:54 AM
Are there any non-XHTML EPUB files in circulation that I should also support and test against. Is anyone doing anything with PDF-based EPUB? This probably sounds silly, but I thought that I should ask.

Thanks in advance!

The ePub standard is XHTML. I don't think you would/should find otherwise.

PDF is NOT ePub... so I don't understand your question.

BOb

cjkarr
04-09-2009, 10:58 AM
I should have been a bit clearer in my writing.

While this Spotlight plugin mainly targets EPUB documents, it's actually a more general OCF reader:

http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm

To be more precise in my question, are there any other OCF documents floating around that do not use XHTML?

Thanks for prompting the clarification.

pdurrant
04-09-2009, 11:22 AM
Is there an official UTI for EPUB documents? I searched and didn't find anything. If there isn't one, would any object to me assigning

org.idpf.epub

to EPUB documents on OS X? I ask because I'd like this plugin to be compatible with other products like Calibre and not step on anyone's toes.


If you decide to assign your own UTI (i.e. declare the definition for export) you shouldn't use a reverse domain name that doesn't belong to you, unless you have permission. Perhaps ask the idpf if they'd mind?

I've certainly found it inconvenient that there's no standard UTI for Mobipocket files on Mac OS X. In the end, I exported one based on my own domain name from my Quick Look plugin

cjkarr
04-09-2009, 11:42 AM
If you decide to assign your own UTI (i.e. declare the definition for export) you shouldn't use a reverse domain name that doesn't belong to you, unless you have permission. Perhaps ask the idpf if they'd mind?

The letter is in the (electronic) mail. Thanks for the suggestion.

kovidgoyal
04-09-2009, 11:52 AM
EPUB supports DTBook markup as well as XHTML, but I'm not aware of anyone actually using DTBook

cjkarr
04-09-2009, 11:57 AM
EPUB supports DTBook markup as well as XHTML, but I'm not aware of anyone actually using DTBook

Out of curiosity, have you run into this UTI issue in Calibre? I took a look at the package earlier today, but didn't see anything about it in your OS X package.

kovidgoyal
04-09-2009, 11:58 AM
Out of curiosity, have you run into this UTI issue in Calibre? I took a look at the package earlier today, but didn't see anything about it in your OS X package.

No, I haven't. Being cross platform, calibre generally keeps interaction with the OS to a minimum.

setzer
04-16-2009, 03:54 AM
i donno if i really understand what ur question is about :D
but me is often using PDFs in some ePub-Books
e.g. for the copyright-page or for some ads in the end of a book

so... donno if it's useful to u ;)

greetz