aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/harvest_authors.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/harvest_authors.rb')
-rw-r--r--lib/sisu/v3/harvest_authors.rb15
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) \