review 3.1.0 → 3.2.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +11 -1
  3. data/.travis.yml +16 -15
  4. data/NEWS.ja.md +75 -0
  5. data/NEWS.md +75 -0
  6. data/appveyor.yml +20 -2
  7. data/bin/review-catalog-converter +3 -3
  8. data/bin/review-check +3 -3
  9. data/bin/review-compile +6 -6
  10. data/bin/review-epubmaker +3 -35
  11. data/bin/review-index +5 -5
  12. data/bin/review-preproc +4 -4
  13. data/bin/review-vol +5 -5
  14. data/doc/format.ja.md +6 -4
  15. data/doc/format.md +3 -1
  16. data/lib/epubmaker/epubcommon.rb +1 -2
  17. data/lib/epubmaker/epubv2.rb +1 -1
  18. data/lib/epubmaker/epubv3.rb +1 -0
  19. data/lib/epubmaker/producer.rb +2 -1
  20. data/lib/review/book/base.rb +5 -5
  21. data/lib/review/book/index.rb +18 -5
  22. data/lib/review/builder.rb +8 -2
  23. data/lib/review/compiler.rb +11 -34
  24. data/lib/review/epub2html.rb +37 -4
  25. data/lib/review/epubmaker.rb +40 -3
  26. data/lib/review/htmlbuilder.rb +2 -2
  27. data/lib/review/idgxmlbuilder.rb +9 -8
  28. data/lib/review/init.rb +7 -7
  29. data/lib/review/latexbuilder.rb +36 -14
  30. data/lib/review/location.rb +32 -0
  31. data/lib/review/markdownbuilder.rb +8 -1
  32. data/lib/review/plaintextbuilder.rb +9 -9
  33. data/lib/review/preprocessor.rb +2 -24
  34. data/lib/review/topbuilder.rb +4 -4
  35. data/lib/review/update.rb +3 -3
  36. data/lib/review/version.rb +1 -1
  37. data/lib/review/yamlloader.rb +23 -16
  38. data/review.gemspec +3 -2
  39. data/templates/latex/config.erb +4 -0
  40. data/templates/latex/review-jlreq/review-base.sty +45 -22
  41. data/templates/latex/review-jsbook/review-base.sty +20 -15
  42. data/templates/latex/review-jsbook/review-jsbook.cls +3 -3
  43. data/templates/opf/epubv3.opf.erb +1 -0
  44. data/test/assets/test_template.tex +4 -0
  45. data/test/assets/test_template_backmatter.tex +4 -0
  46. data/test/test_book.rb +1 -1
  47. data/test/test_builder.rb +16 -0
  48. data/test/test_catalog.rb +5 -0
  49. data/test/test_htmlbuilder.rb +471 -96
  50. data/test/test_idgxmlbuilder.rb +132 -17
  51. data/test/test_index.rb +40 -0
  52. data/test/test_latexbuilder.rb +668 -72
  53. data/test/test_latexbuilder_v2.rb +597 -68
  54. data/test/test_markdownbuilder.rb +90 -13
  55. data/test/test_md2inaobuilder.rb +20 -7
  56. data/test/test_plaintextbuilder.rb +241 -19
  57. data/test/test_preprocessor.rb +2 -16
  58. data/test/test_rstbuilder.rb +216 -22
  59. data/test/test_topbuilder.rb +334 -22
  60. metadata +20 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e84bcc2665b217e208b209c794a7d4e4a71440f8094cb32e969e294ef49b525b
4
- data.tar.gz: 5a27039b3a6fa44437786debfc54fa2fe24213fdb497a84d4a483bb590fd1118
3
+ metadata.gz: fd7268a71d883dbd67373a3a6c3d4d151b67cb01e6545bf83fc1b26ce9eaee02
4
+ data.tar.gz: 3214804b54cba60f961ceda0ee83f8f2d50080ba3bbd691cca179057bd8dc3ac
5
5
  SHA512:
6
- metadata.gz: cadd2c9a936fd38bd84f15d9b06fd0e85cd1df1b32e8116e165f4dd67801cdef887ca0e1c788ed8d5c3cc3b9979d729eb886149b7c188d2d461f459d6da36923
7
- data.tar.gz: ce5a14cc670d7c57ce8fb6b7c2a885dc9bdef074da06eaa3a83d1bca5eeaa4196d42f60763d86e0aa2afe8a2115ad38f3e6e43ef69aaedd930dd938eefb50bd5
6
+ metadata.gz: bc7ccb389d4c6d836adf683f53961646e126149a63c29cda14ecbc4b95b44745a856169326ab98e84d5189b8fca4bb08dbf7292089990231a1c22063ccf58557
7
+ data.tar.gz: 49790ebe6d85e685b1e9fbc0f1bc635a050ca844c8dd34369e79dee8972884c5bb1f2f9cce194ce7c7947d303503b4ba549741ab1f8069a924309b6696934701
@@ -5,6 +5,9 @@ AllCops:
5
5
  - test/syntax-book/*
6
6
  DisplayCopNames: true
7
7
 
8
+ require:
9
+ - rubocop-performance
10
+
8
11
  inherit_from: .rubocop_todo.yml
9
12
 
10
13
  #### Lint
@@ -90,6 +93,9 @@ Style/ClassMethods:
90
93
  Style/CommentedKeyword:
91
94
  Enabled: false
92
95
 
96
+ Style/FloatDivision:
97
+ Enabled: false
98
+
93
99
  # Do not introduce global variables.
94
100
  Style/GlobalVars:
95
101
  Enabled: true
@@ -331,7 +337,7 @@ Layout/IndentationConsistency:
331
337
  Layout/IndentationWidth:
332
338
  Enabled: true
333
339
 
334
- Layout/IndentHash:
340
+ Layout/IndentFirstHashElement:
335
341
  Enabled: true
336
342
 
337
343
  Layout/IndentHeredoc:
@@ -384,6 +390,10 @@ Layout/SpaceInsideStringInterpolation:
384
390
  Layout/TrailingBlankLines:
385
391
  Enabled: true
386
392
 
393
+ Layout/TrailingWhitespace:
394
+ Enabled: true
395
+ AllowInHeredoc: true
396
+
387
397
  #### Metrics
388
398
 
389
399
  Metrics/BlockNesting:
@@ -2,6 +2,10 @@ language: ruby
2
2
  sudo: false
3
3
  dist: trusty
4
4
 
5
+ os:
6
+ - linux
7
+ - osx
8
+
5
9
  addons:
6
10
  apt:
7
11
  packages:
@@ -12,23 +16,20 @@ addons:
12
16
 
13
17
  before_install:
14
18
  - |-
15
- RUBY_VER=`ruby -e "print RUBY_VERSION"`
16
- if [ "$RUBY_VER" = "2.1.10" ]; then
17
- gem install bundler -v '< 2'
18
- elif [ "$RUBY_VER" = "2.2.10" ]; then
19
- gem install bundler -v '< 2'
20
- else
21
- gem update --system
22
- gem install bundler
23
- fi
19
+ gem update --system
20
+ gem install bundler
21
+ gem install epubcheck-ruby
22
+
23
+ script:
24
+ - bundle exec rake
25
+ - ruby bin/review-init hello && cd hello && ruby ../bin/review-epubmaker config.yml && epubcheck book.epub
26
+ - cd ..
27
+ - ruby bin/review-init hello2 --epub-version 2 && cd hello2 && ruby ../bin/review-epubmaker config.yml && epubcheck book.epub
24
28
 
25
29
  rvm:
26
- - 2.1
27
- - 2.2.10
28
- - 2.3.8
29
- - 2.4.5
30
- - 2.5.3
31
- - 2.6.0
30
+ - 2.4.6
31
+ - 2.5.5
32
+ - 2.6.3
32
33
  ## - ruby-head
33
34
 
34
35
  branches:
data/NEWS.ja.md CHANGED
@@ -1,3 +1,78 @@
1
+ # Version 3.2.0
2
+
3
+ ## 新機能
4
+ ## 非互換の変更
5
+ * PDFMaker: `//image` 命令などで画像を配置するときに `\includegraphics` ではなく、それを抽象化した `\reviewincludegraphics` を使うようにしました ([#1318])
6
+
7
+ ## バグ修正
8
+ * 別の章の図表やリストを参照する際に章が存在しないとき、内部エラーではなく標準のキーエラーを返すようにしました ([#1284])
9
+ * review-compile のエラーメッセージで提示する値の誤りを修正しました ([#1286])
10
+ * PDFMaker: review-jsbook において、serial_pagination=true を設定しているとき、PDF のページ番号のメタ情報がおかしくなるのを修正しました ([#1288])
11
+ * notoc, nodisp, nonum を含む見出しを `@<hd>` で参照したときに番号が付いてしまうこと、およびその後の見出しの番号がおかしくなることを修正しました ([#1294])
12
+ * PDFMaker: jlreq.cls 0401 版利用時に review-jlreq.cls でエラーが出るのを修正しました ([#1298])
13
+ * EPUBMaker: EPUB2 の生成に失敗するのを修正しました ([#1301])
14
+ * EPUBMaker: Windows で一時フォルダの削除にときどき失敗する現象に対処しました ([#1011])
15
+ * PDFMaker: `@<bou>` をサポートしました ([#1220])
16
+ * PDFMaker: jlreq.cls の古いバージョンでも動くように対処しました ([#1317])
17
+
18
+ ## 機能強化
19
+ * `CHAPS:` が空のときのテストを追加しました ([#1275])
20
+ * PDFMaker: 安全のため、reviewtt などのインライン書体命令を RobustCommand マクロで定義するようにしました ([#1280])
21
+ * EPUBMaker: デバッグモードで実行する `--debug` オプションを追加しました ([#1281])
22
+ * review-epub2html: 脚注をインラインで表現する `--inline-footnote` オプションを追加しました ([#1283])
23
+ * EPUBMaker: iBooks 向けに、EPUB3 においても表紙画像のメタデータを入れるようにしました ([#1293])
24
+ * PDFMaker: review-jsbook および review-jlreq において、コードリストや数式のキャプションの直後に改ページされる現象を程度抑制するようにしました ([#1299])
25
+ * rubocop 0.67.2 に基づいてコードを整形しました ([#1297])
26
+ * EPUB 作成のテストを追加しました ([#1300])
27
+ * テスト対象の Ruby バージョンを 2.4.6, 2.5.5, 2.6.3 としました ([#1303])
28
+ * YAMLLoader のコードを改良しました ([#1304])
29
+ * `*` の箇条書きで、`**` から始めたり、`*` のあとに `***` を使ったりといった不正なレベル指定をエラーにしました ([#1313])
30
+ * ReVIEW::Location クラスを分離しました ([#1308])
31
+ * 箇条書きや文献リストで複数行の英単語が連結されてしまうのを回避しました (ただし PDFMaker のみ) ([#1312])
32
+ * 空の表があったときにエラーを出すようにしました ([#1325])
33
+ * いくつかのテスト対象を追加しました ([#1327], [#1328])
34
+ * MARKDOWNBuilder: ``//listnum``に対応しました ([#1336])
35
+
36
+ ## ドキュメント
37
+ * 見出しのレベルの説明の誤りを修正しました ([#1309])
38
+
39
+ ## その他
40
+ * もう使われていない ReVIEW::Preprocessor::Strip を削除しました ([#1305])
41
+
42
+ ## コントリビューターのみなさん
43
+ * [@uetchy](https://github.com/uetchy)
44
+ * [@mitsuo0114](https://github.com/mitsuo0114)
45
+
46
+ [#1011]: https://github.com/kmuto/review/issues/1011
47
+ [#1220]: https://github.com/kmuto/review/issues/1220
48
+ [#1275]: https://github.com/kmuto/review/pull/1275
49
+ [#1280]: https://github.com/kmuto/review/pull/1280
50
+ [#1281]: https://github.com/kmuto/review/issues/1281
51
+ [#1283]: https://github.com/kmuto/review/pull/1283
52
+ [#1284]: https://github.com/kmuto/review/issues/1284
53
+ [#1286]: https://github.com/kmuto/review/pull/1286
54
+ [#1288]: https://github.com/kmuto/review/issues/1288
55
+ [#1293]: https://github.com/kmuto/review/pull/1293
56
+ [#1294]: https://github.com/kmuto/review/issues/1294
57
+ [#1297]: https://github.com/kmuto/review/pull/1297
58
+ [#1298]: https://github.com/kmuto/review/pull/1298
59
+ [#1299]: https://github.com/kmuto/review/pull/1299
60
+ [#1300]: https://github.com/kmuto/review/pull/1300
61
+ [#1301]: https://github.com/kmuto/review/pull/1301
62
+ [#1303]: https://github.com/kmuto/review/pull/1303
63
+ [#1304]: https://github.com/kmuto/review/pull/1304
64
+ [#1305]: https://github.com/kmuto/review/pull/1305
65
+ [#1308]: https://github.com/kmuto/review/pull/1308
66
+ [#1309]: https://github.com/kmuto/review/issues/1309
67
+ [#1312]: https://github.com/kmuto/review/issues/1312
68
+ [#1313]: https://github.com/kmuto/review/issues/1313
69
+ [#1317]: https://github.com/kmuto/review/pull/1317
70
+ [#1318]: https://github.com/kmuto/review/issues/1318
71
+ [#1325]: https://github.com/kmuto/review/issues/1325
72
+ [#1327]: https://github.com/kmuto/review/issues/1327
73
+ [#1328]: https://github.com/kmuto/review/pull/1328
74
+ [#1336]: https://github.com/kmuto/review/pull/1336
75
+
1
76
  # Version 3.1.0
2
77
 
3
78
  ## 非互換の変更
data/NEWS.md CHANGED
@@ -1,3 +1,78 @@
1
+ # Version 3.2.0
2
+
3
+ ## New Features
4
+ ## Breaking Changes
5
+ * PDFMaker: changed to use the abstract name `\reviewincludegraphics` instead of `\includegraphics` for image placements (such as `//image`) ([#1318])
6
+
7
+ ## Bug Fixes
8
+ * reference to IDs of non-existent chapter now return standard key error (instead of internal error) ([#1284])
9
+ * fixed the value in the error message of review-compile ([#1286])
10
+ * PDFMaker: fixed the metadata of PDF page number was wrong when using review-jsbook with serial_pagination = true ([#1288])
11
+ * fixed a bug when using `@<hd>` to refer to headings with notoc, nodisp, or nonum ([#1294])
12
+ * PDFMaker: fixed an error in review-jlreq when using jlreq.cls version 0401 ([#1298])
13
+ * EPUBMaker: fixed a error of building EPUB2 ([#1301])
14
+ * EPUBMaker: added a workaround for a temporary folder deletion failure on Windows ([#1011])
15
+ * PDFMaker: support `@<bou>` ([#1220])
16
+ * PDFMaker: support old jlreq.cls ([#1317])
17
+
18
+ ## Enhancements
19
+ * added test when `CHAPS:` is empty ([#1275])
20
+ * PDFMaker: for safety, inline typeface commands such as `\reviewtt` are defined with RobustCommand ([#1280])
21
+ * EPUBMaker: added `--debug` option to execute in debug mode ([#1281])
22
+ * review-epub2html: added `--inline-footnote` option to represent footnotes as inline ([#1283])
23
+ * EPUBMaker: added metadata of the cover image on EPUB3 for iBooks ([#1293])
24
+ * PDFMaker: suppressed the unexptected page break after the caption of code list or equation in review-jsbook and review-jlreq ([#1299])
25
+ * reformatted the codes using rubocop 0.67.2 ([#1297])
26
+ * added a test of building EPUB ([#1300])
27
+ * updated Ruby versions of test target to 2.4.6, 2.5.5, and 2.6.3 ([#1303])
28
+ * improved the code of YAMLLoader ([#1304])
29
+ * raise an error when invalid level is used in bullet ([#1313])
30
+ * extracted ReVIEW::Location class ([#1308])
31
+ * avoid multi-lined English words being combined without a space in bullets and bibliographic list (only in PDFMaker, at this time) ([#1312])
32
+ * raise an error when table is empty ([#1325])
33
+ * add some tests ([#1327], [#1328])
34
+ * MARKDOWNBilder: support `//listnum` ([#1336])
35
+
36
+ ## Docs
37
+ * fixed the description about header levels ([#1309])
38
+
39
+ ## Others
40
+ * removed ReVIEW::Preprocessor::Strip due to it is no longer used ([#1305])
41
+
42
+ ## Contributors
43
+ * [@uetchy](https://github.com/uetchy)
44
+ * [@mitsuo0114](https://github.com/mitsuo0114)
45
+
46
+ [#1011]: https://github.com/kmuto/review/issues/1011
47
+ [#1220]: https://github.com/kmuto/review/issues/1220
48
+ [#1275]: https://github.com/kmuto/review/pull/1275
49
+ [#1280]: https://github.com/kmuto/review/pull/1280
50
+ [#1281]: https://github.com/kmuto/review/issues/1281
51
+ [#1283]: https://github.com/kmuto/review/pull/1283
52
+ [#1284]: https://github.com/kmuto/review/issues/1284
53
+ [#1286]: https://github.com/kmuto/review/pull/1286
54
+ [#1288]: https://github.com/kmuto/review/issues/1288
55
+ [#1293]: https://github.com/kmuto/review/pull/1293
56
+ [#1294]: https://github.com/kmuto/review/issues/1294
57
+ [#1297]: https://github.com/kmuto/review/pull/1297
58
+ [#1298]: https://github.com/kmuto/review/pull/1298
59
+ [#1299]: https://github.com/kmuto/review/pull/1299
60
+ [#1300]: https://github.com/kmuto/review/pull/1300
61
+ [#1301]: https://github.com/kmuto/review/pull/1301
62
+ [#1303]: https://github.com/kmuto/review/pull/1303
63
+ [#1304]: https://github.com/kmuto/review/pull/1304
64
+ [#1305]: https://github.com/kmuto/review/pull/1305
65
+ [#1308]: https://github.com/kmuto/review/pull/1308
66
+ [#1309]: https://github.com/kmuto/review/issues/1309
67
+ [#1312]: https://github.com/kmuto/review/issues/1312
68
+ [#1313]: https://github.com/kmuto/review/issues/1313
69
+ [#1317]: https://github.com/kmuto/review/pull/1317
70
+ [#1318]: https://github.com/kmuto/review/issues/1318
71
+ [#1325]: https://github.com/kmuto/review/issues/1325
72
+ [#1327]: https://github.com/kmuto/review/issues/1327
73
+ [#1328]: https://github.com/kmuto/review/pull/1328
74
+ [#1336]: https://github.com/kmuto/review/pull/1336
75
+
1
76
  # Version 3.1.0
2
77
  ## Breaking Changes
3
78
  * PDFMaker: introduce `\reviewimagecaption` macro for the caption of figure ([#1254]). Please update your review-base.sty by `review-update` command on your Re:VIEW 3 project.
@@ -8,11 +8,29 @@ build_script:
8
8
  - bundle exec rake test --trace --verbose
9
9
  - bundle exec rubocop
10
10
 
11
+ before_test:
12
+ - gem install -N epubcheck-ruby
13
+
14
+ test_script:
15
+ - ruby bin/review-init hello
16
+ - cd hello
17
+ - ruby ../bin/review-epubmaker config.yml
18
+ - epubcheck book.epub
19
+ - cd ..
20
+ - ruby bin/review-init hello2 --epub-version 2
21
+ - cd hello2
22
+ - ruby ../bin/review-epubmaker config.yml
23
+ - epubcheck book.epub
24
+
11
25
  branches:
12
26
  only:
13
27
  - master
14
28
 
15
29
  environment:
16
30
  matrix:
17
- - ruby_version: "23"
18
- - ruby_version: "23-x64"
31
+ - ruby_version: "24"
32
+ - ruby_version: "24-x64"
33
+ - ruby_version: "25"
34
+ - ruby_version: "25-x64"
35
+ - ruby_version: "26"
36
+ - ruby_version: "26-x64"
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (c) 2014-2017 Masanori Kado, Kenshi Muto
3
+ # Copyright (c) 2014-2019 Masanori Kado, Kenshi Muto
4
4
  #
5
5
  # This program is free software.
6
6
  # You can distribute or modify this program under the terms of
@@ -30,8 +30,8 @@ def main
30
30
 
31
31
  begin
32
32
  opts.parse!
33
- rescue OptionParser::ParseError => err
34
- @logger.error err.message
33
+ rescue OptionParser::ParseError => e
34
+ @logger.error e.message
35
35
  $stderr.puts opts.help
36
36
  exit 1
37
37
  end
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (c) 2010-2017 Kenshi Muto, Minero Aoki
3
+ # Copyright (c) 2010-2019 Kenshi Muto, Minero Aoki
4
4
  # 1999-2007 Minero Aoki
5
5
  #
6
6
  # This program is free software.
@@ -58,8 +58,8 @@ def main
58
58
  end
59
59
  begin
60
60
  opts.parse!
61
- rescue OptionParser::ParseError => err
62
- @logger.error(err.message)
61
+ rescue OptionParser::ParseError => e
62
+ @logger.error(e.message)
63
63
  puts opts.help
64
64
  exit 1
65
65
  end
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (c) 2008-2018 Kenshi Muto, Masayoshi Takahashi, KADO Masanori, Minero Aoki
3
+ # Copyright (c) 2008-2019 Kenshi Muto, Masayoshi Takahashi, KADO Masanori, Minero Aoki
4
4
  # Copyright (c) 1999-2007 Minero Aoki
5
5
  #
6
6
  # This program is free software.
@@ -50,7 +50,7 @@ def _main
50
50
  begin
51
51
  loader = ReVIEW::YAMLLoader.new
52
52
  if @config['yaml']
53
- error "#{config['yaml']} not found." unless File.exist?(@config['yaml'])
53
+ error "#{@config['yaml']} not found." unless File.exist?(@config['yaml'])
54
54
  begin
55
55
  @config.deep_merge!(loader.load_file(@config['yaml']))
56
56
  rescue => e
@@ -109,8 +109,8 @@ def _main
109
109
  else
110
110
  raise "must not happen: #{@mode}"
111
111
  end
112
- rescue ReVIEW::ApplicationError => err
113
- error(err.message)
112
+ rescue ReVIEW::ApplicationError => e
113
+ error(e.message)
114
114
  end
115
115
  end
116
116
 
@@ -162,8 +162,8 @@ def parse_opts
162
162
  raise OptionParser::ParseError, 'no target given'
163
163
  end
164
164
  end
165
- rescue OptionParser::ParseError => err
166
- warn(err.message)
165
+ rescue OptionParser::ParseError => e
166
+ warn(e.message)
167
167
  $stderr.puts opts.help
168
168
  exit 1
169
169
  end
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # Copyright (c) 2010-2017 Kenshi Muto and Masayoshi Takahashi
2
+ # Copyright (c) 2010-2019 Kenshi Muto and Masayoshi Takahashi
3
3
  #
4
4
  # This program is free software.
5
5
  # You can distribute or modify this program under the terms of
@@ -10,39 +10,7 @@ require 'pathname'
10
10
  require 'optparse'
11
11
  bindir = Pathname.new(__FILE__).realpath.dirname
12
12
  $LOAD_PATH.unshift((bindir + '../lib').realpath)
13
- require 'review/epubmaker'
14
- require 'review/version'
15
-
16
- @logger = ReVIEW.logger
17
-
18
- rv = ReVIEW::EPUBMaker.new
19
-
20
- opts = OptionParser.new
21
- opts.version = ReVIEW::VERSION
22
- opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} [options] YAML_filename [export_filename]"
23
- opts.on('--help', 'Prints this message and quit.') do
24
- puts opts.help
25
- exit 0
26
- end
27
13
 
28
- begin
29
- opts.parse!
30
- rescue OptionParser::ParseError => err
31
- @logger.error err.message
32
- $stderr.puts opts.help
33
- exit 1
34
- end
35
-
36
- if ARGV.size < 1
37
- puts opts.help
38
- exit 1
39
- end
40
-
41
- unless File.exist?(ARGV[0])
42
- @logger.error "#{File.basename($PROGRAM_NAME, '.*')}: #{ARGV[0]} not found."
43
- exit 1
44
- end
14
+ require 'review/epubmaker'
45
15
 
46
- yaml_file = ARGV[0]
47
- bookname = ARGV[1]
48
- rv.produce(yaml_file, bookname)
16
+ ReVIEW::EPUBMaker.execute(*ARGV)
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (c) 2008-2017 Minero Aoki, Kenshi Muto
3
+ # Copyright (c) 2008-2019 Minero Aoki, Kenshi Muto
4
4
  # 1999-2007 Minero Aoki
5
5
  #
6
6
  # This program is free software.
@@ -69,8 +69,8 @@ def _main
69
69
  end
70
70
  begin
71
71
  opts.parse!
72
- rescue OptionParser::ParseError => err
73
- @logger.error err.message
72
+ rescue OptionParser::ParseError => e
73
+ @logger.error e.message
74
74
  $stderr.puts opts.help
75
75
  exit 1
76
76
  end
@@ -92,9 +92,9 @@ def _main
92
92
  else
93
93
  printer.print_book source
94
94
  end
95
- rescue ReVIEW::Error, Errno::ENOENT => err
95
+ rescue ReVIEW::Error, Errno::ENOENT => e
96
96
  raise if $DEBUG
97
- error_exit err.message
97
+ error_exit e.message
98
98
  end
99
99
  end
100
100
 
@@ -59,8 +59,8 @@ def main
59
59
  end
60
60
  begin
61
61
  opts.parse!
62
- rescue OptionParser::ParseError => err
63
- @logger.error err.message
62
+ rescue OptionParser::ParseError => e
63
+ @logger.error e.message
64
64
  $stderr.puts opts.help
65
65
  exit 1
66
66
  end
@@ -91,9 +91,9 @@ def main
91
91
  raise "must not happen: #{mode}"
92
92
  end
93
93
  end
94
- rescue ReVIEW::Error => err
94
+ rescue ReVIEW::Error => e
95
95
  raise if $DEBUG
96
- @logger.error err.message
96
+ @logger.error e.message
97
97
  exit 1
98
98
  end
99
99