kitabu 2.0.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +5 -5
  2. data/.github/CODEOWNERS +4 -0
  3. data/.github/FUNDING.yml +4 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  5. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  6. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  7. data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
  8. data/.github/dependabot.yml +15 -0
  9. data/.github/workflows/ruby-tests.yml +61 -0
  10. data/.gitignore +1 -0
  11. data/.rubocop.yml +17 -0
  12. data/CHANGELOG.md +34 -1
  13. data/CODE_OF_CONDUCT.md +74 -0
  14. data/CONTRIBUTING.md +79 -0
  15. data/Gemfile +2 -0
  16. data/LICENSE.md +20 -0
  17. data/README.md +121 -85
  18. data/Rakefile +7 -0
  19. data/bin/kitabu +4 -0
  20. data/kitabu.gemspec +20 -14
  21. data/lib/kitabu/cli.rb +54 -39
  22. data/lib/kitabu/dependency.rb +11 -5
  23. data/lib/kitabu/errors.rb +2 -0
  24. data/lib/kitabu/exporter/base.rb +13 -11
  25. data/lib/kitabu/exporter/css.rb +6 -14
  26. data/lib/kitabu/exporter/epub.rb +24 -18
  27. data/lib/kitabu/exporter/html.rb +33 -20
  28. data/lib/kitabu/exporter/mobi.rb +7 -1
  29. data/lib/kitabu/exporter/pdf.rb +9 -3
  30. data/lib/kitabu/exporter.rb +15 -16
  31. data/lib/kitabu/extensions/rouge.rb +7 -1
  32. data/lib/kitabu/extensions/string.rb +5 -3
  33. data/lib/kitabu/footnotes/base.rb +2 -0
  34. data/lib/kitabu/footnotes/html.rb +19 -12
  35. data/lib/kitabu/footnotes/pdf.rb +17 -11
  36. data/lib/kitabu/generator.rb +16 -8
  37. data/lib/kitabu/helpers.rb +12 -9
  38. data/lib/kitabu/markdown.rb +12 -10
  39. data/lib/kitabu/source_list.rb +15 -12
  40. data/lib/kitabu/stats.rb +3 -1
  41. data/lib/kitabu/syntax/highlight.rb +4 -11
  42. data/lib/kitabu/toc/epub.rb +5 -2
  43. data/lib/kitabu/toc/html/stream.rb +33 -0
  44. data/lib/kitabu/toc/html.rb +19 -9
  45. data/lib/kitabu/version.rb +4 -2
  46. data/lib/kitabu.rb +11 -12
  47. data/spec/kitabu/cli/export_spec.rb +6 -4
  48. data/spec/kitabu/cli/new_spec.rb +6 -4
  49. data/spec/kitabu/cli/permalinks_spec.rb +4 -2
  50. data/spec/kitabu/cli/stats_spec.rb +19 -15
  51. data/spec/kitabu/cli/version_spec.rb +3 -1
  52. data/spec/kitabu/exporter/css_spec.rb +3 -1
  53. data/spec/kitabu/exporter/epub_spec.rb +2 -0
  54. data/spec/kitabu/exporter/html_spec.rb +17 -4
  55. data/spec/kitabu/exporter/mobi_spec.rb +5 -5
  56. data/spec/kitabu/exporter/pdf_spec.rb +8 -4
  57. data/spec/kitabu/extensions/string_spec.rb +14 -9
  58. data/spec/kitabu/footnotes/html_spec.rb +38 -28
  59. data/spec/kitabu/generator_spec.rb +3 -1
  60. data/spec/kitabu/markdown_spec.rb +15 -3
  61. data/spec/kitabu/source_list_spec.rb +8 -2
  62. data/spec/kitabu/stats_spec.rb +10 -6
  63. data/spec/kitabu/toc/html_spec.rb +55 -35
  64. data/spec/spec_helper.rb +23 -8
  65. data/spec/support/exit_with_code.rb +7 -5
  66. data/spec/support/have_tag.rb +44 -32
  67. data/spec/support/helper.rb +5 -3
  68. data/spec/support/mybook/code/code.rb +2 -0
  69. data/spec/support/mybook/config/helper.rb +2 -0
  70. data/spec/support/mybook/fonts/OpenSans-CondBold.ttf +0 -0
  71. data/spec/support/shared.rb +12 -6
  72. data/templates/Gemfile +5 -3
  73. data/templates/Guardfile +3 -1
  74. data/templates/helper.rb +8 -6
  75. data/templates/templates/styles/epub.css +1 -0
  76. data/templates/templates/styles/files/normalize.css +351 -0
  77. data/templates/templates/styles/{html.scss → html.css} +28 -26
  78. data/templates/templates/styles/{pdf.scss → pdf.css} +49 -47
  79. data/templates/templates/styles/print.css +2 -0
  80. data/templates/text/01_Getting_Started.md +27 -9
  81. data/templates/text/02_Creating_Chapters.md +9 -3
  82. data/templates/text/{03_Syntax_Highlighting.erb → 03_Syntax_Highlighting.md.erb} +12 -7
  83. data/templates/text/04_Dynamic_Content.md.erb +48 -0
  84. data/templates/text/05_Exporting_Files.md +17 -8
  85. metadata +42 -50
  86. data/.gitmodules +0 -3
  87. data/.travis.yml +0 -18
  88. data/Gemfile.lock +0 -108
  89. data/lib/kitabu/exporter/txt.rb +0 -18
  90. data/lib/kitabu/stream.rb +0 -27
  91. data/lib/kitabu/toc.rb +0 -6
  92. data/spec/kitabu/exporter/txt_spec.rb +0 -14
  93. data/templates/ebook.png +0 -0
  94. data/templates/templates/styles/epub.scss +0 -1
  95. data/templates/templates/styles/files/_normalize.scss +0 -427
  96. data/templates/templates/styles/print.scss +0 -2
  97. data/templates/text/04_Dynamic_Content.erb +0 -64
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitabu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: nokogiri
28
+ name: eeepub-with-cover-support
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: thor
56
+ name: nokogiri
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: eeepub-with-cover-support
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: rouge
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +95,7 @@ dependencies:
109
95
  - !ruby/object:Gem::Version
110
96
  version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
- name: notifier
98
+ name: rubyzip
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - ">="
@@ -123,7 +109,7 @@ dependencies:
123
109
  - !ruby/object:Gem::Version
124
110
  version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
- name: rubyzip
112
+ name: thor
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - ">="
@@ -151,13 +137,13 @@ dependencies:
151
137
  - !ruby/object:Gem::Version
152
138
  version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
- name: sass
140
+ name: pry-meta
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
143
  - - ">="
158
144
  - !ruby/object:Gem::Version
159
145
  version: '0'
160
- type: :runtime
146
+ type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
@@ -165,13 +151,13 @@ dependencies:
165
151
  - !ruby/object:Gem::Version
166
152
  version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
- name: sass-globbing
154
+ name: rake
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - ">="
172
158
  - !ruby/object:Gem::Version
173
159
  version: '0'
174
- type: :runtime
160
+ type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
@@ -193,7 +179,7 @@ dependencies:
193
179
  - !ruby/object:Gem::Version
194
180
  version: '0'
195
181
  - !ruby/object:Gem::Dependency
196
- name: rake
182
+ name: rubocop
197
183
  requirement: !ruby/object:Gem::Requirement
198
184
  requirements:
199
185
  - - ">="
@@ -207,7 +193,7 @@ dependencies:
207
193
  - !ruby/object:Gem::Version
208
194
  version: '0'
209
195
  - !ruby/object:Gem::Dependency
210
- name: pry-meta
196
+ name: rubocop-fnando
211
197
  requirement: !ruby/object:Gem::Requirement
212
198
  requirements:
213
199
  - - ">="
@@ -221,7 +207,7 @@ dependencies:
221
207
  - !ruby/object:Gem::Version
222
208
  version: '0'
223
209
  - !ruby/object:Gem::Dependency
224
- name: codeclimate-test-reporter
210
+ name: simplecov
225
211
  requirement: !ruby/object:Gem::Requirement
226
212
  requirements:
227
213
  - - ">="
@@ -244,13 +230,22 @@ executables:
244
230
  extensions: []
245
231
  extra_rdoc_files: []
246
232
  files:
233
+ - ".github/CODEOWNERS"
234
+ - ".github/FUNDING.yml"
235
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
236
+ - ".github/ISSUE_TEMPLATE/config.yml"
237
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
238
+ - ".github/PULL_REQUEST_TEMPLATE.md"
239
+ - ".github/dependabot.yml"
240
+ - ".github/workflows/ruby-tests.yml"
247
241
  - ".gitignore"
248
- - ".gitmodules"
249
242
  - ".rspec"
250
- - ".travis.yml"
243
+ - ".rubocop.yml"
251
244
  - CHANGELOG.md
245
+ - CODE_OF_CONDUCT.md
246
+ - CONTRIBUTING.md
252
247
  - Gemfile
253
- - Gemfile.lock
248
+ - LICENSE.md
254
249
  - README.md
255
250
  - Rakefile
256
251
  - attachments/browser-version.png
@@ -271,7 +266,6 @@ files:
271
266
  - lib/kitabu/exporter/html.rb
272
267
  - lib/kitabu/exporter/mobi.rb
273
268
  - lib/kitabu/exporter/pdf.rb
274
- - lib/kitabu/exporter/txt.rb
275
269
  - lib/kitabu/extensions/rouge.rb
276
270
  - lib/kitabu/extensions/string.rb
277
271
  - lib/kitabu/footnotes/base.rb
@@ -282,11 +276,10 @@ files:
282
276
  - lib/kitabu/markdown.rb
283
277
  - lib/kitabu/source_list.rb
284
278
  - lib/kitabu/stats.rb
285
- - lib/kitabu/stream.rb
286
279
  - lib/kitabu/syntax/highlight.rb
287
- - lib/kitabu/toc.rb
288
280
  - lib/kitabu/toc/epub.rb
289
281
  - lib/kitabu/toc/html.rb
282
+ - lib/kitabu/toc/html/stream.rb
290
283
  - lib/kitabu/version.rb
291
284
  - spec/kitabu/cli/export_spec.rb
292
285
  - spec/kitabu/cli/new_spec.rb
@@ -298,7 +291,6 @@ files:
298
291
  - spec/kitabu/exporter/html_spec.rb
299
292
  - spec/kitabu/exporter/mobi_spec.rb
300
293
  - spec/kitabu/exporter/pdf_spec.rb
301
- - spec/kitabu/exporter/txt_spec.rb
302
294
  - spec/kitabu/extensions/string_spec.rb
303
295
  - spec/kitabu/footnotes/html_spec.rb
304
296
  - spec/kitabu/generator_spec.rb
@@ -315,6 +307,7 @@ files:
315
307
  - spec/support/mybook/code/code.rb
316
308
  - spec/support/mybook/config/helper.rb
317
309
  - spec/support/mybook/config/kitabu.yml
310
+ - spec/support/mybook/fonts/OpenSans-CondBold.ttf
318
311
  - spec/support/mybook/images/.gitkeep
319
312
  - spec/support/mybook/images/logo.gif
320
313
  - spec/support/mybook/templates/epub/cover.erb
@@ -337,7 +330,6 @@ files:
337
330
  - templates/Guardfile
338
331
  - templates/config.erb
339
332
  - templates/cover.erb
340
- - templates/ebook.png
341
333
  - templates/epub.erb
342
334
  - templates/helper.rb
343
335
  - templates/images/.gitkeep
@@ -351,23 +343,24 @@ files:
351
343
  - templates/templates/epub/cover.png
352
344
  - templates/templates/epub/page.erb
353
345
  - templates/templates/html/layout.erb
354
- - templates/templates/styles/epub.scss
355
- - templates/templates/styles/files/_normalize.scss
356
- - templates/templates/styles/html.scss
357
- - templates/templates/styles/pdf.scss
358
- - templates/templates/styles/print.scss
346
+ - templates/templates/styles/epub.css
347
+ - templates/templates/styles/files/normalize.css
348
+ - templates/templates/styles/html.css
349
+ - templates/templates/styles/pdf.css
350
+ - templates/templates/styles/print.css
359
351
  - templates/text/01_Getting_Started.md
360
352
  - templates/text/02_Creating_Chapters.md
361
- - templates/text/03_Syntax_Highlighting.erb
362
- - templates/text/04_Dynamic_Content.erb
353
+ - templates/text/03_Syntax_Highlighting.md.erb
354
+ - templates/text/04_Dynamic_Content.md.erb
363
355
  - templates/text/05_Exporting_Files.md
364
356
  - vendor/bin/tidy5_linux
365
357
  - vendor/bin/tidy5_osx
366
358
  homepage: http://rubygems.org/gems/kitabu
367
359
  licenses:
368
360
  - MIT
369
- metadata: {}
370
- post_install_message:
361
+ metadata:
362
+ rubygems_mfa_required: 'true'
363
+ post_install_message:
371
364
  rdoc_options: []
372
365
  require_paths:
373
366
  - lib
@@ -375,16 +368,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
375
368
  requirements:
376
369
  - - ">="
377
370
  - !ruby/object:Gem::Version
378
- version: '2.0'
371
+ version: '2.7'
379
372
  required_rubygems_version: !ruby/object:Gem::Requirement
380
373
  requirements:
381
374
  - - ">="
382
375
  - !ruby/object:Gem::Version
383
376
  version: '0'
384
377
  requirements: []
385
- rubyforge_project:
386
- rubygems_version: 2.4.6
387
- signing_key:
378
+ rubygems_version: 3.3.7
379
+ signing_key:
388
380
  specification_version: 4
389
381
  summary: A framework for creating e-books from Markdown using Ruby. Using the Prince
390
382
  PDF generator, you'll be able to get high quality PDFs. Also supports EPUB, Mobi,
@@ -400,7 +392,6 @@ test_files:
400
392
  - spec/kitabu/exporter/html_spec.rb
401
393
  - spec/kitabu/exporter/mobi_spec.rb
402
394
  - spec/kitabu/exporter/pdf_spec.rb
403
- - spec/kitabu/exporter/txt_spec.rb
404
395
  - spec/kitabu/extensions/string_spec.rb
405
396
  - spec/kitabu/footnotes/html_spec.rb
406
397
  - spec/kitabu/generator_spec.rb
@@ -417,6 +408,7 @@ test_files:
417
408
  - spec/support/mybook/code/code.rb
418
409
  - spec/support/mybook/config/helper.rb
419
410
  - spec/support/mybook/config/kitabu.yml
411
+ - spec/support/mybook/fonts/OpenSans-CondBold.ttf
420
412
  - spec/support/mybook/images/.gitkeep
421
413
  - spec/support/mybook/images/logo.gif
422
414
  - spec/support/mybook/templates/epub/cover.erb
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "lib/kitabu/vendor/colorize"]
2
- path = lib/kitabu/vendor/colorize
3
- url = git://github.com/fnando/colorize.git
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- sudo: true
4
- script: bundle exec rspec
5
- before_install:
6
- - wget http://www.princexml.com/download/prince_9.0-5_ubuntu12.04_amd64.deb
7
- - sudo apt-get install -yqq fontconfig-config libfontconfig1 libgif4 libjpeg-turbo8 libjpeg8 libtiff4 ttf-dejavu-core html2text
8
- - sudo dpkg -i prince_9.0-5_ubuntu12.04_amd64.deb
9
- rvm:
10
- - '2.0'
11
- - '2.1'
12
- - '2.2'
13
- notifications:
14
- email: false
15
- addons:
16
- code_climate:
17
- repo_token:
18
- secure: "WvgB6WqwxgwLvNCR/dFtm9JkQfaLMLuqaFs2nKKsw92BL4qi3rk3m3GxVR+LoODWx0Tsdl9zCWF3fFBwmgiM7eFdqSJ4dmy3iTH7fHOu/iruP6yDV9+iyI6oNXLGlyx4kZdxGvjOh95AFBMQ1KQis/0ibzA5Ax2qg19JUcB3+ao="
data/Gemfile.lock DELETED
@@ -1,108 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- kitabu (2.0.2)
5
- activesupport
6
- eeepub-with-cover-support
7
- i18n
8
- nokogiri
9
- notifier
10
- redcarpet
11
- rouge
12
- rubyzip
13
- sass
14
- sass-globbing
15
- thor
16
- zip-zip
17
-
18
- GEM
19
- remote: https://rubygems.org/
20
- specs:
21
- activesupport (4.2.0)
22
- i18n (~> 0.7)
23
- json (~> 1.7, >= 1.7.7)
24
- minitest (~> 5.1)
25
- thread_safe (~> 0.3, >= 0.3.4)
26
- tzinfo (~> 1.1)
27
- awesome_print (1.6.1)
28
- builder (3.2.2)
29
- byebug (3.5.1)
30
- columnize (~> 0.8)
31
- debugger-linecache (~> 1.2)
32
- slop (~> 3.6)
33
- codeclimate-test-reporter (0.4.7)
34
- simplecov (>= 0.7.1, < 1.0.0)
35
- coderay (1.1.0)
36
- columnize (0.9.0)
37
- debugger-linecache (1.2.0)
38
- diff-lcs (1.2.5)
39
- docile (1.1.5)
40
- eeepub-with-cover-support (0.8.8)
41
- builder
42
- rubyzip
43
- i18n (0.7.0)
44
- json (1.8.2)
45
- method_source (0.8.2)
46
- mini_portile (0.6.2)
47
- minitest (5.5.1)
48
- multi_json (1.11.0)
49
- nokogiri (1.6.6.2)
50
- mini_portile (~> 0.6.0)
51
- notifier (0.5.0)
52
- pry (0.10.1)
53
- coderay (~> 1.1.0)
54
- method_source (~> 0.8.1)
55
- slop (~> 3.4)
56
- pry-byebug (3.0.1)
57
- byebug (~> 3.4)
58
- pry (~> 0.10)
59
- pry-meta (0.0.10)
60
- awesome_print
61
- pry
62
- pry-byebug
63
- pry-remote
64
- pry-remote (0.1.8)
65
- pry (~> 0.9)
66
- slop (~> 3.0)
67
- rake (10.4.2)
68
- redcarpet (3.2.2)
69
- rouge (1.8.0)
70
- rspec (3.2.0)
71
- rspec-core (~> 3.2.0)
72
- rspec-expectations (~> 3.2.0)
73
- rspec-mocks (~> 3.2.0)
74
- rspec-core (3.2.2)
75
- rspec-support (~> 3.2.0)
76
- rspec-expectations (3.2.0)
77
- diff-lcs (>= 1.2.0, < 2.0)
78
- rspec-support (~> 3.2.0)
79
- rspec-mocks (3.2.1)
80
- diff-lcs (>= 1.2.0, < 2.0)
81
- rspec-support (~> 3.2.0)
82
- rspec-support (3.2.2)
83
- rubyzip (1.1.7)
84
- sass (3.4.13)
85
- sass-globbing (1.1.1)
86
- sass (>= 3.1)
87
- simplecov (0.9.2)
88
- docile (~> 1.1.0)
89
- multi_json (~> 1.0)
90
- simplecov-html (~> 0.9.0)
91
- simplecov-html (0.9.0)
92
- slop (3.6.0)
93
- thor (0.19.1)
94
- thread_safe (0.3.5)
95
- tzinfo (1.2.2)
96
- thread_safe (~> 0.1)
97
- zip-zip (0.3)
98
- rubyzip (>= 1.0.0)
99
-
100
- PLATFORMS
101
- ruby
102
-
103
- DEPENDENCIES
104
- codeclimate-test-reporter
105
- kitabu!
106
- pry-meta
107
- rake
108
- rspec
@@ -1,18 +0,0 @@
1
- module Kitabu
2
- class Exporter
3
- class Txt < Base
4
- def export
5
- spawn_command ["html2text", "-style", "pretty", "-nobs", "-o", txt_file.to_s, html_file.to_s]
6
- end
7
-
8
- def html_file
9
- root_dir.join("output/#{name}.html")
10
- end
11
-
12
- def txt_file
13
- root_dir.join("output/#{name}.txt")
14
- end
15
- end
16
- end
17
- end
18
-
data/lib/kitabu/stream.rb DELETED
@@ -1,27 +0,0 @@
1
- module Kitabu
2
- class Stream
3
- attr_accessor :listener, :content
4
- attr_reader :html
5
-
6
- def initialize(content, listener)
7
- @content = content
8
- @listener = listener
9
- @html = Nokogiri::HTML.parse(content)
10
- end
11
-
12
- def parse
13
- traverse(html)
14
- end
15
-
16
- def traverse(node)
17
- node.children.each do |child|
18
- emit(child)
19
- traverse(child)
20
- end
21
- end
22
-
23
- def emit(node)
24
- listener.tag(node) if node.name =~ /h[1-6]/
25
- end
26
- end
27
- end
data/lib/kitabu/toc.rb DELETED
@@ -1,6 +0,0 @@
1
- module Kitabu
2
- module TOC
3
- autoload :HTML, "kitabu/toc/html"
4
- autoload :Epub, "kitabu/toc/epub"
5
- end
6
- end
@@ -1,14 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Kitabu::Exporter::Txt, html2text: Kitabu::Dependency.html2text? do
4
- let(:root) { SPECDIR.join("support/mybook") }
5
-
6
- before do
7
- Kitabu::Exporter::HTML.export(root)
8
- Kitabu::Exporter::Txt.export(root)
9
- end
10
-
11
- it "generates text file" do
12
- expect(root.join("output/mybook.txt")).to be_file
13
- end
14
- end
data/templates/ebook.png DELETED
Binary file
@@ -1 +0,0 @@
1
- @import './files/normalize';