開放源碼電子書與EPUB幕後排版
Upcoming SlideShare
Loading in...5
×
 

開放源碼電子書與EPUB幕後排版

on

  • 6,862 views

http://blog.lyhdev.com/2011/12/epub.html

http://blog.lyhdev.com/2011/12/epub.html

Statistics

Views

Total Views
6,862
Views on SlideShare
3,386
Embed Views
3,476

Actions

Likes
6
Downloads
43
Comments
0

8 Embeds 3,476

http://blog.lyhdev.com 3450
http://webcache.googleusercontent.com 15
http://feeds2.feedburner.com 5
http://us-w1.rockmelt.com 2
http://mail.etaiwannews.com 1
http://cache.baidu.com 1
http://www.google.com.hk 1
http://www.google.com.tw 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

開放源碼電子書與EPUB幕後排版 開放源碼電子書與EPUB幕後排版 Presentation Transcript

  • ePUB /
  • WhoLabStartupa Passionate Programmer lyhcode@gmail.com
  • Work e PLWeb , http://plweb.org/
  • Java , http://java.plweb.org/
  • Source Code
  • if (pci_read_config_byte(pdev, ET1310_PCI_EEPROM_STATUS, &eestatus)) { dev_err(&pdev->dev, "Could not read PCI config space for EEPROM Statusn"); return -EIO;}/* Determine if the error(s) we care about are present. If they are * present we need to fail. */if (eestatus & 0x4C) { int write_failed = 0; if (pdev->revision == 0x01) { int i; static const u8 eedata[4] = { 0xFE, 0x13, 0x10, 0xFF }; /* Re-write the first 4 bytes if we have an eeprom * present and the revision id is 1, this fixes the * corruption seen with 1310 B Silicon */ for (i = 0; i < 3; i++) if (eeprom_write(adapter, i, eedata[i]) < 0) write_failed = 1; } if (pdev->revision != 0x01 || write_failed) { dev_err(&pdev->dev, "Fatal EEPROM Status Error - 0x%04xn", eestatus); /* This error could mean that there was an error * reading the eeprom or that the eeprom doesnt exist. * We will treat each case the same and not try to * gather additional information that normally would * come from the eeprom, like MAC Address */ adapter->has_eeprom = 0; return -EIO; }
  • JavaJDKJar Java, http://java.com/
  • HTML5 CSS3 JavaScript Appcelerator Titanium Mobile AppAppcelerator Titanium, http://www.appcelerator.com/
  • Write once, run anywhere
  • $ make os=MACOSX$ make os=LINUX$ make os=WINDOWS$ make os=SOLARIS$ make deploy$ make money
  • SourceTree, http://www.sourcetreeapp.com/
  • <?xml version="1.0"?><package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"> <dc:title>Pride and Prejudice</dc:title> <dc:language>en</dc:language> <dc:identifier id="BookId" opf:scheme="ISBN">123456789X</dc:identifier> <dc:creator opf:file-as="Austen, Jane" opf:role="aut">Jane Austen</dc:creator></metadata><manifest> <item id="chapter1" href="chapter1.xhtml" media-type="application/xhtml+xml"/> <item id="stylesheet" href="style.css" media-type="text/css"/> <item id="ch1-pic" href="ch1-pic.png" media-type="image/png"/> <item id="myfont" href="css/myfont.otf" media-type="application/x-font-opentype"/> <item id="ncx" href="book.ncx" media-type="application/x-dtbncx+xml"/></manifest><spine toc="ncx"> <itemref idref="chapter1" /></spine><guide> <reference type="loi" title="List Of Illustrations" href="appendix.html#figures" /></guide></package>
  • <body> <div class="chapter" title="Chapter&nbsp;1.&nbsp;What Is EPUB 3?"> <div class="titlepage"> <h1 class="title"><a id="what_is_epub_3_question"></a>What Is EPUB 3?</h1> </div> <div class="sect1" title="EPUB 3 in a Nutshell"> <div class="titlepage"> <h1 class="title"><a id="epub_3_in_a_nutshell"></a>EPUB 3 in a Nutshell</h1> </div> <p>So what exactly is an EPUB? If you follow electronic publishing at all, you’veundoubtedly run into the term, but you may have seen or heard it incorrectly being usedas a synonym for “ebook”&mdash;as a shorthand for talking about <spanclass="emphasis"><em>electronic</em></span> <span class="emphasis"><em>books</em></span>. Although the two terms share a common relation in electronic bookproduction, they aren’t interchangeable. EPUB, as we’re here to discover, is a <spanclass="emphasis"><em>format</em></span> for representing documents in electronicform. “Ebook,” on the other hand, is just an abstract term used to encompass anyelectronic representation of a book, and includes formats such as PDF, HTML, ASCIItext, Word, and a host of others, in addition to EPUB.</p> O’Reilly, What Is EPUB 3 ?, http://goo.gl/X51CK
  • Sigil, http://code.google.com/p/sigil/
  • ? ?eBooks TXT, EPUB, MOBI, PDF, CHM, ...
  • Write once, read anywhere
  • $ make type=EPUB$ make type=EPUB3$ make type=MOBI$ make type=KF8 $ make publish$ make type=PDF $ make money$ make type=HTML$ make type=CHM$ make type=TXT
  • v.s. <h1>What is EPUB?</h1> <p>The most widely accepted format for ebooks today is EPUB, which is developed and maintained by the IDPF. You can find the official specification ...Elizabeth Castro, EPUB Straight to the Point
  • <h1>What is EPUB?</h1> What is EPUB?(Heading) What is EPUB? What is EPUB?
  • What is EPUB?============The most widely accepted **format** for ebooks today isEPUB, which is developed and maintained by the IDPF.Ebook Formats---------------* epub* pdf* mobi* html WYSIWYG Plain Text
  • Chapter 1. What Is EPUB 3?======================EPUB 3 in a Nutshell-----------------------------So what exactly is an EPUB? If you follow electronicpublishing at all, youʼve undoubtedly run into the term, but youmay have seen or heard it incorrectly being used as asynonym for “ebook” -- as a shorthand for talking about**electronic books**. Although the two terms share a commonrelation in electronic book production, they arenʼtinterchangeable. Sigil
  • Chapter 1. What Is EPUB 3?======================EPUB 3 in a Nutshell-----------------------------So what exactly is an EPUB? If you follow electronicpublishing at all, youʼve undoubtedly run into the term, but youmay have seen or heard it incorrectly being used as asynonym for “ebook” -- as a shorthand for talking about**electronic books**. Although the two terms share a commonrelation in electronic book production, they arenʼtinterchangeable. ?
  • 19892010
  • Chapter 1. What Is EPUB 3?==========================EPUB 3 in a Nutshell--------------------So what exactly is an EPUB? If you follow electronicpublishing at all, you’ve undoubtedly run into the term,but you may have seen or heard it incorrectly being usedas a synonym for “ebook” -- as a shorthand for talkingabout **electronic books**. Although the two terms sharea common relation in electronic book production, theyaren’t interchangeable. Chapter 1. What Is EPUB 3? ====================== EPUB 3 in a Nutshell ----------------------------- So what exactly is an EPUB? If you follow electronic publishing at all, youʼve undoubtedly run into the term, but you may have seen or heard it incorrectly being used as a synonym for “ebook” -- as a shorthand for talking about **electronic books**. Although the two terms share a common relation in electronic book production, they arenʼt interchangeable.
  • MarkdownSyntax + SoftwareText-to-HTMLeasy-to-readeasy-to-write http://daringfireball.net/projects/markdown/
  • notepag.es
  • <h1> </h1>========== <h2> </h2>------------ Markdown http://markdown.tw/ , http://goo.gl/0pBEy
  • > <blockquote>>>> </blockquote> http://markdown.tw/ , http://ce.fhl.net/desert/
  • <p> </p> <ol> <li> </li>* <li> </li>* <li> </li>* <li> </li>* <li> </li> </ol> <p> </p> <ul>1. ! <li> </li>2. ! <li> </li>3. <li> </li>4. <li> </li>5. </ul> http://markdown.tw/
  • ** <p> <strong> </** * * *** strong> <em> </em> <strong> *** <em> </em></strong> </p> <p> </p> Markdown http://markdown.tw/ , http://goo.gl/0pBEy
  • ![Cover](/path/to/img.jpg)[Plurk](http://plurk.com/)
  • mouapp.com
  • Chapter 1. What Is EPUB 3? ======================Markdown EPUB 3 in a Nutshell ----------------------------- ? So what exactly is an EPUB? If you follow electronic publishing at all,eBooks TXT, EPUB, MOBI, PDF, CHM, ...
  • +
  • Pandoc a universal document converter pandoc -f markdown -t epub source.txt -o target.epubChapter 1. What Is EPUB 3?======================EPUB 3 in a Nutshell-----------------------------So what exactly is an EPUB? If youfollow electronic publishing at all, Pandoc, http://johnmacfarlane.net/pandoc/
  • Pandoc a universal document converterpandoc -f markdown -t epub source.txt -o target.epubpandoc -f markdown -t html source.txt -o target.htmlpandoc -f markdown -t latex source.txt -o target.texxelatex target.tex Pandoc, http://johnmacfarlane.net/pandoc/
  • ePUB Markdown
  • LeanpubPublish Early, Publish Often http://leanpub.com/
  • Book as a Service Service
  • ! plain t ! plain ext pla in text text plain t ext pla plain in text ! text plain text RSS plain text plain xttext ext te t n p l a i n ext plai t e x t plain t p l a i n in text pla ...ContinuousPublishing
  • ContpubContinuous Publishingcontpub.org
  • Contpub http://contpub.org/
  • Contpub http://contpub.org/
  • Contpub http://contpub.org/
  • Dont Reinvent The Wheel http://sphinx.pocoo.org/ http://docutils.sourceforge.net/rst.html http://www.latex-project.org/ http://xmlgraphics.apache.org/fop/ http://www.tug.org/texlive/
  • But... ? EPUB3?
  • Open source projectssphinx-cooksphinx-themesSimaQianCaiLun http://github.com/contpub
  • The End