Sha256: 63819dc65a7c508113e7add91e01f1c6a2cc752249b9ecde03fdc9e95d1a25b6

Contents?: true

Size: 1.11 KB

Versions: 8

Compression:

Stored size: 1.11 KB

Contents

#!/usr/bin/env ruby
# Copyright (c) 2010-2017 Kenshi Muto and Masayoshi Takahashi
#
# This program is free software.
# You can distribute or modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
# For details of the GNU LGPL, see the file "COPYING".
#
require 'pathname'
require 'optparse'
bindir = Pathname.new(__FILE__).realpath.dirname
$LOAD_PATH.unshift((bindir + '../lib').realpath)
require 'review/epubmaker'
require 'review/version'

@logger = ReVIEW.logger

rv = ReVIEW::EPUBMaker.new

opts = OptionParser.new
opts.version = ReVIEW::VERSION
opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} [options] YAML_filename [export_filename]"
opts.on('--help', 'Prints this message and quit.') do
  puts opts.help
  exit 0
end

begin
  opts.parse!
rescue OptionParser::ParseError => err
  @logger.error err.message
  $stderr.puts opts.help
  exit 1
end

if ARGV.size < 1
  puts opts.help
  exit 1
end

unless File.exist?(ARGV[0])
  @logger.error "#{File.basename($PROGRAM_NAME, '.*')}: #{ARGV[0]} not found."
  exit 1
end

yaml_file = ARGV[0]
bookname = ARGV[1]
rv.produce(yaml_file, bookname)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
review-3.1.0 bin/review-epubmaker
review-3.0.0 bin/review-epubmaker
review-3.0.0.rc1 bin/review-epubmaker
review-3.0.0.preview4 bin/review-epubmaker
review-3.0.0.preview3 bin/review-epubmaker
review-3.0.0.preview2 bin/review-epubmaker
review-3.0.0.preview1 bin/review-epubmaker
review-2.5.0 bin/review-epubmaker