From cc7bc6de70ca4dcfeee781803bc6a43dc7c273ea Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 19 Apr 2011 21:39:06 -0400 Subject: 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) --- lib/sisu/v3/harvest_topics.rb | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v3/harvest_topics.rb') 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 <#{hash[:title]} - #{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=%{#{hash[:title]} - #{hash[:author]}} do_string_default(attrib,html) end def do_hash_md_maintenance(attrib,hash) -- cgit v1.2.3