Project

eeepub_ext

0.0
No commit activity in last 3 years
No release in over 3 years
EeePub is a Ruby ePub generator. This code is baded on the original eeepub version 0.8.1. I added the bug fix to rubyzip to make it work with my own gem (source2epub). This gem will be deprecated as soon as the original author (jugyo) merge the pull request from the community with this change and many others fixes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 0.10
~> 1.1
~> 3.1
~> 0.9

Runtime

~> 3.2
~> 1.2
 Project Readme

EeePub (Temporary Extension)

Notes & Remarks

Patch to the original gem that I need for my source2epub gem to work. This gem will be deprecated as soon as the rubyzip bug is fixed/merged by the original author. This is my temporary solution to make my gem work so that I can use the gem without the need to manually install my own fork first via Github.

I still can't find the way to make use of the original gem name in the gemspec.

EeePub

EeePub is a Ruby ePub generator.

Usage

epub = EeePub.make do
  title       'sample'
  creator     'jugyo'
  publisher   'jugyo.org'
  date        '2010-05-06'
  identifier  'http://example.com/book/foo', :scheme => 'URL'
  uid         'http://example.com/book/foo'

  files ['/path/to/foo.html', '/path/to/bar.html'] # or files [{'/path/to/foo.html' => 'dest/dir'}, {'/path/to/bar.html' => 'dest/dir'}]
  nav [
    {:label => '1. foo', :content => 'foo.html', :nav => [
      {:label => '1.1 foo-1', :content => 'foo.html#foo-1'}
    ]},
    {:label => '1. bar', :content => 'bar.html'}
  ]
end
epub.save('sample.epub')

Low Level API

Create NCX:

EeePub::NCX.new(
  :uid => 'xxxx',
  :title => 'sample',
  :nav => [
    {:label => '1. foo', :content => 'foo.html'},
    {:label => '2. bar', :content => 'bar.html'}
  ]
).save(File.join('sample', 'toc.ncx'))

Create OPF:

EeePub::OPF.new(
  :title => 'sample',
  :identifier => {:value => '0-0000000-0-0', :scheme => 'ISBN'},
  :manifest => ['foo.html', 'bar.html'],
  :ncx => 'toc.ncx'
).save(File.join('sample', 'content.opf'))

Create OCF and ePub file:

EeePub::OCF.new(
  :dir => 'sample',
  :container => 'content.opf'
).save('sample.epub')

Install

gem install eeepub

Requirements

  • builder
  • eBook Reader :)

Links

Copyright

Copyright (c) 2010 jugyo. See LICENSE for details.