<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Threepress Consulting blog &#187; bookworm</title>
	<atom:link href="http://blog.threepress.org/category/bookworm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.threepress.org</link>
	<description>Threepress creates software for publishers, educators and authors.</description>
	<lastBuildDate>Tue, 27 Jul 2010 16:34:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Languages in real-world ePubs</title>
		<link>http://blog.threepress.org/2010/03/19/languages-in-real-world-epubs/</link>
		<comments>http://blog.threepress.org/2010/03/19/languages-in-real-world-epubs/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 14:00:42 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1309</guid>
		<description><![CDATA[We were curious about the distribution of languages for ePubs on Bookworm (Ibis Reader doesn&#8217;t yet have enough titles to be representative yet.)
The following information is derived from the dc:language field in the OPF file.
Here&#8217;s the chart:


Missing from the chart, of course, is English.  It&#8217;s so overrepresented it skews the chart to the point [...]]]></description>
			<content:encoded><![CDATA[<p>We were curious about the distribution of languages for ePubs on <a href="http://bookworm.oreilly.com/">Bookworm</a> (<a href="http://ibisreader.com/">Ibis Reader</a> doesn&#8217;t yet have enough titles to be representative yet.)</p>
<p>The following information is derived from the <code>dc:language</code> field in the OPF file.</p>
<p>Here&#8217;s the chart:<br />
<span id="more-1309"></span></p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-6.32.12-PM.png"><img src="http://blog.threepress.org/wp-content/uploads/2010/03/Screen-shot-2010-03-16-at-6.32.12-PM.png" alt="" title="Screen shot 2010-03-16 at 6.32.12 PM" width="469" height="998" class="aligncenter size-full wp-image-1311" /></a></p>
<p>Missing from the chart, of course, is English.  It&#8217;s so overrepresented it skews the chart to the point of being unreadable.  </p>
<p>Of the 62,000 epubs on Bookworm right now:</p>
<ul>
<li> 29,642 have no language value </li>
<li> A little over 20,000 are English (combining various values like &#8220;en&#8221;, &#8220;en-GB&#8221;, or &#8212; embarrassingly &#8212; &#8220;American&#8221;) </li>
<li> The remainder, 5,874, are distributed among all other languages</li>
<li>Almost half of the values are represented just one time (likely bad data)</li>
</ul>
<p>I found it very interesting that the most represented non-English language code is cs &#8212; Czech &#8212; by a huge margin.  Any ideas why? </p>
<p>Wondering which values are correct? The <a href="http://www.openebook.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.12">OPF 2.0 spec</a> is unambiguous:</p>
<blockquote><p>The content of this element [dc:language] must comply with <a href="http://www.ietf.org/rfc/rfc3066.txt">RFC 3066</a></p></blockquote>
<p>(Also, does anyone speak &#8220;Robert&#8221;?)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2010/03/19/languages-in-real-world-epubs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Vertical text in ePub/CSS: not there yet</title>
		<link>http://blog.threepress.org/2009/11/22/vertical-text-in-epubcss-not-there-yet/</link>
		<comments>http://blog.threepress.org/2009/11/22/vertical-text-in-epubcss-not-there-yet/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 18:45:01 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=1003</guid>
		<description><![CDATA[Languages aren&#8217;t just written right-to-left or left-to-right, of course. They can also be written top-to-bottom, as in Chinese. How can you indicate that a block of text should be rendered vertically rather than horizontally?
In ePub, you can&#8217;t.
I was surprised to discover that the subset of CSS supported by ePub only includes the rtl or ltr [...]]]></description>
			<content:encoded><![CDATA[<p>Languages aren&#8217;t just <a href="http://blog.threepress.org/2009/11/21/bidirectional-text-in-epub/">written right-to-left or left-to-right</a>, of course. They can also be written top-to-bottom, as in Chinese. How can you indicate that a block of text should be rendered vertically rather than horizontally?</p>
<p>In ePub, you can&#8217;t.</p>
<p>I was surprised to discover that the subset of CSS supported by ePub only includes the <code>rtl</code> or <code>ltr</code> values in the <a href="http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html#Section3.3">CSS 2 direction property</a>.  Rendering vertical text is covered in the <a href="http://dev.w3.org/csswg/css3-text-layout/">CSS3 Text Layout module</a>, which is still in the editorial draft stage.  But it does have some unusual browser support already.</p>
<p>There are multiple methods to specify directionality, but the simplest is the shorthand <a href="http://dev.w3.org/csswg/css3-text-layout/#writing-mode"><code>writing-mode</code> property</a>:</p>
<pre class="brush: css;">
writing-mode: tb-rl; /* Chinese */
writing-mode: lr-tb; /* English */
</pre>
<p>Curiously, <code>writing-mode</code> is only supported by one browser: Internet Explorer.  I doubt any other ePub rendering systems besides Bookworm viewed with IE will actually display such content properly (nor are they required to, as <code>writing-mode</code> isn&#8217;t in the specification).</p>
<p>Here&#8217;s a modified Project Gutenberg book with the English boilerplate and Chinese content rendered with different <code>writing-mode</code> values, as shown above:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2009/11/chinese.png"><img src="http://blog.threepress.org/wp-content/uploads/2009/11/chinese-300x269.png" alt="chinese" title="chinese" width="300" height="269" class="aligncenter size-medium wp-image-1005" /></a></p>
<p>I&#8217;d like to see future revisions of ePub specifically support <code>writing-mode</code>, even if the CSS Text Layout module isn&#8217;t fully ratified at that time. (I may add an issue to the <a href="http://www.daisy.org/epub/">EPUB Maintenance</a> list if that seems warranted.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/11/22/vertical-text-in-epubcss-not-there-yet/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What&#8217;s in an identifier?</title>
		<link>http://blog.threepress.org/2009/11/18/whats-in-an-identifier/</link>
		<comments>http://blog.threepress.org/2009/11/18/whats-in-an-identifier/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 15:59:53 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=917</guid>
		<description><![CDATA[ePub books are supposed to have a unique identifier: the Dublin Core identifier found in the OPF file.  Unfortunately, the ePub spec doesn&#8217;t have any mechanism to enforce the uniqueness of the ID, so we live in a world where in fact many many epubs don&#8217;t have truly unique identifiers (or indeed, any identifiers [...]]]></description>
			<content:encoded><![CDATA[<p>ePub books are supposed to have a unique identifier: the <a href="http://www.openebook.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.10">Dublin Core identifier</a> found in the OPF file.  Unfortunately, the ePub spec doesn&#8217;t have any mechanism to enforce the uniqueness of the ID, so we live in a world where in fact many many epubs don&#8217;t have truly unique identifiers (or indeed, any identifiers at all).</p>
<p>Early in Bookworm&#8217;s history we didn&#8217;t specifically extract the identifier from the ePub and put it in the database, but we do now, so I can query the state of identifiers in the more recent books.</p>
<p>18,571 epubs in Bookworm have some kind of identifier in the database.  Many of these were auto-generated by Bookworm, for example if the book had none at all.</p>
<p>14,735 of these are unique.  Most of the duplicates came from earlier versions of Calibre, which simply generated identifiers like &#8220;25.&#8221;  Others are just duplicate copies of the same book, which of course is okay.</p>
<p>There are three truly useful identifier types. I&#8217;ll specify these in order of my personal preference:</p>
<h3>ISBN</h3>
<p>Modern commercial books already have unique identifiers. Convenient!  Use the ISBN as your primary ID in the epub if you have it, and be sure to use the correct ISBN for your ebook edition:</p>
<pre class="brush: xml;">
&lt;dc:identifier xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;
                 id=&quot;bookid&quot;
                 opf:scheme=&quot;ISBN&quot;&gt;urn:isbn:9780596158347&lt;/dc:identifier&gt;
</pre>
<p>Including the scheme &#8220;isbn&#8221; in the identifier as well as using the optional <code>opf:scheme</code> attribute allows intelligent reading systems to leverage the ISBN by searching other systems. (1,132 books in Bookworm are courteous in this way.)</p>
<h3>URI</h3>
<p>Project Gutenberg epubs use a URI.  This is a great method for digital-native books with their own steady identifiers.  In this case Gutenberg identifiers include the Gutenberg book id:</p>
<pre class="brush: xml;">
    &lt;dc:identifier opf:scheme=&quot;URI&quot; id=&quot;etextno&quot;&gt;http://www.gutenberg.org/ebooks/11&lt;/dc:identifier&gt;
</pre>
<p>Like ISBN, these identifiers are stable, and let reading systems do more with the book if they&#8217;re able (for example direct users to the <a href="http://www.gutenberg.org/ebooks/11">canonical information page for that book</a>).  If all publishers had their own websites with a page for every book I&#8217;d even prefer URIs to ISBNs for this reason.</p>
<p>939 books on Bookworm are from Gutenberg directly, based on searching for this style of identifier. Only about 100 other books use URIs as identifiers.</p>
<h3>UUID</h3>
<p>A <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier">Universally Unique Identifier</a> solves the &#8220;required unique&#8221; problem by specifying very large numbers, using a variety of schemes.</p>
<p>It&#8217;s trivial to generate a UUID in most programming languages.  Here&#8217;s Python:</p>
<pre class="brush: python;">
&gt;&gt;&gt; import uuid
&gt;&gt;&gt; uuid.uuid4()
UUID('58dce2ac-7aec-45c3-a6de-903a30061545')
</pre>
<p>Wikipedia lists <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier#Implementations">UUID implementations in other programming languages</a>. You can even just go to a <a href="http://www.famkruithof.net/uuid/uuidgen">UUID-generating web site</a>.  These days, if Bookworm gets an epub with no identifier, it generates a UUID.  </p>
<p>UUID provides the least useful information of the three identifier types, but, as Wikipedia points out, &#8220;One&#8217;s annual risk of being hit by a meteorite is estimated to be one chance in 17 billion [...], equivalent to the odds of creating a few tens of trillions of UUIDs in a year and having one duplicate.&#8221; So at least it&#8217;s unique.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/11/18/whats-in-an-identifier/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How big is the average ePub book?</title>
		<link>http://blog.threepress.org/2009/11/16/how-big-is-the-average-epub-book/</link>
		<comments>http://blog.threepress.org/2009/11/16/how-big-is-the-average-epub-book/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 17:49:21 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[ebooks]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=868</guid>
		<description><![CDATA[One of the great things about sitting on 30,000+ ePub books (as uploaded to Bookworm) is the ability to look at what&#8217;s happening in real-world ebook production.  Today I&#8217;m examining file size, which is useful if you happen to be doing resource planning for a cloud-based ebook reading system.
Smallest 1.6 kilobytes
Largest 233 megabytes
Total # [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great things about sitting on 30,000+ ePub books (as uploaded to <a href="http://bookworm.oreilly.com/">Bookworm</a>) is the ability to look at what&#8217;s happening in real-world ebook production.  Today I&#8217;m examining file size, which is useful if you happen to be doing resource planning for a cloud-based ebook reading system.</p>
<p><strong>Smallest</strong> 1.6 kilobytes<br />
<strong>Largest</strong> 233 megabytes<br />
<strong>Total #</strong> 35,854<br />
<strong>Total size</strong> 20 gigabytes</p>
<p></p>
<p>I did a frequency analysis of all the individual sizes across the entire corpus:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2009/11/Screen-shot-2009-11-16-at-10.58.04-AM.png"><img src="http://blog.threepress.org/wp-content/uploads/2009/11/Screen-shot-2009-11-16-at-10.58.04-AM.png" alt="Screen shot 2009-11-16 at 10.58.04 AM" title="Screen shot 2009-11-16 at 10.58.04 AM" width="510" height="403" class="aligncenter size-full wp-image-872" /></a></p>
<p>And then zoomed in on that huge spike in the middle range around 1M and 5M:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2009/11/Screen-shot-2009-11-16-at-10.45.18-AM.png"><img src="http://blog.threepress.org/wp-content/uploads/2009/11/Screen-shot-2009-11-16-at-10.45.18-AM.png" alt="Screen shot 2009-11-16 at 10.45.18 AM" title="Screen shot 2009-11-16 at 10.45.18 AM" class="aligncenter size-medium wp-image-870" /></a></p>
<p>So there&#8217;s a peak at 3M but really anywhere between 1M and 4M is about average.</p>
<p>I did this analysis earlier in the year when Bookworm had only a paltry 7,800 books, and while the 3M median held, I can say that ebooks in general have gotten larger on average.  I attribute that to an increased number of commercially-produced books which include images.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/11/16/how-big-is-the-average-epub-book/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Bookworm API</title>
		<link>http://blog.threepress.org/2009/11/16/bookworm-api/</link>
		<comments>http://blog.threepress.org/2009/11/16/bookworm-api/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:05:50 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=678</guid>
		<description><![CDATA[We&#8217;ve been quiet about it, but Bookworm has had an API now for some time, which developers can use to write library management clients or external reading systems.  If users trust your site, you can ask them to supply their API key and integrate your ebook-related functionality with their Bookworm account.  Please send [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been quiet about it, but Bookworm has had an API now for some time, which developers can use to write library management clients or external reading systems.  If users trust your site, you can ask them to supply their API key and integrate your ebook-related functionality with their Bookworm account.  Please send email to <a href="mailto:bookworm@oreilly.com">bookworm@oreilly.com</a> for additional questions or comments about the API.</p>
<p>For reference, the <a href="http://bookworm.oreilly.com/api/public/help/">Bookworm API documentation</a> is partially reproduced below:</p>
<h2>Authorization</h2>
<p>You need to <a href="http://bookworm.oreilly.com/account/signup/">sign up</a> for Bookworm before using the API, as access is limited to existing users. </p>
<p>After logging in, visit your <a href="http://bookworm.oreilly.com/account/profile/">Profile</a> to find your <code>api_key</code>. This <code>api_key</code> is a required parameter for all API requests  and each request will be authorized against the <code>api_key</code>.</p>
<p>
Keep your API key private, like a password. Your API key will change if you update your password.
</p>
<p>
The API is only available over HTTPS.
</p>
<p><a id="librarylisting"></a></p>
<h2>Library listing</h2>
<p>An API client may request the list of titles in their <a href="http://bookworm.oreilly.com/library/">Library</a> using an authorized <code>HTTP GET</code>.</p>
<p>The results will be returned as an XHTML page that includes every title in one ordered list. Each list item will include a hyperlink to a <em>document address</em>, the <em>Title</em>, <em>Author(s)</em>, and <em>Date added</em>.  The list will be ordered by <em>Date added</em>. The list will not be paginated. Here&#8217;s a sample: </p>
<pre class="brush: plain;">$ curl -ik &quot;https://bookworm_api_test/api/documents/?api_key=your_api_key_here&quot;

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
...
</pre>
<pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
    &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot; &gt;&lt;/meta&gt;
    &lt;title&gt;Bookworm API title list&lt;/title&gt;
  &lt;/head&gt;

  &lt;body&gt;
    &lt;div id=&quot;content&quot;&gt;

  &lt;!-- Document list --&gt;
    &lt;ol&gt;

      &lt;li&gt;
        &lt;span class=&quot;document-title&quot;&gt;Painting the Web&lt;/span&gt;

        &lt;span class=&quot;document-authors&quot;&gt;Shelley Powers&lt;/span&gt;
        &lt;span class=&quot;document-date-added&quot;&gt;2008-07-10 16:17:56&lt;/span&gt;
        &lt;span class=&quot;document-address&quot;&gt;
          &lt;a href=&quot;https://bookworm_api_test/api/documents/8/&quot;&gt;

https://bookworm_api_test/api/documents/8/&lt;/a&gt;&lt;/span&gt;

        &lt;!-- Painting the Web by Shelley Powers (book.epub) --&gt;
      &lt;/li&gt;

      &lt;li&gt;
        &lt;span class=&quot;document-title&quot;&gt;iPhone: The Missing Manual&lt;/span&gt;
        &lt;span class=&quot;document-authors&quot;&gt;David Pogue&lt;/span&gt;

        &lt;span class=&quot;document-date-added&quot;&gt;2008-07-31 10:34:49&lt;/span&gt;
        &lt;span class=&quot;document-address&quot;&gt;
          &lt;a href=&quot;https://bookworm_api_test/api/documents/97/&quot;&gt;

https://bookworm_api_test/api/documents/97/&lt;/a&gt;&lt;/span&gt;

        &lt;!-- iPhone: The Missing Manual by David Pogue (9780596153960.epub) --&gt;

      &lt;/li&gt;
      &lt;li&gt;
        &lt;span class=&quot;document-title&quot;&gt;The Way We live Now&lt;/span&gt;
        &lt;span class=&quot;document-authors&quot;&gt;Anthony Trollope&lt;/span&gt;
        &lt;span class=&quot;document-date-added&quot;&gt;2009-03-30 12:36:04&lt;/span&gt;

        &lt;span class=&quot;document-address&quot;&gt;
          &lt;a href=&quot;https://bookworm_api_test/api/documents/15215/&quot;&gt;

https://bookworm_api_test/api/documents/15215/&lt;/a&gt;&lt;/span&gt;

        &lt;!-- The Way We live Now by Anthony Trollope (Penguin_Trollope_WayWeLiveNow.epub) --&gt;
      &lt;/li&gt;

      &lt;li&gt;
        &lt;span class=&quot;document-title&quot;&gt;The Twitter Book&lt;/span&gt;
        &lt;span class=&quot;document-authors&quot;&gt;Tim O&amp;#39;Reilly, Sarah Milstein&lt;/span&gt;
        &lt;span class=&quot;document-date-added&quot;&gt;2009-04-27 09:21:42&lt;/span&gt;

        &lt;span class=&quot;document-address&quot;&gt;
          &lt;a href=&quot;https://bookworm_api_test/api/documents/20258/&quot;&gt;

https://bookworm_api_test/api/documents/20258/&lt;/a&gt;&lt;/span&gt;

        &lt;!-- The Twitter Book by Tim O&amp;#39;Reilly... (conv_house_source.epub) --&gt;
      &lt;/li&gt;

      &lt;li&gt;
        &lt;span class=&quot;document-title&quot;&gt;Unit Test: stamp.001&lt;/span&gt;
        &lt;span class=&quot;document-authors&quot;&gt;Norman Walsh&lt;/span&gt;
        &lt;span class=&quot;document-date-added&quot;&gt;2009-05-01 23:43:59&lt;/span&gt;

        &lt;span class=&quot;document-address&quot;&gt;
          &lt;a href=&quot;https://bookworm_api_test/api/documents/20941/&quot;&gt;

https://bookworm_api_test/api/documents/20941/&lt;/a&gt;&lt;/span&gt;

        &lt;!-- Unit Test: stamp.001 by Norman Walsh (sample.epub) --&gt;
      &lt;/li&gt;

    &lt;/ol&gt;

    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The listing like the above is available via an authorized <code>HTTP GET</code> from <code>/api/documents/</code>.
</p>
<p><h2>Adding titles to your Library</h2>
</p>
<p>A new title in EPUB format may be added to your <a href="http://bookworm.oreilly.com/library/">Library</a>  using an authorized <code>HTTP POST</code> using either of two techniques: directly via EPUB upload or indirectly by EPUB URL reference.</p>
<p>If using direct EPUB upload, the API user will POST a file&#8217;s contents as <code>multipart/form-data</code> using the  parameter <code>epub_data</code> for the EPUB bytes to <code>/api/documents/</code> (remember your <code>api_key</code> too).  Here&#8217;s an example of this using <code>curl</code>:</p>
<pre class="brush: bash;">
#!/bin/bash

# Example Bookworm API client implementation to upload a file test.epub
# using curl.  This script expects two arguments: the Bookworm
# installation URL and a valid API key.
#
# curl must be installed (surprise).
# The Bookworm URL should have no trailing slash (e.g.
# https://bookworm.oreilly.com)

BW=$1
KEY=$2

# Upload a document
curl -iF epub_data=@test.epub -F api_key=$KEY $1/api/documents/ -D result.txt
</pre>
<p>If you&#8217;d prefer to add a new ePub by URL reference, POST a request to <code>/api/documents/</code>  with an <code>epub_url</code> parameter that references an externally-hosted ePub document available by unauthenticated <code>HTTP GET</code>. The Bookworm server will initiate a request for this ePub document and proceed as normal (maybe).</p>
<p>If either upload technique described above succeeds and the new ePub content is accepted by the Bookworm server, an <code>HTTP 201 Created</code> response  (probably following some <code>HTTP 100 Continue</code>s) will be returned and the <code>Content-Location</code> header will reference the <em>document address</em> (write that down). The newly-uploaded title will now be available in the user&#8217;s <a href="http://bookworm.oreilly.com/library/">Library</a> .</p>
<p class="bw-message">
<p>Neither method for adding new ePubs checks to see if the user already seems to have this title in their <a href="http://bookworm.oreilly.com/library/">Library</a>. API clients should check the contents of the user&#8217;s Library listing before adding new titles.
</p>
<h2>Downloading ePub content from your Library</h2>
<p>
API users will be able to download complete ePub documents from the user&#8217;s <a href="http://bookworm.oreilly.com/library/">Library</a> by <em>document address</em>. An authorized <code>HTTP GET</code> of a <em>document address</em> will return the complete content as <code>application/epub+zip</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/11/16/bookworm-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Flash video in ePub</title>
		<link>http://blog.threepress.org/2009/11/14/using-flash-video-in-epub/</link>
		<comments>http://blog.threepress.org/2009/11/14/using-flash-video-in-epub/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 03:00:40 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=854</guid>
		<description><![CDATA[Since Bookworm has support for video you may want to experiment with creating your own video ebooks.  Here&#8217;s how to do it and still create a valid XHTML 1.1/ePub.
Assuming you have a Flash movie called Creative_Commons_-_Get_Creative.swf and a containing XHTML page called chapter-1.html, put this in your OPF:

    &#60;!-- Flash video [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://bookworm.oreilly.com/">Bookworm</a> has support for video you may want to experiment with creating your own video ebooks.  Here&#8217;s how to do it and still create a valid XHTML 1.1/ePub.</p>
<p>Assuming you have a Flash movie called <a href="http://mirrors.creativecommons.org/getcreative/">Creative_Commons_-_Get_Creative.swf</a> and a containing XHTML page called <code>chapter-1.html</code>, put this in your OPF:</p>
<pre class="brush: xml;">
    &lt;!-- Flash video --&gt;
    &lt;item id=&quot;video&quot;
          href=&quot;chapter-1.html&quot;
          media-type=&quot;application/xhtml+xml&quot;/&gt;

    &lt;item id=&quot;video-flash&quot;
          href=&quot;Creative_Commons_-_Get_Creative.swf&quot;
          fallback=&quot;video-fallback&quot;
          media-type=&quot;application/x-shockwave-flash&quot;/&gt;
</pre>
<p>The first item is a standard OPS document; the second is the Flash movie itself. Notice that we declared a <a href="http://blog.threepress.org/2009/11/09/secrets-of-epub-out-of-line-xml-islands-and-fallbacks/">fallback</a> to another item.  That item needs to be a supported type, like an image:</p>
<pre class="brush: xml;">
    &lt;item id=&quot;video-fallback&quot;
          href=&quot;getcreative.gif&quot;
          media-type=&quot;image/gif&quot;/&gt;
</pre>
<p>Then we need to create the XHTML document, including the Flash movie.  The document should be valid XHTML 1.1, which precludes using many of the boilerplate Flash code available on the web which is meant to support IE or other legacy browsers.  This code is valid and works in Bookworm (under Firefox):</p>
<pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;Flash video test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;p&gt;
      &lt;object type=&quot;application/x-shockwave-flash&quot; data=&quot;Creative_Commons_-_Get_Creative.swf&quot; width=&quot;300&quot; height=&quot;400&quot;&gt;
        &lt;param name=&quot;movie&quot; value=&quot;Creative_Commons_-_Get_Creative.swf&quot; /&gt;
        &lt;img src=&quot;getcreative.gif&quot; alt=&quot;banner&quot; /&gt;
      &lt;/object&gt;
    &lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p><em>Notice the implicit fallback <code>img</code> as well.</em></p>
<p><a href="http://threepress.org/static/flash-video.epub">Try out the video demo</a>, which works in Bookworm and Adobe Digital Editions. The ePub is released under a Creative Commons Attribution license.</p>
<p><em>Edited November 15, 2009 to provide a working version in Adobe Digital Editions; thanks Dave Cramer.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/11/14/using-flash-video-in-epub/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Bookworm now supports inline video</title>
		<link>http://blog.threepress.org/2009/11/13/bookworm-now-supports-inline-video/</link>
		<comments>http://blog.threepress.org/2009/11/13/bookworm-now-supports-inline-video/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:32:31 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=785</guid>
		<description><![CDATA[This is an experimental new feature but of course a very cool one: Bookworm can now display and play ePub books with embedded video.

Whether the video will actually play depends on the epub file&#8217;s formatting and the capability of your web browser.  Bookworm also needs to register the particular file type.
Supported video formats:

MP4
OGV
SWF

In later [...]]]></description>
			<content:encoded><![CDATA[<p>This is an experimental new feature but of course a very cool one: <a href="http://bookworm.oreilly.com/">Bookworm</a> can now display and play ePub books with embedded video.</p>
<p><a href="http://bookworm.oreilly.com"><img src="http://blog.threepress.org/wp-content/uploads/2009/11/Screen-shot-2009-11-13-at-3.14.58-PM-300x291.png" alt="Screen shot 2009-11-13 at 3.14.58 PM" title="Screen shot 2009-11-13 at 3.14.58 PM" width="300" height="291" class="aligncenter size-medium wp-image-850" style="border:1px solid gray"/></a></p>
<p>Whether the video will actually play depends on the epub file&#8217;s formatting and the capability of your web browser.  Bookworm also needs to register the particular file type.</p>
<p>Supported video formats:</p>
<ul>
<li>MP4</li>
<li>OGV</li>
<li>SWF</li>
</ul>
<p>In later posts I&#8217;ll demonstrate how to create a valid ePub containing embedded video in a variety of formats.</p>
<p>Please report issues with video embedding to the <a href="http://code.google.com/p/threepress/issues/list">Bookworm issues list</a>. You must include a sample epub for testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/11/13/bookworm-now-supports-inline-video/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Major Bookworm release</title>
		<link>http://blog.threepress.org/2009/07/29/major-bookworm-release/</link>
		<comments>http://blog.threepress.org/2009/07/29/major-bookworm-release/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 17:53:42 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=587</guid>
		<description><![CDATA[Details over at O&#8217;Reilly Labs: New features and bug fixes for Bookworm.
Most of these are (by design) internal and not user-facing, but at least two are notable and possibly quite fun.
Feedbooks integration
At the bottom of the user library page (your home page when you log in), there&#8217;s now an option to download any books from [...]]]></description>
			<content:encoded><![CDATA[<p>Details over at O&#8217;Reilly Labs: <a href="http://labs.oreilly.com/2009/07/new-features-and-bug-fixes-for-bookworm.html">New features and bug fixes for Bookworm</a>.</p>
<p>Most of these are (by design) internal and not user-facing, but at least two are notable and possibly quite fun.</p>
<p><strong>Feedbooks integration</strong></p>
<p>At the bottom of the user library page (your home page when you log in), there&#8217;s now an option to download any books from the Feedbooks most-popular feed.  This is language-aware; Bookworm will request books in your current language preference, and Feedbooks will return the most popular books in that language:</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2009/07/picture-22.png"><img src="http://blog.threepress.org/wp-content/uploads/2009/07/picture-22-300x270.png" alt="picture-22" title="picture-22" width="300" height="270" class="aligncenter size-medium wp-image-588" /></a></p>
<p><strong>One-click adding</strong></p>
<p>Clicking on a Feedbooks title will <em>immediately add that book</em> to your library, without having to download it to your computer first.</p>
<p>Any other site can create an &#8220;add to Bookworm&#8221; button using this simple URL scheme:</p>
<blockquote>
<p>http://bookworm.oreilly.com/add/?epub=http://www.example.com/book.epub</p>
</blockquote>
<p>For example:</p>
<blockquote>
<p>http://bookworm.oreilly.com/add/?epub=http://www.feedbooks.com/book/187.epub</p>
</blockquote>
<p>At this point, you will already need to be logged in to <a href="http://bookworm.oreilly.com/">Bookworm</a> for this to work.  In the near future we&#8217;ll provide even more methods to get content in and out of Bookworm.</p>
<p>Many thanks to the <a href="http://toc.oreilly.com/">O&#8217;Reilly TOC</a> folks who sponsored this work.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/07/29/major-bookworm-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bookwormとは何ですか？</title>
		<link>http://blog.threepress.org/2009/07/22/bookworm-japanese/</link>
		<comments>http://blog.threepress.org/2009/07/22/bookworm-japanese/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 14:13:56 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[japanese]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=575</guid>
		<description><![CDATA[This is so cool. Bookworm in Japanese!

Thank you Mahalo Ito!
]]></description>
			<content:encoded><![CDATA[<p>This is so cool. <a href="http://bookworm.oreilly.com/">Bookworm</a> in Japanese!</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2009/07/picture-14.png"><img src="http://blog.threepress.org/wp-content/uploads/2009/07/picture-14-300x285.png" alt="picture-14" title="picture-14" width="300" height="285" class="aligncenter size-medium wp-image-576" /></a></p>
<p>Thank you Mahalo Ito!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/07/22/bookworm-japanese/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>¿Qué es Bookworm?</title>
		<link>http://blog.threepress.org/2009/07/02/%c2%bfque-es-bookworm/</link>
		<comments>http://blog.threepress.org/2009/07/02/%c2%bfque-es-bookworm/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 15:16:39 +0000</pubDate>
		<dc:creator>Liza Daly</dc:creator>
				<category><![CDATA[bookworm]]></category>

		<guid isPermaLink="false">http://blog.threepress.org/?p=563</guid>
		<description><![CDATA[Bookworm is now available in Spanish!

I&#8217;m thrilled to finally have this up as Spanish was one of the languages I was most interested in adding.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://bookworm.oreilly.com/">Bookworm</a> is now available in Spanish!</p>
<p><a href="http://blog.threepress.org/wp-content/uploads/2009/07/picture-1.png"><img src="http://blog.threepress.org/wp-content/uploads/2009/07/picture-1-290x300.png" alt="picture-1" title="picture-1" width="290" height="300" class="aligncenter size-medium wp-image-564" /></a></p>
<p>I&#8217;m thrilled to finally have this up as Spanish was one of the languages I was most interested in adding.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.threepress.org/2009/07/02/%c2%bfque-es-bookworm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
