From 6811ac91f21a434fc7d967c11e1b20f33918c6ea Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 19 Mar 2012 22:07:29 -0400 Subject: v3: 3.2 branch is main (v3dv --> v3); dev (v3dv) branch directories removed * v3dv (3.2) "merged" into v3 (previously 3.1) (& removed) * conf/sisu/v3dv --> conf/sisu/v3 * data/sisu/v3dv --> data/sisu/v3 * lib/sisu/v3dv --> lib/sisu/v3 * bin/sisu* (v3dv references changed to v3) * (--dev modifier (superfluous for the time being) runs main v3 branch) --- lib/sisu/v3/harvest_topics.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 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 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 += %{#{l}   } end - sv=SiSU_Env::Info_version.instance.get_version + sv=SiSU_Env::InfoVersion.instance.get_version < -- cgit v1.2.3