Skip to content

Commit

Permalink
Merge pull request #1428 from kmuto/idgxmlskip
Browse files Browse the repository at this point in the history
IDGXML: introduce -y/--only option to specify target re files.
  • Loading branch information
kmuto authored Dec 13, 2019
2 parents 49555c6 + ada1ce1 commit 7ddc277
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/review/idgxmlmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ def parse_opts(args)
opts = OptionParser.new
@table = nil
@filter = nil
@buildonly = nil

opts.banner = 'Usage: review-idgxmlmaker [options] configfile'
opts.version = ReVIEW::VERSION
opts.on('-w', '--width widthoftypepage', 'Specify the width of type page for layouting tables (mm).') { |v| @table = v }
opts.on('-f', '--filter filterprogrampath', 'Specify the filter path.') { |v| @filter = v }
opts.on('-y', '--only file1,file2,...', 'Build only specified files.') { |v| @buildonly = v.split(/\s*,\s*/).map { |m| m.strip.sub(/\.re\Z/, '') } }
opts.on('--help', 'Prints this message and quit.') do
puts opts.help
exit 0
Expand Down Expand Up @@ -169,6 +171,10 @@ def build_chap(chap, base_path, basetmpdir, ispart)
filename = Pathname.new(chap.path).relative_path_from(base_path).to_s
end
id = File.basename(filename).sub(/\.re\Z/, '')
if @buildonly && !@buildonly.include?(id)
warn "skip #{id}.re"
return
end

xmlfile = "#{id}.xml"

Expand Down

0 comments on commit 7ddc277

Please sign in to comment.