E-books and App::Pod2Epub

784 views
741 views

Published on

A lightning talk about e-book readers, formats and one way to create your own e-books in epub format.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
784
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

E-books and App::Pod2Epub

  1. 1. Cph.pm Lightn. Talks 2010-10-26 E-books and App::Pod2Epub Søren Lund (slu) soren@lund.org
  2. 2. E-book readers  Based on E-Ink technology http://en.wikipedia.org/wiki/Electronic_paper  Usually 5” or 6” screen size http://www.the-ebook-reader.com/ebook-reader-comparison.html  Ergonomics and build quality varies  Speed and memory options are important  Software (GUI) difference  Some support few others many formats http://en.wikipedia.org/wiki/Comparison_of_e-book_formats
  3. 3. BeBook Neo 6”  Good build quality and sleek looking  Fast 532 Mhz Freescale processor  Wifi and Wacom touchpanel (stylus)  No sleve or cover  Expensive (DKK 2895,-)
  4. 4. E-book formats  O'Reilly supports four primary formats http://oreilly.com/  And Pragmatic Programmers kinda agrees http://pragprog.com/  PDF (for your computer)  mobi (for Kindle, etc)  APK (for Android devices)  ePub (for iPhone, iPad, Sony, etc)
  5. 5. The wellknown: PDF  Tagged PDF's can be reflowed http://broadcast.oreilly.com/2010/01/inside-the-e-book-wars-pdf-ref.html  But not all PDF's are tagged  Big (typically 2-4 times bigger than the other formats)  Good on your computer, nice for printing  Borrow for free (8 days => DRM) on Ebib.dk http://elibrary.ebib.dk/
  6. 6. For specific devices  mobi http://en.wikipedia.org/wiki/Mobipocket  Various devices including the original Kindle  Free reader for Windows can be run on Linux using Wine.  Borrow for free (28 days => DRM) http://ebogsbibliotek.dk/  APK – for Android (haven't got one) http://en.wikipedia.org/wiki/APK_%28file_format%29
  7. 7. My favorite: ePub  Free and open e-book standard http://en.wikipedia.org/wiki/EPUB  Reflowable and resizable text  It's just a ZIP archive with .epub extension  Contents is mainly (X)HTML  Support for styling (CSS)
  8. 8. It's just a zip + (x)html slu@rabota:~/Downloads$ unzip ­t Perl_Cookbook_Second_Edition.epub Archive:  Perl_Cookbook_Second_Edition.epub     testing: mimetype                 OK     testing: META­INF/container.xml   OK     testing: OEBPS/ch04s14.html       OK     ...     testing: OEBPS/tagoreillycom20090202oreillyimages251830.gif   OK     ...     testing: OEBPS/ch07s20.html       OK     testing: OEBPS/ch10s07.html       OK No errors detected in compressed data of Perl_Cookbook_Second_Edition.epub. slu@rabota:~/Downloads$ 
  9. 9. Extracting text is simple slu@rabota:~/Downloads$ unzip ­p Perl_Cookbook_Second_Edition.epub  > OEBPS/ch10s07.html|head ­n3 <?xml version="1.0" encoding="UTF­8" standalone="no"?> <!DOCTYPE html PUBLIC "­//W3C//DTD XHTML 1.1//EN"  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>10.6. Detecting Return  Context</title><link rel="stylesheet" href="core.css" type="text/css"/><meta  name="generator" content="DocBook XSL Stylesheets V1.74.0"/></head><body><div  class="sect1" title="10.6. Detecting Return Context"><div  class="titlepage"><div><div><h1 class="title"><a id="perlckbk2­CHP­10­SECT­ 6"/>10.6. Detecting Return Context</h1></div></div></div><div class="sect2"  title="Problem"><div class="titlepage"><div><div><h2 class="title"><a  id="perlckbk2­CHP­10­SECT­6.1"/>Problem</h2></div></div></div><p><a  id="perlckbk2­CHP­10­ITERM­4546" class="indexterm"/> <a id="perlckbk2­CHP­10­ ITERM­4547" class="indexterm"/> <a id="perlckbk2­CHP­10­ITERM­4548"  class="indexterm"/> <a id="perlckbk2­CHP­10­ITERM­4549" class="indexterm"/>You  want to know in which context your function was slu@rabota:~/Downloads$ 
  10. 10. Creating e-books  Creating a ZIP archive is easy  Generating HTML is easy  From what source format?  …  Search on CPAN is even easier!
  11. 11. App::Pod2Epub  Installing cpan App::Pod2Epub  Depends on  Pod::Simple::XHTML (might need to install)  EBook::EPUB  XML::Writer  Now you can write pod2epub /usr/.../pod/perlfunc.pod ­o perlfunc.epub
  12. 12. Final thoughts  Some documentation is split in several pods (e.g. Moose::Cookbook)  pod2epub only handles one at a time  Need to look into EBook::EPUB  CPAN is your friend  Slides available at slideshare http://www.slideshare.net/slu

×