From 2e6af20c3742adb42c756568fda2c05f7abd6d03 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:16:49 -0400 Subject: v3: param, manifest, qrcode, epub, added creator.editor field --- lib/sisu/v3/epub_format.rb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'lib/sisu/v3/epub_format.rb') diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index 9f169f5e..6879c933 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1057,6 +1057,28 @@ WOK %{\n #{x}} else '' end + editor=if defined? @md.creator.editor \ + and @md.creator.editor =~/\S+/ + m='' + @md.creator.editor_detail.each do |x| + surname=x[:the] \ + ? x[:the] \ + : '' + other_names=x[:others] \ + ? ', ' + x[:others] \ + : '' + m=(m.empty?) \ + ? (surname + other_names) \ + : (m + '; ' + surname + ', ' + other_names) + m.gsub!(//,'>') + m.gsub!(/<br(?: \/)?>/,';') + end + x=@md.creator.editor.dup + x.gsub!(//,'>') + x.gsub!(/<br(?: \/)?>/,'
') + %{\n #{x}} + else '' + end translator=if defined? @md.creator.translator \ and @md.creator.translator =~/\S+/ m='' @@ -1132,7 +1154,7 @@ WOK < #{@md.title.full} - #{author}#{translator}#{illustrator}#{language}#{date_published}#{subject}#{rights} + #{author}#{editor}#{translator}#{illustrator}#{language}#{date_published}#{subject}#{rights} ... urn:uuid:#{@md.dgst[1]} -- cgit v1.2.3