From ea4fafffc7da800b846944113fd45ad330decf2b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 16 Dec 2008 00:38:40 -0500 Subject: harvest_authors, sort authors works --- lib/sisu/v0/harvest_authors.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/sisu') diff --git a/lib/sisu/v0/harvest_authors.rb b/lib/sisu/v0/harvest_authors.rb index 9678e4f7..a9a2be03 100644 --- a/lib/sisu/v0/harvest_authors.rb +++ b/lib/sisu/v0/harvest_authors.rb @@ -293,11 +293,17 @@ WOK @output[:html_mnt] << x end @output[:html] << x + works=[] a[1][:md].each do |x| - if @output[:html_mnt].class == File - @output[:html_mnt] << %{

[src]  #{x[:date]} #{x[:title]}, #{x[:author][:authors_s]} -- [#{x[:file]}.sst]

} + work=[ "#{x[:date]} #{x[:title]}", %{

#{x[:date]} #{x[:title]}, #{x[:author][:authors_s]}

} ] + works<<=if @output[:html_mnt].class == File + work.concat([%{

[src]  #{x[:date]} #{x[:title]}, #{x[:author][:authors_s]} -- [#{x[:file]}.sst]

}]) + else work end - @output[:html] << %{

#{x[:date]} #{x[:title]}, #{x[:author][:authors_s]}

} + end + works.sort_by {|x| x[0]}.each do |x| + @output[:html] << x[1] + @output[:html_mnt] << x[2] if @output[:html_mnt].class == File end end end -- cgit v1.2.3