diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-05-19 23:19:28 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-05-19 23:19:31 -0400 |
commit | b26ce9d5a57b0d4a8eb2f7ee118fae1cd1526365 (patch) | |
tree | f2a6d59a3d8e1b222b263cc9f6d869cc62364f61 /lib/sisu/v3/harvest_authors.rb | |
parent | v3: 3.2.9 version & changelog "opened" (diff) |
v3: harvest, fix some details
* harvest by filename output paths
* harvest_topics, add level
* harvest_topics, alternative headings, fix
Diffstat (limited to 'lib/sisu/v3/harvest_authors.rb')
-rw-r--r-- | lib/sisu/v3/harvest_authors.rb | 15 |
1 files changed, 9 insertions, 6 deletions
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]}", %{<p class="publication">#{x[:date]} <a href="#{manifest_at}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>} ] works<<=(@output[lng][:html_mnt].class==File) \ |