diff options
Diffstat (limited to 'lib/sisu/v0/harvest_authors.rb')
-rw-r--r-- | lib/sisu/v0/harvest_authors.rb | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/sisu/v0/harvest_authors.rb b/lib/sisu/v0/harvest_authors.rb index 8d4d3e15..4d9b9dce 100644 --- a/lib/sisu/v0/harvest_authors.rb +++ b/lib/sisu/v0/harvest_authors.rb @@ -8,8 +8,7 @@ * Author: Ralph Amissah - * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008 Ralph Amissah All Rights Reserved. + * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved. * License: GPL 3 or later: @@ -136,8 +135,15 @@ module HARVEST_authors if @title and @author_format #and @orig_pub (publication details) creator=FORMAT::Author.new(@author_format.strip).author_details @authors,@authorship=creator[:authors],creator[:authorship] - file=filename.sub(/\.ss[mt]$/,'') - idx_array <<= { :filename => filename, :file => file, :orig_pub => @orig_pub, :date => @date, :title => @fulltitle, :author => creator } + file=if filename=~/~[a-z]{2,3}\.ss[mt]$/ + lang='.' + /~([a-z]{2,3})\.ss[mt]$/.match(filename)[1] + filename.sub(/~[a-z]{2,3}\.ss[mt]$/,'') + else + lang='' + filename.sub(/\.ss[mt]$/,'') + end + page="sisu_manifest#{lang}.html" + idx_array <<= { :filename => filename, :file => file, :orig_pub => @orig_pub, :date => @date, :title => @fulltitle, :author => creator, :page => page } else #p "missing author field: #@filename title: #@title; author: #@author_format; idx: #@orig_pub" end @@ -161,7 +167,7 @@ module HARVEST_authors if @@the_idx_authors[author].class==NilClass @@the_idx_authors[author]={:md => []} end - @@the_idx_authors[author][:md] << { :filename => idx[:filename], :file => idx[:file], :author => idx[:author], :title => idx[:title], :date => idx[:date] } + @@the_idx_authors[author][:md] << { :filename => idx[:filename], :file => idx[:file], :author => idx[:author], :title => idx[:title], :date => idx[:date], :page => idx[:page] } end end @the_idx=@@the_idx_authors @@ -172,7 +178,6 @@ module HARVEST_authors @opt,@the_idx=opt,the_idx @env=SiSU_Env::Info_env.new @rc=Get_init.instance.yamlrc - @page='sisu_manifest.html' @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z] @letter=@alph.shift @vz=SiSU_Env::Get_init.instance.skin @@ -295,9 +300,9 @@ WOK @output[:html] << x works=[] a[1][:md].each do |x| - work=[ "#{x[:date]} #{x[:title]}", %{<p class="publication">#{x[:date]} <a href="../#{x[:file]}/#{@page}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>} ] + work=[ "#{x[:date]} #{x[:title]}", %{<p class="publication">#{x[:date]} <a href="../#{x[:file]}/#{x[:page]}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>} ] works<<=if @output[:html_mnt].class == File - work.concat([%{<p class="publication">[<a href="#{x[:file]}.sst">src</a>] #{x[:date]} <a href="file://#{@env.path.output}/#{x[:file]}/#{@page}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>}]) + work.concat([%{<p class="publication">[<a href="#{x[:file]}.sst">src</a>] #{x[:date]} <a href="file://#{@env.path.output}/#{x[:file]}/#{x[:page]}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>}]) else work end end |