Created
May 6, 2010 06:02
-
-
Save takahashim/391826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# epub sample API | |
# | |
epub = EeePub.generate do | |
title "sample" | |
creaetor "jugyo", :role => 'aut' | |
publisher 'jugyo.org' | |
date '2010-05-07', :event=> "publication" | |
uid 'http://example.com/book/foo', :scheme => "URL" | |
item 'foo.html', :label => '1. foo' | |
item 'bar.html', :label => '2. bar' | |
assets 'css/foo.css' | |
assets 'images/foo.jpg', 'images/bar.jpg' | |
end | |
epub.save('sample.epub') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# epub sample API | |
# | |
epub = EeePub.generate do |e| | |
e.title "sample" | |
e.creaetor "jugyo", :role => 'aut' | |
e.publisher 'jugyo.org' | |
e.date '2010-05-07', :event=> "publication" | |
e.uid 'http://example.com/book/foo', :scheme => "URL" | |
e.item 'foo.html', :label => '1. foo' do |e2| | |
e2.item 'foo2.html', :label => '1-1. foo aaa' | |
e2.item 'foo3.html', :label => '1-2. foo bbb' | |
end | |
e.item 'bar.html', :label => '2. bar' | |
e.assets 'css/foo.css' | |
e.assets 'images/foo.jpg', 'images/bar.jpg' | |
end | |
epub.save('sample.epub') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment