#!/usr/bin/env ruby # encoding: utf-8 # # Copyright (c) 2010-2013 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' bindir = Pathname.new(__FILE__).realpath.dirname $LOAD_PATH.unshift((bindir + '../lib').realpath) require 'review/epubmaker' rv = ReVIEW::EPUBMaker.new if ARGV.size < 1 || !File.exist?(ARGV[0]) STDERR.puts "Usage: #{$0} YAML_filename [export_filename]" exit 0 end bookname = (ARGV.size > 1) ? ARGV[1] : nil rv.produce(ARGV[0], bookname)