eeepub 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/examples/basic.rb +4 -1
- data/lib/eeepub/basic.rb +4 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/examples/basic.rb
CHANGED
@@ -5,7 +5,10 @@ require 'eeepub'
|
|
5
5
|
dir = File.join(File.dirname(__FILE__), 'files')
|
6
6
|
|
7
7
|
epub = EeePub::Basic.new(
|
8
|
-
:title => '
|
8
|
+
:title => 'sample',
|
9
|
+
:creator => 'jugyo',
|
10
|
+
:publisher => 'jugyo.org',
|
11
|
+
:date => "2010-05-06",
|
9
12
|
:id => {'URL' => 'http://example.com/book/foo'},
|
10
13
|
:uid => 'http://example.com/book/foo'
|
11
14
|
)
|
data/lib/eeepub/basic.rb
CHANGED
@@ -3,7 +3,7 @@ require 'fileutils'
|
|
3
3
|
|
4
4
|
module EeePub
|
5
5
|
class Basic
|
6
|
-
attr_accessor :title, :id, :uid, :files, :nav
|
6
|
+
attr_accessor :title, :creator, :publisher, :date, :id, :uid, :files, :nav
|
7
7
|
|
8
8
|
def initialize(values)
|
9
9
|
values.each do |k, v|
|
@@ -29,6 +29,9 @@ module EeePub
|
|
29
29
|
EeePub::OPF.new(
|
30
30
|
:title => title,
|
31
31
|
:identifier => id,
|
32
|
+
:creator => creator,
|
33
|
+
:publisher => publisher,
|
34
|
+
:date => date,
|
32
35
|
:manifest => files.map{|i| File.basename(i)},
|
33
36
|
:ncx => 'toc.ncx'
|
34
37
|
).save(File.join(dir, 'content.opf'))
|