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_authors.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'lib/sisu/v3/harvest_authors.rb') diff --git a/lib/sisu/v3/harvest_authors.rb b/lib/sisu/v3/harvest_authors.rb index 996b748c..5bb702be 100644 --- a/lib/sisu/v3/harvest_authors.rb +++ b/lib/sisu/v3/harvest_authors.rb @@ -57,7 +57,7 @@ ** Description: simple xml representation (sax style) =end -module HARVEST_authors +module SiSU_Harvest_Authors require_relative 'author_format' # author_format.rb class Songsheet @@the_idx_authors={} @@ -70,8 +70,8 @@ module HARVEST_authors 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|date):(?:\s|$)/m @@ -85,11 +85,11 @@ module HARVEST_authors end lang_hash_file_array.each_pair do |lang,a| idx_array[lang] ||= [] - idx_array=HARVEST_authors::Harvest.new(@opt,@env,a,filename,name,idx_array,lang).extract_harvest + idx_array=SiSU_Harvest_Authors::Harvest.new(@opt,@env,a,filename,name,idx_array,lang).extract_harvest end 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 + the_idx=SiSU_Harvest_Authors::Index.new(idx_array,@@the_idx_authors).construct_book_author_index + SiSU_Harvest_Authors::OutputIndex.new(@opt,the_idx).html_print.html_songsheet end end class Harvest @@ -123,7 +123,7 @@ module HARVEST_authors @fulltitle=@subtitle ? (@title + ' - ' + @subtitle) : @title if @title \ and @author_format - 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]$/,'') @@ -139,7 +139,7 @@ module HARVEST_authors else #p "missing author field: #{@filename} title: #{@title}; author: #{@author_format}" end - idx_array[lang].flatten! + idx_array[lang]=idx_array[lang].flatten idx_array end end @@ -157,7 +157,7 @@ module HARVEST_authors @@the_idx_authors[lang] ||= {} idx_array.each do |idx| idx[:author][:last_first_format_a].each do |author| - author.strip! + author=author.strip if @@the_idx_authors[lang][author].class==NilClass @@the_idx_authors[lang][author]={ md: [] } end @@ -168,15 +168,15 @@ module HARVEST_authors @the_idx=@@the_idx_authors 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| @@ -241,7 +241,7 @@ module HARVEST_authors 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