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.rb39
1 files changed, 32 insertions, 7 deletions
diff --git a/lib/sisu/v3/harvest_authors.rb b/lib/sisu/v3/harvest_authors.rb
index dc36a06f..75d2a810 100644
--- a/lib/sisu/v3/harvest_authors.rb
+++ b/lib/sisu/v3/harvest_authors.rb
@@ -89,7 +89,8 @@ module HARVEST_authors
end
the_idx=HARVEST_authors::Index.new(idx_array,@@the_idx_authors).construct_book_author_index
HARVEST_authors::Output_index.new(@opt,the_idx).html_print.html_songsheet
- puts "file://#{@env.path.output_md_harvest}/harvest_authors.html"
+ harvest_pth="#{@env.path.webserv}/#{@env.stub_md_harvest}"
+ puts "file://#{harvest_pth}/harvest_authors.html"
puts "file://#{@env.path.pwd}/harvest_authors.html" if @opt.cmd.inspect =~/M/
end
end
@@ -174,7 +175,8 @@ module HARVEST_authors
end
def html_file_open
@output={}
- @output[:html]=File.new("#{@env.path.output_md_harvest}/harvest_authors.html",'w')
+ harvest_pth="#{@env.path.webserv}/#{@env.stub_md_harvest}"
+ @output[:html]=File.new("#{harvest_pth}/harvest_authors.html",'w')
@output[:html_mnt]=(@opt.cmd.inspect =~/M/) \
? File.new("#{@env.path.pwd}/harvest_authors.html",'w') \
: nil
@@ -193,9 +195,19 @@ module HARVEST_authors
html_file_close
end
def html_head_adjust(type='')
- css_path=(type !~/maintenance/) \
- ? '../_sisu/css/harvest.css' \
- : 'harvest.css'
+ css_path=if @env.output_dir_structure.by_language_code?
+ css_path=(type !~/maintenance/) \
+ ? '../../_sisu/css/harvest.css' \
+ : 'harvest.css'
+ elsif @env.output_dir_structure.by_filetype?
+ css_path=(type !~/maintenance/) \
+ ? '../_sisu/css/harvest.css' \
+ : 'harvest.css'
+ elsif @env.output_dir_structure.by_filename?
+ css_path=(type !~/maintenance/) \
+ ? '../_sisu/css/harvest.css' \
+ : 'harvest.css'
+ end
sv=SiSU_Env::Info_version.instance.get_version
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -286,9 +298,22 @@ WOK
@output[:html] << x
works=[]
a[1][:md].each do |x|
- work=[ "#{x[:date]} #{x[:title]}", %{<p class="publication">#{x[:date]} <a href="../#{x[:file]}/#{x[:page]}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>} ]
+ if @env.output_dir_structure.by_language_code?
+ manifest_pth="#{@env.path.output}/#{x[:file]}"
+ manifest_at_local=@env.path.output + '/' + 'en' + '/' + 'manifest/' + x[:file] + '.manifest.html'
+ manifest_at=x[:file] + '.manifest.html'
+ elsif @env.output_dir_structure.by_filetype?
+ #manifest_pth_2="#{@env.path.output}/#{x[:file]}"
+ manifest_name=x[:file]
+ manifest_at_local=manifest_name + 'manifest.html'
+ manifest_at=x[:file] + '.manifest.html'
+ elsif @env.output_dir_structure.by_filename?
+ manifest_at_local="#{@env.path.output}/#{x[:file]}/#{x[:page]}"
+ manifest_at="../#{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[:html_mnt].class==File) \
- ? (work.concat([%{<p class="publication">[<a href="#{x[:file]}.sst">src</a>]&nbsp;&nbsp;#{x[:date]} <a href="file://#{@env.path.output}/#{x[:file]}/#{x[:page]}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>}])) \
+ ? (work.concat([%{<p class="publication">[<a href="#{x[:file]}.sst">src</a>]&nbsp;&nbsp;#{x[:date]} <a href="file://#{manifest_at_local}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>}])) \
: work
end
works.sort_by {|x| x[0]}.each do |x|