Skip to content

Commit

Permalink
Merge branch 'master' into news540
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Feb 11, 2022
2 parents 4637fbf + 17dc600 commit d6e1e7b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 18 deletions.
10 changes: 7 additions & 3 deletions lib/review/epubmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ def execute(*args)
cmd_config, yamlfile, exportfile = parse_opts(args)
error! "#{yamlfile} not found." unless File.exist?(yamlfile)

@config = ReVIEW::Configure.create(maker: 'epubmaker',
yamlfile: yamlfile,
config: cmd_config)
begin
@config = ReVIEW::Configure.create(maker: 'epubmaker',
yamlfile: yamlfile,
config: cmd_config)
rescue ReVIEW::ConfigError => e
error! e.message
end
@producer = ReVIEW::EPUBMaker::Producer.new(@config)
update_log_level
debug("Loaded yaml file (#{yamlfile}).")
Expand Down
12 changes: 8 additions & 4 deletions lib/review/idgxmlmaker.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2021 Kenshi Muto
# Copyright (c) 2019-2022 Kenshi Muto
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down Expand Up @@ -74,9 +74,13 @@ def execute(*args)
cmd_config, yamlfile = parse_opts(args)
error! "#{yamlfile} not found." unless File.exist?(yamlfile)

@config = ReVIEW::Configure.create(maker: 'idgxmlmaker',
yamlfile: yamlfile,
config: cmd_config)
begin
@config = ReVIEW::Configure.create(maker: 'idgxmlmaker',
yamlfile: yamlfile,
config: cmd_config)
rescue ReVIEW::ConfigError => e
error! e.message
end
I18n.setup(@config['language'])
begin
generate_idgxml_files(yamlfile)
Expand Down
12 changes: 8 additions & 4 deletions lib/review/pdfmaker.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2021 Kenshi Muto and Masayoshi Takahashi
# Copyright (c) 2010-2022 Kenshi Muto and Masayoshi Takahashi
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down Expand Up @@ -121,9 +121,13 @@ def execute(*args)
cmd_config, yamlfile = parse_opts(args)
error! "#{yamlfile} not found." unless File.exist?(yamlfile)

@config = ReVIEW::Configure.create(maker: 'pdfmaker',
yamlfile: yamlfile,
config: cmd_config)
begin
@config = ReVIEW::Configure.create(maker: 'pdfmaker',
yamlfile: yamlfile,
config: cmd_config)
rescue ReVIEW::ConfigError => e
error! e.message
end

I18n.setup(@config['language'])
@basedir = File.absolute_path(File.dirname(yamlfile))
Expand Down
13 changes: 9 additions & 4 deletions lib/review/textmaker.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2021 Kenshi Muto
# Copyright (c) 2018-2022 Kenshi Muto
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down Expand Up @@ -74,9 +74,14 @@ def execute(*args)
cmd_config, yamlfile = parse_opts(args)
error! "#{yamlfile} not found." unless File.exist?(yamlfile)

@config = ReVIEW::Configure.create(maker: 'textmaker',
yamlfile: yamlfile,
config: cmd_config)
begin
@config = ReVIEW::Configure.create(maker: 'textmaker',
yamlfile: yamlfile,
config: cmd_config)
rescue ReVIEW::ConfigError => e
error! e.message
end

@img_math = ReVIEW::ImgMath.new(@config, path_name: '_review_math_text')

I18n.setup(@config['language'])
Expand Down
10 changes: 7 additions & 3 deletions lib/review/webmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ def execute(*args)
cmd_config, yamlfile = parse_opts(args)
error! "#{yamlfile} not found." unless File.exist?(yamlfile)

@config = ReVIEW::Configure.create(maker: 'webmaker',
yamlfile: yamlfile,
config: cmd_config)
begin
@config = ReVIEW::Configure.create(maker: 'webmaker',
yamlfile: yamlfile,
config: cmd_config)
rescue ReVIEW::ConfigError => e
error! e.message
end

@config['htmlext'] = 'html'
@img_math = ReVIEW::ImgMath.new(@config)
Expand Down

0 comments on commit d6e1e7b

Please sign in to comment.