kitabu 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile.lock +32 -23
- data/examples/RailsGuides/config/kitabu.yml +0 -4
- data/kitabu.gemspec +11 -9
- data/lib/kitabu.rb +1 -0
- data/lib/kitabu/adapters/markdown.rb +34 -0
- data/lib/kitabu/parser/epub.rb +5 -3
- data/lib/kitabu/parser/html.rb +1 -21
- data/lib/kitabu/parser/pdf.rb +1 -1
- data/lib/kitabu/parser/txt.rb +1 -1
- data/lib/kitabu/toc/html.rb +1 -1
- data/lib/kitabu/version.rb +1 -1
- data/spec/support/mybook/config/kitabu.yml +0 -4
- data/templates/config.erb +0 -4
- data/templates/layout.css +1 -1
- metadata +72 -82
- data/spec/support/mybook/output/mybook.pdf.html +0 -83
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,56 +1,65 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kitabu (1.0.0.
|
5
|
-
RedCloth
|
6
|
-
activesupport
|
4
|
+
kitabu (1.0.0.rc3)
|
5
|
+
RedCloth
|
6
|
+
activesupport
|
7
7
|
coderay
|
8
|
-
eeepub-with-cover-support
|
9
|
-
i18n
|
10
|
-
nokogiri
|
11
|
-
notifier
|
12
|
-
rdiscount
|
13
|
-
thor
|
14
|
-
watchr
|
8
|
+
eeepub-with-cover-support
|
9
|
+
i18n
|
10
|
+
nokogiri
|
11
|
+
notifier
|
12
|
+
rdiscount
|
13
|
+
thor
|
14
|
+
watchr
|
15
15
|
|
16
16
|
GEM
|
17
17
|
remote: http://rubygems.org/
|
18
18
|
specs:
|
19
19
|
RedCloth (4.2.9)
|
20
|
-
activesupport (3.2.
|
20
|
+
activesupport (3.2.8)
|
21
21
|
i18n (~> 0.6)
|
22
22
|
multi_json (~> 1.0)
|
23
|
+
awesome_print (1.0.2)
|
23
24
|
builder (3.0.0)
|
24
|
-
coderay (1.0.
|
25
|
+
coderay (1.0.7)
|
25
26
|
diff-lcs (1.1.3)
|
26
27
|
eeepub-with-cover-support (0.8.7)
|
27
28
|
builder
|
28
29
|
rubyzip
|
29
30
|
i18n (0.6.0)
|
30
|
-
|
31
|
-
|
31
|
+
method_source (0.8)
|
32
|
+
multi_json (1.3.6)
|
33
|
+
nokogiri (1.5.5)
|
32
34
|
notifier (0.2.1)
|
35
|
+
pry (0.9.10)
|
36
|
+
coderay (~> 1.0.5)
|
37
|
+
method_source (~> 0.8)
|
38
|
+
slop (~> 3.3.1)
|
33
39
|
rake (0.9.2.2)
|
34
40
|
rdiscount (1.6.8)
|
35
|
-
rspec (2.
|
36
|
-
rspec-core (~> 2.
|
37
|
-
rspec-expectations (~> 2.
|
38
|
-
rspec-mocks (~> 2.
|
39
|
-
rspec-core (2.
|
40
|
-
rspec-expectations (2.
|
41
|
+
rspec (2.11.0)
|
42
|
+
rspec-core (~> 2.11.0)
|
43
|
+
rspec-expectations (~> 2.11.0)
|
44
|
+
rspec-mocks (~> 2.11.0)
|
45
|
+
rspec-core (2.11.1)
|
46
|
+
rspec-expectations (2.11.2)
|
41
47
|
diff-lcs (~> 1.1.3)
|
42
|
-
rspec-mocks (2.
|
43
|
-
rubyzip (0.9.
|
48
|
+
rspec-mocks (2.11.2)
|
49
|
+
rubyzip (0.9.9)
|
50
|
+
slop (3.3.2)
|
44
51
|
test_notifier (1.0.0)
|
45
52
|
notifier
|
46
|
-
thor (0.
|
53
|
+
thor (0.16.0)
|
47
54
|
watchr (0.7)
|
48
55
|
|
49
56
|
PLATFORMS
|
50
57
|
ruby
|
51
58
|
|
52
59
|
DEPENDENCIES
|
60
|
+
awesome_print
|
53
61
|
kitabu!
|
62
|
+
pry
|
54
63
|
rake
|
55
64
|
rspec
|
56
65
|
test_notifier
|
data/kitabu.gemspec
CHANGED
@@ -19,18 +19,20 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_dependency "activesupport"
|
23
|
-
s.add_dependency "nokogiri"
|
24
|
-
s.add_dependency "RedCloth"
|
25
|
-
s.add_dependency "rdiscount"
|
26
|
-
s.add_dependency "i18n"
|
27
|
-
s.add_dependency "thor"
|
28
|
-
s.add_dependency "eeepub-with-cover-support"
|
29
|
-
s.add_dependency "watchr"
|
30
|
-
s.add_dependency "notifier"
|
22
|
+
s.add_dependency "activesupport"
|
23
|
+
s.add_dependency "nokogiri"
|
24
|
+
s.add_dependency "RedCloth"
|
25
|
+
s.add_dependency "rdiscount"
|
26
|
+
s.add_dependency "i18n"
|
27
|
+
s.add_dependency "thor"
|
28
|
+
s.add_dependency "eeepub-with-cover-support"
|
29
|
+
s.add_dependency "watchr"
|
30
|
+
s.add_dependency "notifier"
|
31
31
|
s.add_dependency "coderay"
|
32
32
|
|
33
33
|
s.add_development_dependency "rspec"
|
34
34
|
s.add_development_dependency "test_notifier"
|
35
35
|
s.add_development_dependency "rake"
|
36
|
+
s.add_development_dependency "pry"
|
37
|
+
s.add_development_dependency "awesome_print"
|
36
38
|
end
|
data/lib/kitabu.rb
CHANGED
@@ -47,6 +47,7 @@ module Kitabu
|
|
47
47
|
autoload :Generator, "kitabu/generator"
|
48
48
|
autoload :TOC, "kitabu/toc"
|
49
49
|
autoload :Cli, "kitabu/cli"
|
50
|
+
autoload :Markdown, "kitabu/adapters/markdown"
|
50
51
|
autoload :Parser, "kitabu/parser"
|
51
52
|
autoload :Exporter, "kitabu/exporter"
|
52
53
|
autoload :Syntax, "kitabu/syntax"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Kitabu
|
2
|
+
class Markdown
|
3
|
+
# Supported Markdown libraries
|
4
|
+
#
|
5
|
+
MARKDOWN_LIBRARIES = %w[Maruku BlueCloth PEGMarkdown Redcarpet RDiscount]
|
6
|
+
|
7
|
+
# Retrieve preferred Markdown processor.
|
8
|
+
# You'll need one of the following libraries:
|
9
|
+
#
|
10
|
+
# # RDiscount: https://rubygems.org/gems/rdiscount
|
11
|
+
# # Maruku: https://rubygems.org/gems/maruku
|
12
|
+
# # PEGMarkdown: https://rubygems.org/gems/rpeg-markdown
|
13
|
+
# # BlueCloth: https://rubygems.org/gems/bluecloth
|
14
|
+
# # Redcarpet: https://rubygems.org/gems/redcarpet
|
15
|
+
#
|
16
|
+
# Note: RDiscount will always be installed as Kitabu's dependency but only used when no
|
17
|
+
# alternative library is available.
|
18
|
+
#
|
19
|
+
def self.engine
|
20
|
+
@engine ||= Object.const_get(MARKDOWN_LIBRARIES.find {|lib| Object.const_defined?(lib)})
|
21
|
+
end
|
22
|
+
|
23
|
+
# Convert Markdown to HTML.
|
24
|
+
def self.to_html(content)
|
25
|
+
case engine.name
|
26
|
+
when "Redcarpet"
|
27
|
+
render = Redcarpet::Render::HTML.new(:hard_wrap => true, :xhtml => true)
|
28
|
+
Redcarpet::Markdown.new(render).render(content)
|
29
|
+
else
|
30
|
+
engine.new(content).to_html
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/kitabu/parser/epub.rb
CHANGED
@@ -28,7 +28,7 @@ module Kitabu
|
|
28
28
|
epub.date config[:published_at]
|
29
29
|
epub.uid config[:uid]
|
30
30
|
epub.identifier config[:identifier][:id], :scheme => config[:identifier][:type]
|
31
|
-
epub.cover_page cover_image
|
31
|
+
epub.cover_page cover_image if cover_image && File.exist?(cover_image)
|
32
32
|
|
33
33
|
write_sections!
|
34
34
|
write_toc!
|
@@ -80,6 +80,8 @@ module Kitabu
|
|
80
80
|
section.html.css("[src]").each do |element|
|
81
81
|
src = File.basename(element["src"]).gsub(/\.svg$/, ".png")
|
82
82
|
element.set_attribute("src", src)
|
83
|
+
element.set_attribute("alt", "")
|
84
|
+
element.node_name = "img"
|
83
85
|
end
|
84
86
|
|
85
87
|
FileUtils.mkdir_p(tmp_dir)
|
@@ -87,7 +89,8 @@ module Kitabu
|
|
87
89
|
# Save file to disk.
|
88
90
|
#
|
89
91
|
File.open(section.filepath, "w") do |file|
|
90
|
-
|
92
|
+
body = section.html.css("body").to_xhtml.gsub(%r[<body>(.*?)</body>]m, "\\1")
|
93
|
+
file << render_chapter(body)
|
91
94
|
end
|
92
95
|
end
|
93
96
|
end
|
@@ -101,7 +104,6 @@ module Kitabu
|
|
101
104
|
@assets ||= begin
|
102
105
|
assets = Dir[root_dir.join("templates/epub/*.css")]
|
103
106
|
assets += Dir[root_dir.join("images/**/*.{jpg,png,gif}")]
|
104
|
-
assets << cover_image if cover_image
|
105
107
|
assets
|
106
108
|
end
|
107
109
|
end
|
data/lib/kitabu/parser/html.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
module Kitabu
|
2
2
|
module Parser
|
3
3
|
class HTML < Base
|
4
|
-
# Supported Markdown libraries
|
5
|
-
#
|
6
|
-
MARKDOWN_LIBRARIES = %w[Maruku BlueCloth PEGMarkdown Redcarpet RDiscount]
|
7
|
-
|
8
4
|
# List of directories that should be skipped.
|
9
5
|
#
|
10
6
|
IGNORE_DIR = %w[. .. .svn]
|
@@ -105,7 +101,7 @@ module Kitabu
|
|
105
101
|
|
106
102
|
content = case file_format
|
107
103
|
when :markdown
|
108
|
-
|
104
|
+
Markdown.to_html(content)
|
109
105
|
when :textile
|
110
106
|
RedCloth.convert(content)
|
111
107
|
else
|
@@ -188,22 +184,6 @@ module Kitabu
|
|
188
184
|
end
|
189
185
|
end
|
190
186
|
end
|
191
|
-
|
192
|
-
# Retrieve preferred Markdown processor.
|
193
|
-
# You'll need one of the following libraries:
|
194
|
-
#
|
195
|
-
# # RDiscount: https://rubygems.org/gems/rdiscount
|
196
|
-
# # Maruku: https://rubygems.org/gems/maruku
|
197
|
-
# # PEGMarkdown: https://rubygems.org/gems/rpeg-markdown
|
198
|
-
# # BlueCloth: https://rubygems.org/gems/bluecloth
|
199
|
-
# # Redcarpet: https://rubygems.org/gems/redcarpet
|
200
|
-
#
|
201
|
-
# Note: RDiscount will always be installed as Kitabu's dependency but only used when no
|
202
|
-
# alternative library is available.
|
203
|
-
#
|
204
|
-
def markdown
|
205
|
-
@markdown ||= Object.const_get(MARKDOWN_LIBRARIES.find {|lib| Object.const_defined?(lib)})
|
206
|
-
end
|
207
187
|
end
|
208
188
|
end
|
209
189
|
end
|
data/lib/kitabu/parser/pdf.rb
CHANGED
@@ -9,7 +9,7 @@ module Kitabu
|
|
9
9
|
def apply_footnotes!
|
10
10
|
html = Nokogiri::HTML(html_file.read)
|
11
11
|
|
12
|
-
# https://github.com/
|
12
|
+
# https://github.com/sparklemotion/nokogiri/issues/339
|
13
13
|
html.css("html").first.tap do |element|
|
14
14
|
next unless element
|
15
15
|
element.delete("xmlns")
|
data/lib/kitabu/parser/txt.rb
CHANGED
data/lib/kitabu/toc/html.rb
CHANGED
data/lib/kitabu/version.rb
CHANGED
data/templates/config.erb
CHANGED
data/templates/layout.css
CHANGED
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.rc3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,152 +9,152 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: nokogiri
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
37
|
+
version: '0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
45
|
+
version: '0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: RedCloth
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '0'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rdiscount
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: i18n
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '0
|
85
|
+
version: '0'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: '0
|
93
|
+
version: '0'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: thor
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0
|
101
|
+
version: '0'
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0
|
109
|
+
version: '0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: eeepub-with-cover-support
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0
|
117
|
+
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0
|
125
|
+
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: watchr
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '0
|
133
|
+
version: '0'
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
none: false
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: '0
|
141
|
+
version: '0'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: notifier
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
none: false
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - ! '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: '0
|
149
|
+
version: '0'
|
150
150
|
type: :runtime
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: '0
|
157
|
+
version: '0'
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: coderay
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,6 +219,38 @@ dependencies:
|
|
219
219
|
- - ! '>='
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
|
+
- !ruby/object:Gem::Dependency
|
223
|
+
name: pry
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
226
|
+
requirements:
|
227
|
+
- - ! '>='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
234
|
+
requirements:
|
235
|
+
- - ! '>='
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
238
|
+
- !ruby/object:Gem::Dependency
|
239
|
+
name: awesome_print
|
240
|
+
requirement: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ! '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '0'
|
246
|
+
type: :development
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
250
|
+
requirements:
|
251
|
+
- - ! '>='
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: '0'
|
222
254
|
description: A framework that generates PDF and e-Pub from Markdown, Textile, and
|
223
255
|
HTML files.
|
224
256
|
email:
|
@@ -265,6 +297,7 @@ files:
|
|
265
297
|
- examples/RailsGuides/text/13_Configuration_gotchas.mkdn
|
266
298
|
- kitabu.gemspec
|
267
299
|
- lib/kitabu.rb
|
300
|
+
- lib/kitabu/adapters/markdown.rb
|
268
301
|
- lib/kitabu/cli.rb
|
269
302
|
- lib/kitabu/dependency.rb
|
270
303
|
- lib/kitabu/errors.rb
|
@@ -310,7 +343,6 @@ files:
|
|
310
343
|
- spec/support/mybook/images/.gitkeep
|
311
344
|
- spec/support/mybook/images/logo.gif
|
312
345
|
- spec/support/mybook/output/.gitkeep
|
313
|
-
- spec/support/mybook/output/mybook.pdf.html
|
314
346
|
- spec/support/mybook/templates/epub/cover.erb
|
315
347
|
- spec/support/mybook/templates/epub/page.erb
|
316
348
|
- spec/support/mybook/templates/epub/style.css
|
@@ -365,46 +397,4 @@ signing_key:
|
|
365
397
|
specification_version: 3
|
366
398
|
summary: A framework that generates PDF and e-Pub from Markdown, Textile, and HTML
|
367
399
|
files.
|
368
|
-
test_files:
|
369
|
-
- spec/kitabu/cli/export_spec.rb
|
370
|
-
- spec/kitabu/cli/new_spec.rb
|
371
|
-
- spec/kitabu/cli/permalinks_spec.rb
|
372
|
-
- spec/kitabu/cli/version_spec.rb
|
373
|
-
- spec/kitabu/extensions/redcloth_spec.rb
|
374
|
-
- spec/kitabu/extensions/string_spec.rb
|
375
|
-
- spec/kitabu/generator_spec.rb
|
376
|
-
- spec/kitabu/parser/epub_spec.rb
|
377
|
-
- spec/kitabu/parser/html_spec.rb
|
378
|
-
- spec/kitabu/parser/pdf_spec.rb
|
379
|
-
- spec/kitabu/syntax_spec.rb
|
380
|
-
- spec/kitabu/toc/html_spec.rb
|
381
|
-
- spec/kitabu_spec.rb
|
382
|
-
- spec/spec_helper.rb
|
383
|
-
- spec/support/exit_with_code.rb
|
384
|
-
- spec/support/have_tag.rb
|
385
|
-
- spec/support/helper.rb
|
386
|
-
- spec/support/mybook/.gitignore
|
387
|
-
- spec/support/mybook/code/.gitkeep
|
388
|
-
- spec/support/mybook/code/code.rb
|
389
|
-
- spec/support/mybook/config/helper.rb
|
390
|
-
- spec/support/mybook/config/kitabu.yml
|
391
|
-
- spec/support/mybook/images/.gitkeep
|
392
|
-
- spec/support/mybook/images/logo.gif
|
393
|
-
- spec/support/mybook/output/.gitkeep
|
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
|
402
|
-
- spec/support/mybook/text/.gitkeep
|
403
|
-
- spec/support/mybook/text/01_Markdown_Chapter.markdown
|
404
|
-
- spec/support/mybook/text/02_Textile_Chapter.textile
|
405
|
-
- spec/support/mybook/text/03_HTML_Chapter.html
|
406
|
-
- spec/support/mybook/text/04_With_Directory/Some_Chapter.mkdn
|
407
|
-
- spec/support/mybook/text/CHANGELOG.textile
|
408
|
-
- spec/support/mybook/text/TOC.textile
|
409
|
-
- spec/support/mybook/text/_00_Introduction.markdown
|
410
|
-
- spec/support/shared.rb
|
400
|
+
test_files: []
|
@@ -1,83 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<title>Testing Kitabu</title>
|
5
|
-
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
6
|
-
<link rel="stylesheet" type="text/css" href="../templates/html/layout.css" />
|
7
|
-
<link rel="stylesheet" type="text/css" href="../templates/html/syntax.css" />
|
8
|
-
<link rel="stylesheet" type="text/css" href="../templates/html/user.css" />
|
9
|
-
<meta name="author" content="John Doe, Mary Doe" />
|
10
|
-
<meta name="subject" content="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." />
|
11
|
-
<meta name="keywords" content="demo, book, pdf, epub, kitabu, textile, html, markdown" />
|
12
|
-
<meta name="date" content="2010-12-19" />
|
13
|
-
</head>
|
14
|
-
<body>
|
15
|
-
<div class="frontcover container">
|
16
|
-
<div>
|
17
|
-
<h1>Testing Kitabu</h1>
|
18
|
-
<p class="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
19
|
-
<p class="authors">John Doe and Mary Doe</p>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<div class="table-of-contents">
|
24
|
-
<h2 class="no-toc">Content</h2>
|
25
|
-
<div id="toc">
|
26
|
-
<div class="level2 markdown"><a href="#markdown"><span>Markdown</span></a></div><div class="level2 textile"><a href="#textile"><span>Textile</span></a></div><div class="level2 html"><a href="#html"><span>HTML</span></a></div><div class="level2 some-chapter"><a href="#some-chapter"><span>Some Chapter</span></a></div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<div id="chapters">
|
31
|
-
<div class="chapter">
|
32
|
-
<h2 id="markdown">Markdown</h2>
|
33
|
-
|
34
|
-
<p>This chapter was written with <a href="http://daringfireball.net/projects/markdown/">Markdown</a>.</p>
|
35
|
-
|
36
|
-
<div class="CodeRay">
|
37
|
-
<div class="code"><pre>nice to hear that!</pre></div>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
</div>
|
45
|
-
<div class="chapter">
|
46
|
-
<h2 id="textile">Textile</h2>
|
47
|
-
<p>This chapter was written with <a href="http://www.textism.com/tools/textile/">Textile</a>.</p>
|
48
|
-
|
49
|
-
</div>
|
50
|
-
<div class="chapter">
|
51
|
-
<h2 id="html">HTML</h2>
|
52
|
-
|
53
|
-
<p>This chapter was written with HTML.</p>
|
54
|
-
|
55
|
-
|
56
|
-
</div>
|
57
|
-
<div class="chapter">
|
58
|
-
<h2 id="some-chapter">Some Chapter</h2>
|
59
|
-
|
60
|
-
<p>Some chapter organized in a directory.</p>
|
61
|
-
|
62
|
-
|
63
|
-
</div>
|
64
|
-
</div>
|
65
|
-
|
66
|
-
<div class="imprint container">
|
67
|
-
<div>
|
68
|
-
<h2>Testing Kitabu</h2>
|
69
|
-
<p>John Doe and Mary Doe</p>
|
70
|
-
<p>Copyright (C) 2010 John Doe.</p>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
|
74
|
-
|
75
|
-
<div class="container changelog">
|
76
|
-
<h2>Revisions</h2>
|
77
|
-
<h3>Version 1</h3>
|
78
|
-
<ul><li>Some text fixes</li>
|
79
|
-
<li>Added chapter about something</li>
|
80
|
-
</ul></div>
|
81
|
-
|
82
|
-
</body>
|
83
|
-
</html>
|