kitabu 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +14 -20
- data/README.rdoc +54 -23
- data/kitabu.gemspec +1 -1
- data/lib/kitabu.rb +11 -4
- data/lib/kitabu/cli.rb +49 -6
- data/lib/kitabu/dependency.rb +19 -0
- data/lib/kitabu/exporter.rb +4 -5
- data/lib/kitabu/generator.rb +12 -15
- data/lib/kitabu/parser.rb +27 -2
- data/lib/kitabu/parser/epub.rb +96 -83
- data/lib/kitabu/parser/html.rb +51 -16
- data/lib/kitabu/parser/mobi.rb +1 -4
- data/lib/kitabu/parser/pdf.rb +23 -20
- data/lib/kitabu/parser/txt.rb +1 -5
- data/lib/kitabu/syntax.rb +5 -3
- data/lib/kitabu/syntax/highlight.rb +22 -0
- data/lib/kitabu/toc.rb +4 -78
- data/lib/kitabu/toc/epub.rb +41 -0
- data/lib/kitabu/toc/html.rb +78 -0
- data/lib/kitabu/version.rb +1 -1
- data/spec/kitabu/cli/export_spec.rb +2 -2
- data/spec/kitabu/cli/new_spec.rb +1 -1
- data/spec/kitabu/cli/permalinks_spec.rb +1 -1
- data/spec/kitabu/cli/version_spec.rb +1 -1
- data/spec/kitabu/extensions/redcloth_spec.rb +6 -6
- data/spec/kitabu/extensions/string_spec.rb +1 -1
- data/spec/kitabu/parser/epub_spec.rb +5 -1
- data/spec/kitabu/parser/html_spec.rb +15 -15
- data/spec/kitabu/parser/pdf_spec.rb +4 -4
- data/spec/kitabu/syntax_spec.rb +78 -74
- data/spec/kitabu/{toc_spec.rb → toc/html_spec.rb} +5 -5
- data/spec/spec_helper.rb +3 -1
- data/spec/support/mybook/output/mybook.pdf.html +83 -0
- data/spec/support/mybook/templates/{cover.erb → epub/cover.erb} +1 -1
- data/spec/support/mybook/templates/{epub.erb → epub/page.erb} +1 -1
- data/spec/support/mybook/templates/epub/style.css +0 -0
- data/spec/support/mybook/templates/html/layout.css +353 -0
- data/spec/support/mybook/templates/html/layout.erb +50 -0
- data/spec/support/mybook/templates/html/syntax.css +58 -0
- data/spec/support/mybook/templates/html/user.css +1 -0
- data/spec/support/shared.rb +48 -15
- data/templates/cover.erb +1 -1
- data/templates/cover.png +0 -0
- data/templates/epub.css +1 -0
- data/templates/epub.erb +1 -1
- data/templates/sample.md +6 -0
- data/templates/syntax.css +58 -0
- metadata +32 -44
- data/spec/support/mybook/templates/epub.css +0 -1
- data/spec/support/mybook/templates/layout.css +0 -137
- data/spec/support/mybook/templates/layout.erb +0 -46
- data/spec/support/mybook/templates/syntax.css +0 -186
- data/spec/support/mybook/templates/user.css +0 -1
- data/templates/styles/active4d.css +0 -114
- data/templates/styles/all_hallows_eve.css +0 -72
- data/templates/styles/amy.css +0 -147
- data/templates/styles/blackboard.css +0 -88
- data/templates/styles/brilliance_black.css +0 -605
- data/templates/styles/brilliance_dull.css +0 -599
- data/templates/styles/cobalt.css +0 -149
- data/templates/styles/dawn.css +0 -121
- data/templates/styles/eiffel.css +0 -121
- data/templates/styles/espresso_libre.css +0 -109
- data/templates/styles/idle.css +0 -62
- data/templates/styles/iplastic.css +0 -80
- data/templates/styles/lazy.css +0 -73
- data/templates/styles/mac_classic.css +0 -123
- data/templates/styles/magicwb_amiga.css +0 -104
- data/templates/styles/pastels_on_dark.css +0 -188
- data/templates/styles/slush_poppies.css +0 -85
- data/templates/styles/spacecadet.css +0 -51
- data/templates/styles/sunburst.css +0 -180
- data/templates/styles/twilight.css +0 -137
- data/templates/styles/zenburnesque.css +0 -91
@@ -0,0 +1,50 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title><%= title %></title>
|
6
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
7
|
+
<link rel="stylesheet" type="text/css" href="../templates/html/layout.css"/>
|
8
|
+
<link rel="stylesheet" type="text/css" href="../templates/html/syntax.css"/>
|
9
|
+
<link rel="stylesheet" type="text/css" href="../templates/html/user.css"/>
|
10
|
+
|
11
|
+
<meta name="author" content="<%= authors.join(', ') %>" />
|
12
|
+
<meta name="subject" content="<%= subject %>" />
|
13
|
+
<meta name="keywords" content="<%= keywords %>" />
|
14
|
+
<meta name="date" content="<%= published_at %>" />
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<div class="frontcover container">
|
18
|
+
<div>
|
19
|
+
<h1><%= title %></h1>
|
20
|
+
<p class="description"><%= subject %></p>
|
21
|
+
<p class="authors"><%= authors.to_sentence %></p>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="table-of-contents">
|
26
|
+
<h2 class="no-toc">Content</h2>
|
27
|
+
<div id="toc">
|
28
|
+
<%= toc %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div id="chapters">
|
33
|
+
<%= content %>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class="imprint container">
|
37
|
+
<div>
|
38
|
+
<h2><%= title %></h2>
|
39
|
+
<p><%= authors.to_sentence %></p>
|
40
|
+
<p><%= copyright %></p>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<% if changelog %>
|
45
|
+
<div class="container changelog">
|
46
|
+
<%= changelog %>
|
47
|
+
</div>
|
48
|
+
<% end %>
|
49
|
+
</body>
|
50
|
+
</html>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
.hll { background-color: #ffffcc }
|
2
|
+
.c { color: #aaaaaa; } /* Comment */
|
3
|
+
.err { color: #F00000; background-color: #F0A0A0 } /* Error */
|
4
|
+
.k { color: #0000aa } /* Keyword */
|
5
|
+
.cm { color: #aaaaaa; } /* Comment.Multiline */
|
6
|
+
.cp { color: #4c8317 } /* Comment.Preproc */
|
7
|
+
.c1 { color: #aaaaaa; } /* Comment.Single */
|
8
|
+
.cs { color: #0000aa; } /* Comment.Special */
|
9
|
+
.gd { color: #aa0000 } /* Generic.Deleted */
|
10
|
+
.ge { } /* Generic.Emph */
|
11
|
+
.gr { color: #aa0000 } /* Generic.Error */
|
12
|
+
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
13
|
+
.gi { color: #00aa00 } /* Generic.Inserted */
|
14
|
+
.go { color: #888888 } /* Generic.Output */
|
15
|
+
.gp { color: #555555 } /* Generic.Prompt */
|
16
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
17
|
+
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
18
|
+
.gt { color: #aa0000 } /* Generic.Traceback */
|
19
|
+
.kc { color: #0000aa } /* Keyword.Constant */
|
20
|
+
.kd { color: #0000aa } /* Keyword.Declaration */
|
21
|
+
.kn { color: #0000aa } /* Keyword.Namespace */
|
22
|
+
.kp { color: #0000aa } /* Keyword.Pseudo */
|
23
|
+
.kr { color: #0000aa } /* Keyword.Reserved */
|
24
|
+
.kt { color: #00aaaa } /* Keyword.Type */
|
25
|
+
.m { color: #009999 } /* Literal.Number */
|
26
|
+
.s { color: #aa5500 } /* Literal.String */
|
27
|
+
.na { color: #1e90ff } /* Name.Attribute */
|
28
|
+
.nb { color: #00aaaa } /* Name.Builtin */
|
29
|
+
.nc { color: #00aa00; } /* Name.Class */
|
30
|
+
.no { color: #aa0000 } /* Name.Constant */
|
31
|
+
.nd { color: #888888 } /* Name.Decorator */
|
32
|
+
.ni { color: #800000; font-weight: bold } /* Name.Entity */
|
33
|
+
.nf { color: #00aa00 } /* Name.Function */
|
34
|
+
.nn { color: #00aaaa; } /* Name.Namespace */
|
35
|
+
.nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
|
36
|
+
.nv { color: #aa0000 } /* Name.Variable */
|
37
|
+
.ow { color: #0000aa } /* Operator.Word */
|
38
|
+
.w { color: #bbbbbb } /* Text.Whitespace */
|
39
|
+
.mf { color: #009999 } /* Literal.Number.Float */
|
40
|
+
.mh { color: #009999 } /* Literal.Number.Hex */
|
41
|
+
.mi { color: #009999 } /* Literal.Number.Integer */
|
42
|
+
.mo { color: #009999 } /* Literal.Number.Oct */
|
43
|
+
.sb { color: #aa5500 } /* Literal.String.Backtick */
|
44
|
+
.sc { color: #aa5500 } /* Literal.String.Char */
|
45
|
+
.sd { color: #aa5500 } /* Literal.String.Doc */
|
46
|
+
.s2 { color: #aa5500 } /* Literal.String.Double */
|
47
|
+
.se { color: #aa5500 } /* Literal.String.Escape */
|
48
|
+
.sh { color: #aa5500 } /* Literal.String.Heredoc */
|
49
|
+
.si { color: #aa5500 } /* Literal.String.Interpol */
|
50
|
+
.sx { color: #aa5500 } /* Literal.String.Other */
|
51
|
+
.sr { color: #009999 } /* Literal.String.Regex */
|
52
|
+
.s1 { color: #aa5500 } /* Literal.String.Single */
|
53
|
+
.ss { color: #0000aa } /* Literal.String.Symbol */
|
54
|
+
.bp { color: #00aaaa } /* Name.Builtin.Pseudo */
|
55
|
+
.vc { color: #aa0000 } /* Name.Variable.Class */
|
56
|
+
.vg { color: #aa0000 } /* Name.Variable.Global */
|
57
|
+
.vi { color: #aa0000 } /* Name.Variable.Instance */
|
58
|
+
.il { color: #009999 } /* Literal.Number.Integer.Long */
|
@@ -0,0 +1 @@
|
|
1
|
+
/* add custom CSS */
|
data/spec/support/shared.rb
CHANGED
@@ -1,16 +1,49 @@
|
|
1
1
|
shared_examples_for "e-book" do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
let(:mybook) { tmpdir.join("mybook") }
|
3
|
+
|
4
|
+
it "generates e-book" do
|
5
|
+
mybook.should be_directory
|
6
|
+
end
|
7
|
+
|
8
|
+
it "creates images directory" do
|
9
|
+
mybook.join("images").should be_directory
|
10
|
+
end
|
11
|
+
|
12
|
+
it "creates text directory" do
|
13
|
+
mybook.join("text").should be_directory
|
14
|
+
end
|
15
|
+
|
16
|
+
it "creates code directory" do
|
17
|
+
mybook.join("code").should be_directory
|
18
|
+
end
|
19
|
+
|
20
|
+
it "creates template directory" do
|
21
|
+
mybook.join("templates").should be_directory
|
22
|
+
end
|
23
|
+
|
24
|
+
it "creates configuration file" do
|
25
|
+
mybook.join("config/kitabu.yml").should be_file
|
26
|
+
end
|
27
|
+
|
28
|
+
it "creates helper file" do
|
29
|
+
mybook.join("config/helper.rb").should be_file
|
30
|
+
end
|
31
|
+
|
32
|
+
it "copies sample page" do
|
33
|
+
mybook.join("text/01_Welcome.md")
|
34
|
+
end
|
35
|
+
|
36
|
+
it "copies html template files" do
|
37
|
+
mybook.join("templates/html/user.css").should be_file
|
38
|
+
mybook.join("templates/html/layout.css").should be_file
|
39
|
+
mybook.join("templates/html/layout.erb").should be_file
|
40
|
+
mybook.join("templates/html/syntax.css").should be_file
|
41
|
+
end
|
42
|
+
|
43
|
+
it "copies epub template files" do
|
44
|
+
mybook.join("templates/epub/user.css").should be_file
|
45
|
+
mybook.join("templates/epub/cover.erb").should be_file
|
46
|
+
mybook.join("templates/epub/cover.png").should be_file
|
47
|
+
mybook.join("templates/epub/page.erb").should be_file
|
48
|
+
end
|
49
|
+
end
|
data/templates/cover.erb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= language %>">
|
6
6
|
<head>
|
7
7
|
<title><%= title %></title>
|
8
|
-
<link rel="stylesheet" href="
|
8
|
+
<link rel="stylesheet" href="user.css" type="text/css" />
|
9
9
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
10
10
|
</head>
|
11
11
|
<body>
|
data/templates/cover.png
ADDED
Binary file
|
data/templates/epub.css
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
/* This stylesheet is added to the e-Pub */
|
data/templates/epub.erb
CHANGED
data/templates/sample.md
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
Welcome to Kitabu
|
2
|
+
-----------------
|
3
|
+
|
4
|
+
[Kitabu](http://github.com/fnando/kitabu) is easy-to-use e-book framework. You can generate PDF, e-Pub and Mobi files from [Markdown](http://en.wikipedia.org/wiki/Markdown), [Textile](http://en.wikipedia.org/wiki/Textile_(markup_language)) or plain HTML files.
|
5
|
+
|
6
|
+
You can safely remove this page and start writing your own novel.
|
@@ -0,0 +1,58 @@
|
|
1
|
+
.hll { background-color: #ffffcc }
|
2
|
+
.c { color: #aaaaaa; } /* Comment */
|
3
|
+
.err { color: #F00000; background-color: #F0A0A0 } /* Error */
|
4
|
+
.k { color: #0000aa } /* Keyword */
|
5
|
+
.cm { color: #aaaaaa; } /* Comment.Multiline */
|
6
|
+
.cp { color: #4c8317 } /* Comment.Preproc */
|
7
|
+
.c1 { color: #aaaaaa; } /* Comment.Single */
|
8
|
+
.cs { color: #0000aa; } /* Comment.Special */
|
9
|
+
.gd { color: #aa0000 } /* Generic.Deleted */
|
10
|
+
.ge { } /* Generic.Emph */
|
11
|
+
.gr { color: #aa0000 } /* Generic.Error */
|
12
|
+
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
13
|
+
.gi { color: #00aa00 } /* Generic.Inserted */
|
14
|
+
.go { color: #888888 } /* Generic.Output */
|
15
|
+
.gp { color: #555555 } /* Generic.Prompt */
|
16
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
17
|
+
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
18
|
+
.gt { color: #aa0000 } /* Generic.Traceback */
|
19
|
+
.kc { color: #0000aa } /* Keyword.Constant */
|
20
|
+
.kd { color: #0000aa } /* Keyword.Declaration */
|
21
|
+
.kn { color: #0000aa } /* Keyword.Namespace */
|
22
|
+
.kp { color: #0000aa } /* Keyword.Pseudo */
|
23
|
+
.kr { color: #0000aa } /* Keyword.Reserved */
|
24
|
+
.kt { color: #00aaaa } /* Keyword.Type */
|
25
|
+
.m { color: #009999 } /* Literal.Number */
|
26
|
+
.s { color: #aa5500 } /* Literal.String */
|
27
|
+
.na { color: #1e90ff } /* Name.Attribute */
|
28
|
+
.nb { color: #00aaaa } /* Name.Builtin */
|
29
|
+
.nc { color: #00aa00; } /* Name.Class */
|
30
|
+
.no { color: #aa0000 } /* Name.Constant */
|
31
|
+
.nd { color: #888888 } /* Name.Decorator */
|
32
|
+
.ni { color: #800000; font-weight: bold } /* Name.Entity */
|
33
|
+
.nf { color: #00aa00 } /* Name.Function */
|
34
|
+
.nn { color: #00aaaa; } /* Name.Namespace */
|
35
|
+
.nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
|
36
|
+
.nv { color: #aa0000 } /* Name.Variable */
|
37
|
+
.ow { color: #0000aa } /* Operator.Word */
|
38
|
+
.w { color: #bbbbbb } /* Text.Whitespace */
|
39
|
+
.mf { color: #009999 } /* Literal.Number.Float */
|
40
|
+
.mh { color: #009999 } /* Literal.Number.Hex */
|
41
|
+
.mi { color: #009999 } /* Literal.Number.Integer */
|
42
|
+
.mo { color: #009999 } /* Literal.Number.Oct */
|
43
|
+
.sb { color: #aa5500 } /* Literal.String.Backtick */
|
44
|
+
.sc { color: #aa5500 } /* Literal.String.Char */
|
45
|
+
.sd { color: #aa5500 } /* Literal.String.Doc */
|
46
|
+
.s2 { color: #aa5500 } /* Literal.String.Double */
|
47
|
+
.se { color: #aa5500 } /* Literal.String.Escape */
|
48
|
+
.sh { color: #aa5500 } /* Literal.String.Heredoc */
|
49
|
+
.si { color: #aa5500 } /* Literal.String.Interpol */
|
50
|
+
.sx { color: #aa5500 } /* Literal.String.Other */
|
51
|
+
.sr { color: #009999 } /* Literal.String.Regex */
|
52
|
+
.s1 { color: #aa5500 } /* Literal.String.Single */
|
53
|
+
.ss { color: #0000aa } /* Literal.String.Symbol */
|
54
|
+
.bp { color: #00aaaa } /* Name.Builtin.Pseudo */
|
55
|
+
.vc { color: #aa0000 } /* Name.Variable.Class */
|
56
|
+
.vg { color: #aa0000 } /* Name.Variable.Global */
|
57
|
+
.vi { color: #aa0000 } /* Name.Variable.Instance */
|
58
|
+
.il { color: #009999 } /* Literal.Number.Integer.Long */
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitabu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -156,21 +156,21 @@ dependencies:
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0.1'
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
|
-
name:
|
159
|
+
name: coderay
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - ! '>='
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '0
|
165
|
+
version: '0'
|
166
166
|
type: :runtime
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
none: false
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ! '>='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0
|
173
|
+
version: '0'
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: rspec
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- kitabu.gemspec
|
267
267
|
- lib/kitabu.rb
|
268
268
|
- lib/kitabu/cli.rb
|
269
|
+
- lib/kitabu/dependency.rb
|
269
270
|
- lib/kitabu/errors.rb
|
270
271
|
- lib/kitabu/exporter.rb
|
271
272
|
- lib/kitabu/extensions/redcloth.rb
|
@@ -279,7 +280,10 @@ files:
|
|
279
280
|
- lib/kitabu/parser/txt.rb
|
280
281
|
- lib/kitabu/stream.rb
|
281
282
|
- lib/kitabu/syntax.rb
|
283
|
+
- lib/kitabu/syntax/highlight.rb
|
282
284
|
- lib/kitabu/toc.rb
|
285
|
+
- lib/kitabu/toc/epub.rb
|
286
|
+
- lib/kitabu/toc/html.rb
|
283
287
|
- lib/kitabu/version.rb
|
284
288
|
- spec/kitabu/cli/export_spec.rb
|
285
289
|
- spec/kitabu/cli/new_spec.rb
|
@@ -292,7 +296,7 @@ files:
|
|
292
296
|
- spec/kitabu/parser/html_spec.rb
|
293
297
|
- spec/kitabu/parser/pdf_spec.rb
|
294
298
|
- spec/kitabu/syntax_spec.rb
|
295
|
-
- spec/kitabu/
|
299
|
+
- spec/kitabu/toc/html_spec.rb
|
296
300
|
- spec/kitabu_spec.rb
|
297
301
|
- spec/spec_helper.rb
|
298
302
|
- spec/support/exit_with_code.rb
|
@@ -306,13 +310,14 @@ files:
|
|
306
310
|
- spec/support/mybook/images/.gitkeep
|
307
311
|
- spec/support/mybook/images/logo.gif
|
308
312
|
- spec/support/mybook/output/.gitkeep
|
309
|
-
- spec/support/mybook/
|
310
|
-
- spec/support/mybook/templates/epub.
|
311
|
-
- spec/support/mybook/templates/epub.erb
|
312
|
-
- spec/support/mybook/templates/
|
313
|
-
- spec/support/mybook/templates/layout.
|
314
|
-
- spec/support/mybook/templates/
|
315
|
-
- spec/support/mybook/templates/
|
313
|
+
- spec/support/mybook/output/mybook.pdf.html
|
314
|
+
- spec/support/mybook/templates/epub/cover.erb
|
315
|
+
- spec/support/mybook/templates/epub/page.erb
|
316
|
+
- spec/support/mybook/templates/epub/style.css
|
317
|
+
- spec/support/mybook/templates/html/layout.css
|
318
|
+
- spec/support/mybook/templates/html/layout.erb
|
319
|
+
- spec/support/mybook/templates/html/syntax.css
|
320
|
+
- spec/support/mybook/templates/html/user.css
|
316
321
|
- spec/support/mybook/text/.gitkeep
|
317
322
|
- spec/support/mybook/text/01_Markdown_Chapter.markdown
|
318
323
|
- spec/support/mybook/text/02_Textile_Chapter.textile
|
@@ -324,33 +329,15 @@ files:
|
|
324
329
|
- spec/support/shared.rb
|
325
330
|
- templates/config.erb
|
326
331
|
- templates/cover.erb
|
332
|
+
- templates/cover.png
|
327
333
|
- templates/ebook.png
|
328
334
|
- templates/epub.css
|
329
335
|
- templates/epub.erb
|
330
336
|
- templates/helper.rb
|
331
337
|
- templates/layout.css
|
332
338
|
- templates/layout.erb
|
333
|
-
- templates/
|
334
|
-
- templates/
|
335
|
-
- templates/styles/amy.css
|
336
|
-
- templates/styles/blackboard.css
|
337
|
-
- templates/styles/brilliance_black.css
|
338
|
-
- templates/styles/brilliance_dull.css
|
339
|
-
- templates/styles/cobalt.css
|
340
|
-
- templates/styles/dawn.css
|
341
|
-
- templates/styles/eiffel.css
|
342
|
-
- templates/styles/espresso_libre.css
|
343
|
-
- templates/styles/idle.css
|
344
|
-
- templates/styles/iplastic.css
|
345
|
-
- templates/styles/lazy.css
|
346
|
-
- templates/styles/mac_classic.css
|
347
|
-
- templates/styles/magicwb_amiga.css
|
348
|
-
- templates/styles/pastels_on_dark.css
|
349
|
-
- templates/styles/slush_poppies.css
|
350
|
-
- templates/styles/spacecadet.css
|
351
|
-
- templates/styles/sunburst.css
|
352
|
-
- templates/styles/twilight.css
|
353
|
-
- templates/styles/zenburnesque.css
|
339
|
+
- templates/sample.md
|
340
|
+
- templates/syntax.css
|
354
341
|
- templates/user.css
|
355
342
|
homepage: http://rubygems.org/gems/kitabu
|
356
343
|
licenses:
|
@@ -390,7 +377,7 @@ test_files:
|
|
390
377
|
- spec/kitabu/parser/html_spec.rb
|
391
378
|
- spec/kitabu/parser/pdf_spec.rb
|
392
379
|
- spec/kitabu/syntax_spec.rb
|
393
|
-
- spec/kitabu/
|
380
|
+
- spec/kitabu/toc/html_spec.rb
|
394
381
|
- spec/kitabu_spec.rb
|
395
382
|
- spec/spec_helper.rb
|
396
383
|
- spec/support/exit_with_code.rb
|
@@ -404,13 +391,14 @@ test_files:
|
|
404
391
|
- spec/support/mybook/images/.gitkeep
|
405
392
|
- spec/support/mybook/images/logo.gif
|
406
393
|
- spec/support/mybook/output/.gitkeep
|
407
|
-
- spec/support/mybook/
|
408
|
-
- spec/support/mybook/templates/epub.
|
409
|
-
- spec/support/mybook/templates/epub.erb
|
410
|
-
- spec/support/mybook/templates/
|
411
|
-
- spec/support/mybook/templates/layout.
|
412
|
-
- spec/support/mybook/templates/
|
413
|
-
- spec/support/mybook/templates/
|
394
|
+
- spec/support/mybook/output/mybook.pdf.html
|
395
|
+
- spec/support/mybook/templates/epub/cover.erb
|
396
|
+
- spec/support/mybook/templates/epub/page.erb
|
397
|
+
- spec/support/mybook/templates/epub/style.css
|
398
|
+
- spec/support/mybook/templates/html/layout.css
|
399
|
+
- spec/support/mybook/templates/html/layout.erb
|
400
|
+
- spec/support/mybook/templates/html/syntax.css
|
401
|
+
- spec/support/mybook/templates/html/user.css
|
414
402
|
- spec/support/mybook/text/.gitkeep
|
415
403
|
- spec/support/mybook/text/01_Markdown_Chapter.markdown
|
416
404
|
- spec/support/mybook/text/02_Textile_Chapter.textile
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1,137 +0,0 @@
|
|
1
|
-
/* ========= */
|
2
|
-
/* = PAGES = */
|
3
|
-
/* ========= */
|
4
|
-
@page {
|
5
|
-
margin: 27mm 16mm 27mm 16mm;
|
6
|
-
size: 7in 9.25in landscape;
|
7
|
-
|
8
|
-
@footnotes {
|
9
|
-
border-top: thin solid black;
|
10
|
-
margin-left: 30%;
|
11
|
-
margin-top: 0.6em;
|
12
|
-
padding-top: 0.3em;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
@page cover {
|
17
|
-
margin: 0;
|
18
|
-
}
|
19
|
-
|
20
|
-
/* ============= */
|
21
|
-
/* = BOOKMARKS = */
|
22
|
-
/* ============= */
|
23
|
-
.imprint h2,
|
24
|
-
.chapter h4,
|
25
|
-
.chapter h5,
|
26
|
-
.chapter h6 {
|
27
|
-
prince-bookmark-level: none;
|
28
|
-
}
|
29
|
-
|
30
|
-
/* ============= */
|
31
|
-
/* = CONTAINER = */
|
32
|
-
/* ============= */
|
33
|
-
div.container {
|
34
|
-
height: 7in;
|
35
|
-
left: 0;
|
36
|
-
page: cover;
|
37
|
-
position: absolute;
|
38
|
-
top: 0;
|
39
|
-
width: 9.25in;
|
40
|
-
z-index: -1;
|
41
|
-
}
|
42
|
-
|
43
|
-
/* ============== */
|
44
|
-
/* = FRONTCOVER = */
|
45
|
-
/* ============== */
|
46
|
-
div.frontcover {
|
47
|
-
background: #fff;
|
48
|
-
}
|
49
|
-
|
50
|
-
div.frontcover div {
|
51
|
-
left: 1in;
|
52
|
-
padding-top: 0.25in;
|
53
|
-
position: absolute;
|
54
|
-
top: 2.5in;
|
55
|
-
width: 7.25in;
|
56
|
-
}
|
57
|
-
|
58
|
-
div.frontcover h1 {
|
59
|
-
color: #f00;
|
60
|
-
font-size: 46pt;
|
61
|
-
}
|
62
|
-
|
63
|
-
div.frontcover h1,
|
64
|
-
div.frontcover p.authors {
|
65
|
-
font-family: Constantia, Palatino, "Palatino Linotype", "Palatino LT STD", "Times New Roman", serif;
|
66
|
-
}
|
67
|
-
|
68
|
-
div.frontcover p {
|
69
|
-
font-size: 18pt;
|
70
|
-
}
|
71
|
-
|
72
|
-
div.frontcover p.description {
|
73
|
-
color: #666;
|
74
|
-
font: italic normal normal 14pt/normal Baskerville, "Hoefler Text", Garamond, "Times New Roman", serif;
|
75
|
-
margin-top: -.1in;
|
76
|
-
}
|
77
|
-
|
78
|
-
div.frontcover p.authors {
|
79
|
-
color: #000;
|
80
|
-
font-style: italic;
|
81
|
-
position: absolute;
|
82
|
-
top: 0;
|
83
|
-
}
|
84
|
-
|
85
|
-
div.frontcover * {
|
86
|
-
margin: 0;
|
87
|
-
}
|
88
|
-
|
89
|
-
/* =========== */
|
90
|
-
/* = CHAPTER = */
|
91
|
-
/* =========== */
|
92
|
-
#chapters {
|
93
|
-
counter-reset: page 1;
|
94
|
-
page-break-before: always;
|
95
|
-
}
|
96
|
-
|
97
|
-
.chapter {
|
98
|
-
color: #444;
|
99
|
-
counter-reset: footnote 0;
|
100
|
-
font: normal normal normal 12pt/normal Constantia, Palatino, 'Palatino Linotype', 'Palatino LT STD', Georgia, serif;
|
101
|
-
page-break-after: always;
|
102
|
-
}
|
103
|
-
|
104
|
-
.chapter a {
|
105
|
-
color: #0AE;
|
106
|
-
font-weight: bold;
|
107
|
-
text-decoration: none;
|
108
|
-
}
|
109
|
-
|
110
|
-
.chapter h2 {
|
111
|
-
font-size: 24pt;
|
112
|
-
}
|
113
|
-
|
114
|
-
/* =========== */
|
115
|
-
/* = IMPRINT = */
|
116
|
-
/* =========== */
|
117
|
-
.imprint {
|
118
|
-
background: #E2E7E2;
|
119
|
-
page: cover;
|
120
|
-
string-set: header "";
|
121
|
-
}
|
122
|
-
|
123
|
-
.imprint, .imprint * {
|
124
|
-
color: #5b5b5b;
|
125
|
-
}
|
126
|
-
|
127
|
-
.imprint * {
|
128
|
-
font-family: "Lucida Grande", arial, sans-serif;
|
129
|
-
font-size: 10pt;
|
130
|
-
margin: 0 0 2pt 0;
|
131
|
-
}
|
132
|
-
|
133
|
-
.imprint div {
|
134
|
-
left: 0.5in;
|
135
|
-
position: absolute;
|
136
|
-
bottom: 0.3in;
|
137
|
-
}
|