From b26ce9d5a57b0d4a8eb2f7ee118fae1cd1526365 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 19 May 2012 23:19:28 -0400 Subject: v3: harvest, fix some details * harvest by filename output paths * harvest_topics, add level * harvest_topics, alternative headings, fix --- lib/sisu/v3/harvest_authors.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v3/harvest_authors.rb') diff --git a/lib/sisu/v3/harvest_authors.rb b/lib/sisu/v3/harvest_authors.rb index 2c541c48..c4107139 100644 --- a/lib/sisu/v3/harvest_authors.rb +++ b/lib/sisu/v3/harvest_authors.rb @@ -187,9 +187,12 @@ module SiSU_HarvestAuthors if @env.output_dir_structure.by? == :language harvest_pth="#{@env.path.webserv}/#{@opt.base_stub}/#{lng}/manifest" file="#{harvest_pth}/authors.html" - else + elsif @env.output_dir_structure.by? == :filetype harvest_pth="#{@env.path.webserv}/#{@opt.base_stub}/manifest" file="#{harvest_pth}/authors.#{lng}.html" + elsif @env.output_dir_structure.by? == :filename + harvest_pth="#{@env.path.webserv}/#{@opt.base_stub}" + file="#{harvest_pth}/authors.#{lng}.html" end FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth) puts "file://#{file}" @@ -235,7 +238,7 @@ module SiSU_HarvestAuthors if @env.output_dir_structure.by? == :language harvest_pth="../../#{lng}/manifest" file="#{harvest_pth}/authors.html" - else @env.output_dir_structure.by? == :filetype + elsif @env.output_dir_structure.by? == :filetype harvest_pth='.' file="#{harvest_pth}/authors.#{lng}.html" end @@ -344,14 +347,14 @@ WOK @output[lng][:html] << x works=[] a[1][:md].each do |x| - if @env.output_dir_structure.by? == :language + manifest_at=if @env.output_dir_structure.by? == :language manifest_pth="#{@env.path.output}/#{x[:file]}" - manifest_at=x[:file] + '.html' + x[:file] + '.html' elsif @env.output_dir_structure.by? == :filetype manifest_name=x[:file] - manifest_at=x[:file] + '.' + lng + '.html' + x[:file] + '.' + lng + '.html' elsif @env.output_dir_structure.by? == :filename - manifest_at="../#{x[:file]}/#{x[:page]}" + "../#{x[:file]}/#{x[:page]}" end work=[ "#{x[:date]} #{x[:title]}", %{

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

} ] works<<=(@output[lng][:html_mnt].class==File) \ -- cgit v1.2.3