User:Andre Castro/2.1/research-experiments-log
Experiment's Log
One experiment per day
03.10.2012
Sharing my digital library
Steps
- put my calibre ebook library on machine online for 24h
- start calibre content server
$ calibre-server
which point to my Calibre-library, and uses port machine_ip:8080
- check library remotely
Problem!! Calibre library is only accessible on the local LAN where I am at. http://www.mobileread.com/forums/showthread.php?t=160387
- in order to access the library remotely I have to have calibre installed on a server.
- calibre server on a LAN becomes a bit redundant, perhaps is handy for grabbing the books to ereaders and exchange them with people that are near one (on the same LAN), but one cannot say is yet a strong strategy for sharing books with someone in another part of the world.
04.10.2012
opening and modifying and epub
Too much talk about ebooks, witout actually looking at the insides of one. That's what I will do, will and create a new one with a section of the original.
- choose a book: Japanese Fairy Tales by Yei Theodora Ozaki
dissecting the epub
unzip the epub: there are 2 directories;
A) 4018/ - content dir
A.1) html ,css - html content and style
A.2) content.opf - Open Packaging Format metadata file (can be called anything, but content.opf is the convention) - specifies the location of all the contents in the book + the metadata (in xml)< br/>
A.2.1) metadata: required terms:title and identifier(the identifier must be a unique value, although it's up to the digital book creator to define that unique value)
A.2.2) manifest: all the content files par of the book
A.2.3) spine: indicates the order files they appear in the ebook - but not extraneous (like begging and end)
A.2.4) guide: (not required) explains what each section means
A.3) toc.ncx - The NCX defines the table of contents, but also metadata (overlaps w/ content.opf)
A.3.1) metadata- requires:
- uid: unique ID for the digital book. Should match the dc:identifier in the OPF file.
- depth: the level of the hierarchy in the table of contents
- totalPageCount and maxPageNumber: only to paper books and can be left at 0.
A.3.2) navMap: contains the navPoints
A.3.2.1) navPoint:
- playOrder - reading order. (same as itemref elements in the OPF spine).
- navLabel/text describes the title of this book section, a chapter title or number
- content src attribute points to content file. (a file declared in the OPF manifest). (can also point to anchors within XHTML eg: content.html#footnote1.)
A.4)and cover;
B) META-INF/container.xml (pointing to content.opf) - EPUB reading systems will look for this file first, as it points to the location of the metadata for the digital book.
B.2) META-INF can contain file such as digital signatures, encryption, and DRM
C) ./mimetype - file containing 'application/epub+zip'
packaging the epub into an epub+zip file
- create the new ZIP archive and add the mimetype file (no compression)
$ zip -0Xq my-book.epub mimetype
- add the remaining items
$ zip -Xr9Dq my-book.epub *
-X and -D minimize extraneous information in the .zip file; -r adds files from dirs 9? q?
Conclusion
- in the epub the text overlaps heavily, maybe because I didn't add a font size to the css;
- however in a kindle looks fine, probably because kindle is imposing its font on the text - 'If you are publishing to Kindle it forces your font into it's own custom font so it doesn't matter'
- however the whole process was simple, although writing the .opf and .ncx without no automantion process its a pain (but important to understand the epub's structure).
[File:My_Lord_Bag_of_Rice_[EPUB]_070.png]
resources
http://www.ibm.com/developerworks/xml/tutorials/x-epubtut/index.html
things to try
- svg in epub: experiment w/ image animations