aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/harvest_topics.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/harvest_topics.rb')
-rw-r--r--lib/sisu/v3/harvest_topics.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/sisu/v3/harvest_topics.rb b/lib/sisu/v3/harvest_topics.rb
index 00471184..f00fb7f3 100644
--- a/lib/sisu/v3/harvest_topics.rb
+++ b/lib/sisu/v3/harvest_topics.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# encoding: utf-8
=begin
* Name: SiSU
@@ -59,7 +59,7 @@
=end
module HARVEST_topics
- require "#{SiSU_lib}/author_format" # author_format.rb
+ require_relative 'author_format' # author_format.rb
class Songsheet
def initialize(opt)
@opt=opt
@@ -140,10 +140,10 @@ module HARVEST_topics
idxl=[]
g.each do |i|
i.strip!
- idxl << { :filename =>filename,:file =>file,:rough_idx =>i,:title =>@fulltitle,:author =>creator,:page =>page}
+ idxl << { filename: filename, file: file, rough_idx: i, title: @fulltitle, author: creator, page: page }
end
idxl
- else { :filename =>filename,:file =>file,:rough_idx =>@idx_list,:title =>@fulltitle,:author =>creator,:page =>page}
+ else { filename: filename, file: file, rough_idx: @idx_list, title: @fulltitle, author: creator, page: page }
end
else
p "missing required field in #{@filename} - [title]: <<#{@title}>>; [author]: <<#{@author_format}>>; [idx]: <<#{@idx_list}>>" if @opt.cmd.inspect =~/[VM]/
@@ -166,7 +166,7 @@ module HARVEST_topics
s=n.sub(/(.+?)(?:,.+|$)/,'\1').gsub(/\s+/,'_')
names += %{<a href="harvest_authors.html##{s}">#{n}</a>, }
end
- hash << { :filename =>idx[:filename],:file =>idx[:file],:author =>names,:title =>idx[:title],:page =>idx[:page]}
+ hash << { filename: idx[:filename], file: idx[:file], author: names, title: idx[:title], page: idx[:page] }
end
def construct_book_topic_index
idx_array=@idx_array
@@ -190,7 +190,7 @@ module HARVEST_topics
lev0.each do |lv0|
lv0=capital(lv0)
if @@the_idx_topics[lv0].class==NilClass
- @@the_idx_topics[lv0]={:md => []}
+ @@the_idx_topics[lv0]={ md: [] }
end
@lv0=lv0 if lev0.length==1
j=@@the_idx_topics[lv0][:md]
@@ -201,7 +201,7 @@ module HARVEST_topics
lev1.each do |lv1|
lv1=capital(lv1)
if @@the_idx_topics[@lv0][lv1].class==NilClass
- @@the_idx_topics[@lv0][lv1]={:md => []}
+ @@the_idx_topics[@lv0][lv1]={ md: [] }
end
@lv1=lv1 if lev1.length==1
j=@@the_idx_topics[@lv0][lv1][:md]
@@ -212,7 +212,7 @@ module HARVEST_topics
lev2.each do |lv2|
lv2=capital(lv2)
if @@the_idx_topics[@lv0][@lv1][lv2].class==NilClass
- @@the_idx_topics[@lv0][@lv1][lv2]={:md => []}
+ @@the_idx_topics[@lv0][@lv1][lv2]={ md: [] }
end
@lv2=lv2 if lev2.length==1
j=@@the_idx_topics[@lv0][@lv1][lv2][:md]
@@ -223,7 +223,7 @@ module HARVEST_topics
lev3.each do |lv3|
lv3=capital(lv3)
if @@the_idx_topics[@lv0][@lv1][@lv2][lv3].class==NilClass
- @@the_idx_topics[@lv0][@lv1][@lv2][lv3]={:md => []}
+ @@the_idx_topics[@lv0][@lv1][@lv2][lv3]={ md: [] }
end
@lv3=lv3 if lev3.length==1
j=@@the_idx_topics[@lv0][@lv1][@lv2][lv3][:md]
@@ -234,7 +234,7 @@ module HARVEST_topics
lev4.each do |lv4|
lv4=capital(lv4)
if @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4].class==NilClass
- @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4]={:md => []}
+ @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4]={ md: [] }
end
@lv4=lv4 if lev4.length==1
j=@@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4][:md]