# encoding: utf-8
# = epubv2.rb -- EPUB version 2 producer.
#
# Copyright (c) 2010 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 'epubmaker/producer'
module EPUBMaker
# EPUBv2 is EPUB version 2 producer.
class EPUBv2
# Construct object with parameter hash +params+ and message resource hash +res+.
def initialize(producer)
@producer = producer
end
# Return mimetype content.
def mimetype
return <
EOT
end
s << <
#{@producer.params["title"]}
EOT
if @producer.params["aut"]
s << <
#{@producer.params["title"]}
EOT if @producer.params["pubhistory"] s << %Q[#{@producer.params["pubhistory"].gsub(/\n/, "
")}
#{@producer.res.v("c-aut")} | #{@producer.params["aut"]} |
---|---|
#{@producer.res.v("c-dsr")} | #{@producer.params["dsr"]} |
#{@producer.res.v("c-ill")} | #{@producer.params["ill"]} |
#{@producer.res.v("c-edt")} | #{@producer.params["edt"]} |
#{@producer.res.v("c-prt")} | #{@producer.params["prt"]} |