diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-04-19 21:39:06 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-04-19 21:39:06 -0400 |
commit | cc7bc6de70ca4dcfeee781803bc6a43dc7c273ea (patch) | |
tree | 02fb16f0a4502293d09d01ae30b58942c6ad726e /lib/sisu/v3/harvest_topics.rb | |
parent | v3: param, md remove md.cmd and md.mod shortcut methods, use use md.opt (diff) |
v3: harvest, sysenv, place with document manifests, variable directory path
* sysenv, variable directory path fixing (language, filetype, filname), making
the stub for at least manifest and html available early for processing
that do not or should not need to process individual markup files
completely, such as the cgi search form and harvest
* harvest
* place with document manifests
* variable directory path fixing (language, filetype, filname)
Diffstat (limited to 'lib/sisu/v3/harvest_topics.rb')
-rw-r--r-- | lib/sisu/v3/harvest_topics.rb | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/lib/sisu/v3/harvest_topics.rb b/lib/sisu/v3/harvest_topics.rb index f00fb7f3..3ca72326 100644 --- a/lib/sisu/v3/harvest_topics.rb +++ b/lib/sisu/v3/harvest_topics.rb @@ -90,7 +90,8 @@ module HARVEST_topics the_idx=HARVEST_topics::Index.new(idx_array,@@the_idx_topics).construct_book_topic_index #HARVEST_topics::Output_index.new('',the_idx).screen_print.cycle if @opt.cmd.inspect =~/[VM]/ HARVEST_topics::Output_index.new(@opt,the_idx).html_print.html_songsheet - puts "file://#{@env.path.output_md_harvest}/harvest_topics.html" + harvest_pth="#{@env.path.webserv}/#{@env.stub_md_harvest}" + puts "file://#{harvest_pth}/harvest_topics.html" puts "file://#{@env.path.pwd}/harvest_topics.html" if @opt.cmd.inspect =~/M/ end end @@ -258,7 +259,8 @@ module HARVEST_topics end def html_file_open @output={} - @output[:html]=File.new("#{@env.path.output_md_harvest}/harvest_topics.html",'w') + harvest_pth="#{@env.path.webserv}/#{@env.stub_md_harvest}" + @output[:html]=File.new("#{harvest_pth}/harvest_topics.html",'w') if @opt.cmd.inspect =~/-M/ @output[:html_mnt]=File.new("#{@env.path.pwd}/harvest_topics.html",'w') end @@ -277,9 +279,19 @@ module HARVEST_topics 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" @@ -382,7 +394,14 @@ WOK end end def do_hash_md(attrib,hash) - html=%{<a href="../#{hash[:file]}/#{hash[:page]}">#{hash[:title]}</a> - #{hash[:author]}} + if @env.output_dir_structure.by_language_code? + manifest_at=hash[:file] + '.manifest.html' + elsif @env.output_dir_structure.by_filetype? + manifest_at=hash[:file] + '.manifest.html' + elsif @env.output_dir_structure.by_filename? + manifest_at="../#{hash[:file]}/#{hash[:page]}" + end + html=%{<a href="#{manifest_at}">#{hash[:title]}</a> - #{hash[:author]}} do_string_default(attrib,html) end def do_hash_md_maintenance(attrib,hash) |