diff options
Diffstat (limited to 'lib/sisu/v3/harvest_topics.rb')
-rw-r--r-- | lib/sisu/v3/harvest_topics.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/sisu/v3/harvest_topics.rb b/lib/sisu/v3/harvest_topics.rb index de03b615..dd7ec8c2 100644 --- a/lib/sisu/v3/harvest_topics.rb +++ b/lib/sisu/v3/harvest_topics.rb @@ -58,7 +58,7 @@ ** Description: simple xml representation (sax style) =end -module HARVEST_topics +module SiSU_Harvest_Topics require_relative 'author_format' # author_format.rb include SiSU_Viz class Songsheet @@ -72,8 +72,8 @@ module HARVEST_topics idx_array={} @opt.f_pths.each do |y| lang_hash_file_array={} - name=y[:f] - filename=y[:pth] + '/' + y[:f] + name=y[:f] + filename=y[:pth] + '/' + y[:f] File.open(filename,'r') do |file| file.each_line("\n\n") do |line| if line =~/^@(?:title|creator|classify):(?:\s|$)/m @@ -87,11 +87,11 @@ module HARVEST_topics end lang_hash_file_array.each_pair do |lang,a| idx_array[lang] ||= [] - idx_array=HARVEST_topics::Harvest.new(@opt,@env,a,filename,name,idx_array,lang).extract_harvest + idx_array=SiSU_Harvest_Topics::Harvest.new(@opt,@env,a,filename,name,idx_array,lang).extract_harvest end end - the_idx=HARVEST_topics::Index.new(@opt,@env,idx_array,@@the_idx_topics).construct_book_topic_index - HARVEST_topics::Output_index.new(@opt,the_idx).html_print.html_songsheet + the_idx=SiSU_Harvest_Topics::Index.new(@opt,@env,idx_array,@@the_idx_topics).construct_book_topic_index + SiSU_Harvest_Topics::OutputIndex.new(@opt,the_idx).html_print.html_songsheet end end class Harvest @@ -125,7 +125,7 @@ module HARVEST_topics if @title \ and @author_format \ and @idx_list - creator=FORMAT::Author.new(@author_format.strip).author_details + creator=SiSU_FormatAuthor::Author.new(@author_format.strip).author_details @authors,@authorship=creator[:authors],creator[:authorship] file=if name=~/~[a-z]{2,3}\.ss[mt]$/ name.sub(/~[a-z]{2,3}\.ss[mt]$/,'') @@ -144,7 +144,7 @@ module HARVEST_topics g=@idx_list.scan(/[^;]+/) idxl=[] g.each do |i| - i.strip! + i=i.strip idxl << { filename: filename, file: file, rough_idx: i, title: @fulltitle, author: creator, page: page, lang: lang } end idxl @@ -153,7 +153,7 @@ module HARVEST_topics else p "missing required field in #{@filename} - [title]: <<#{@title}>>; [author]: <<#{@author_format}>>; [idx]: <<#{@idx_list}>>" if @opt.cmd.inspect =~/[VM]/ end - idx_array[lang].flatten! + idx_array[lang]=idx_array[lang].flatten idx_array end end @@ -259,15 +259,15 @@ module HARVEST_topics @the_idx end end - class Output_index + class OutputIndex require_relative 'i18n' # i18n.rb def initialize(opt,the_idx) @opt,@the_idx=opt,the_idx - @env=SiSU_Env::Info_env.new - @rc=SiSU_Env::Get_init.instance.sisu_yaml.rc + @env=SiSU_Env::InfoEnv.new + @rc=SiSU_Env::GetInit.instance.sisu_yaml.rc @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z] @letter=@alph.shift - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def html_file_open @the_idx.keys.each do |lng| @@ -335,7 +335,7 @@ module HARVEST_topics l=ln[lng][:t] harvest_languages += %{<a href="#{file}">#{l}</a> } end - sv=SiSU_Env::Info_version.instance.get_version + sv=SiSU_Env::InfoVersion.instance.get_version <<WOK <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |