项目
在 GitHub 查看
jugyo/eeepub
关于
EeePub is a Ruby ePub generator
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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
- Documentation: http://yardoc.org/docs/jugyo-eeepub
- Source code: http://github.com/jugyo/eeepub
Copyright
Copyright (c) 2010 jugyo. See LICENSE for details.
探索相关项目
加载中…