2012年2月24日

gepub 0.6.3 with GEPUB::Builder

[ gepub Ruby 電子書籍 ]

Released gepub 0.6.3. It includes GEPUB::Builder, easy and powerful way to create a EPUB3 file.

gepub0.6.3をリリースしました。EPUB3生成の簡単(だけど、EPUB3メタデータの大部分が扱える)インタフェース、GEPUB::Builderが含まれています。

例は以下の通り。

simple example

rather complicated example

2012年2月22日

gepub EPUB builder API

[ gepub 電子書籍 ]

gepubにEPUB生成インタフェースを追加しようとしています(まだ実装してません!)。以下に、今の案での、使い方例を示します。基本的な考え方は

  1. まずアイテムを定義(titleとかfile)
  2. 続いてその属性を定義(alt, file_as, mime typeとか)
です。

ご意見いただけると嬉しいです。

I'm planning to add EPUB builder interface to gepub(not implemented at all, yet). Here is my current idea how GEPUB::Builder interface looks like. Its style is:

  1. define item (e.g. title, creator, etc)
  2. set attributes to last defined item (e.g. alt, file_as, mimetype, etc)

If you have any comment or suggestion, please tell me!

simple example

rather complicated example

2012年2月21日

gepub 0.6.1リリースしました: EPUB3対応、パース対応

[ gepub 電子書籍 ]

(English entry is here)

昨晩、gepub 0.6.1をリリースしました。gepubは、rubyで書かれた汎用EPUBライブラリです。主にメタデータを取り扱うことを目的としています。

0.6の代表的な新機能は次のとおり。

  • EPUB3対応。EPUB3 Publicationで定義された全てのメタデータを扱えます(扱えないなら、それはバグです)
  • EPUBファイルのパース
  • 新しいEPUB生成インタフェース

詳しくは、github レポジトリのREADMEやexamplesをどうぞ。

gepubはもともと、good-enough EPUB generatorを目指していました。が、「必要十分」を目標にすると、十分からほど遠いことになってしまう、ということにようやく気付きました。gepub0.5.0は「私には」必要十分でしたが、非常に貧弱な機能しかありませんでした。

あたらしいgepubは「汎用」EPUBライブラリを目指します。まだまだ汎用とはいえませんし、そもそもバグだらけですが、自分で使いながら改善していきたいなーと思っております。

2012年2月20日

Released gepub 0.6.1: a generic EPUB library, supports EPUB3

[ gepub 電子書籍 ]

Released new version of gepub. gepub is a generic EPUB parser/generator for Ruby. Its main focus is to handle metadata in EPUB.

New features in version 0.6.0 includes:

  • supports EPUB3. It can(or should) handle every metadata defined in EPUB Publications 3.0.
  • Parse existing EPUB files.
  • New easy-to-use EPUB generating interface.

Please check the readme and examples on the github repository for more information.

The original goal of gepub was to be a 'good-enough' EPUB generator. But, if you set a goal like 'good-enough', it will be rearly enough. gepub 0.5.0 has very poor functionality on handling metadata, no parsing, and only supports EPUB2.0.

Now, the new goal of the library is to be a 'generic' EPUB library. It's not generic enough and not stable yet, but I'm willing to make it enough and stable.

KOJIMA Satoshi

2012年1月20日

iBooks AuthorはEPUBオーサリングツールではない

[ 電子書籍 ]

Appleから電子書籍を作れるアプリ iBooks Author がでました。

作った電書をibooks フォーマットという初耳のファイルに出力して中を眺めると、だいぶEPUBぽい。ということは、これはEPUBのオーサリングツールなんでしょうか? ibooksファイルとEPUBをざっくり比べてみました。

EPUBと同じところ

  • zipアーカイブである
  • mimetypeという名前のファイルがある
  • OEBPSで定義されたMETA-INF/container.xmlがある
  • opf2.0のファイルがある
  • ナビゲーション用にncxファイルがある
  • コンテンツは基本的にxhtmlである

EPUBと違うところ

  • 拡張子がちがう
  • mimetypeの中身が違う。EPUBでは"application/epub+zip"、ibooksフォーマットでは"application/x-ibooks+zip"
  • opfのmanifestにapplication/x-ibooks+linehintsとかimage/x-thumb-jpegなんてmediatypeをもつitemがある(EPUBではmediatypeを限定していないので「違う」というのは正確ではないですが)
  • cssに-ibooks-というプレフィクスがついたものがある

違うフォーマットだよね

拡張子が.epubじゃない上に、中のmimetypeがapplication/epub+zipじゃない。これは"ibooksフォーマットはEPUBじゃないよ"という意志の現れだとかんじました。これは拡張されたEPUBではなく、よく似ているけど全く別のフォーマットだと私は捉えました。

EPUBオーサリングツールじゃない

つまり「iBooks AuthorはiPad iBooks専用電子書籍のオーサリングツール」なのであって、「変な拡張をしたEPUBを吐き出す困ったツール」ではないのだと思います。

もうちょっと乱暴に「電子書籍アプリの簡単作成ツール」といってしまってもよいのじゃないかなあ。

クリエイティブ・コモンズ・ライセンス
このブログは、次のライセンスで保護されています。 クリエイティブ・コモンズ・ライセンス.