aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/harvest_authors.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/harvest_authors.rb')
-rw-r--r--lib/sisu/v3/harvest_authors.rb28
1 files changed, 14 insertions, 14 deletions
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 += %{<a href="#{file}">#{l}</a>&nbsp;&nbsp;&nbsp;}
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">