aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/harvest_authors.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/harvest_authors.rb')
-rw-r--r--lib/sisu/v5/harvest_authors.rb34
1 files changed, 16 insertions, 18 deletions
diff --git a/lib/sisu/v5/harvest_authors.rb b/lib/sisu/v5/harvest_authors.rb
index 89a64fee..c20558df 100644
--- a/lib/sisu/v5/harvest_authors.rb
+++ b/lib/sisu/v5/harvest_authors.rb
@@ -155,9 +155,9 @@ module SiSU_HarvestAuthors
end
def construct_book_author_index
idx_array=@idx_array
- idx_array.each_pair do |lang,idx_array|
+ idx_array.each_pair do |lang,idx_arr|
@@the_idx_authors[lang] ||= {}
- idx_array.each do |idx|
+ idx_arr.each do |idx|
idx[:author][:last_first_format_a].each do |author|
author=author.strip
if @@the_idx_authors[lang][author].is_a?(NilClass)
@@ -237,18 +237,18 @@ module SiSU_HarvestAuthors
end
ln=SiSU_i18n::Languages.new.language.list
harvest_languages=''
- @the_idx.keys.each do |lng|
+ @the_idx.keys.each do |lg|
if @env.output_dir_structure.by? == :language
- harvest_pth="../../#{lng}/manifest"
+ harvest_pth="../../#{lg}/manifest"
file="#{harvest_pth}/authors.html"
elsif @env.output_dir_structure.by? == :filetype
harvest_pth='.'
- file="#{harvest_pth}/authors.#{lng}.html"
+ file="#{harvest_pth}/authors.#{lg}.html"
elsif @env.output_dir_structure.by? == :filename
harvest_pth='.'
- file="#{harvest_pth}/authors.#{lng}.html"
+ file="#{harvest_pth}/authors.#{lg}.html"
end
- l=ln[lng][:t]
+ l=ln[lg][:t]
harvest_languages += %{<a href="#{file}">#{l}</a>&nbsp;&nbsp;&nbsp;}
end
sv=SiSU_Env::InfoVersion.instance.get_version
@@ -365,25 +365,23 @@ WOK
end
@output[lng][:html] << x
works=[]
- a[1][:md].each do |x|
+ a[1][:md].each do |i|
manifest_at=if @env.output_dir_structure.by? == :language
- manifest_pth="#{@env.path.output}/#{x[:file]}"
- x[:file] + '.html'
+ i[:file] + '.html'
elsif @env.output_dir_structure.by? == :filetype
- manifest_name=x[:file]
- x[:file] + '.' + lng + '.html'
+ i[:file] + '.' + lng + '.html'
elsif @env.output_dir_structure.by? == :filename
- "./#{x[:file]}/#{x[:page]}"
+ "./#{i[:file]}/#{i[:page]}"
else '' #error
end
- work=[ "#{x[:date]} #{x[:title]}", %{<p class="publication">#{x[:date]} <a href="#{manifest_at}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>} ]
+ work=[ "#{i[:date]} #{i[:title]}", %{<p class="publication">#{i[:date]} <a href="#{manifest_at}">#{i[:title]}</a>, #{i[:author][:authors_s]}</p>} ]
works<<=(@output[lng][:html_mnt].is_a?(File)) \
- ? (work.concat([%{<p class="publication">[<a href="#{x[:file]}.sst">src</a>]&nbsp;&nbsp;#{x[:date]} <a href="file://#{manifest_at}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>}]))
+ ? (work.concat([%{<p class="publication">[<a href="#{i[:file]}.sst">src</a>]&nbsp;&nbsp;#{i[:date]} <a href="file://#{manifest_at}">#{i[:title]}</a>, #{i[:author][:authors_s]} -- [<a href="#{i[:file]}.sst">#{i[:file]}.sst</a>]</p>}]))
: work
end
- works.sort_by {|x| x[0]}.each do |x|
- @output[lng][:html] << x[1]
- @output[lng][:html_mnt] << x[2] if @output[lng][:html_mnt].is_a?(File)
+ works.sort_by {|y| y[0]}.each do |z|
+ @output[lng][:html] << z[1]
+ @output[lng][:html_mnt] << z[2] if @output[lng][:html_mnt].is_a?(File)
end
end
end