Sha256: 7c5add1e9eecfac827fe3091e599839b4fff6bd2a4146543cb8e6c77d0bc3fc0

Contents?: true

Size: 972 Bytes

Versions: 10

Compression:

Stored size: 972 Bytes

Contents

# -*- coding: utf-8 -*-
    require 'rubygems'
    require 'gepub'
    workdir = 'epub/example/'
    builder = GEPUB::Builder.new {
      unique_identifier 'http:/example.jp/bookid_in_url', 'BookID', 'URL'
      language 'en'

      title 'GEPUB Sample Book'
      subtitle 'This book is just a sample'
      alt 'ja' => 'これはあくまでサンプルです'

      creator 'KOJIMA Satoshi'
      alt 'ja' => '小嶋智'

      contributors 'Denshobu', 'Asagaya Densho', 'Shonan Densho Teidan', 'eMagazine Torutaru'

      date '2012-02-29T00:00:00Z'

      resources(:workdir => workdir) {
        cover_image 'img/image1.jpg' => 'image1.jpg'
        ordered {
          file 'text/chap1.xhtml'
          heading 'Chapter 1'
          file 'text/chap1-1.xhtml'
          file 'text/chap2.html'
          heading 'Chapter 2'
        }
      }
    }
    epubname = File.join(File.dirname(__FILE__), 'example_test_with_builder.epub')
    builder.generate_epub(epubname)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gepub-1.0.0rc1 examples/builder_example.rb
gepub-1.0.0beta1 examples/builder_example.rb
gepub-0.7.1 examples/builder_example.rb
gepub-0.7.0 examples/builder_example.rb
gepub-0.7.0beta4 examples/builder_example.rb
gepub-0.7.0beta3 examples/builder_example.rb
gepub-0.7.0beta2 examples/builder_example.rb
gepub-0.7.0beta1 examples/builder_example.rb
gepub-0.6.9.2 examples/builder_example.rb
gepub-0.6.9.1 examples/builder_example.rb