aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v1
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v1')
-rw-r--r--lib/sisu/v1/cgi_sql_common.rb26
-rw-r--r--lib/sisu/v1/harvest_topics.rb12
2 files changed, 22 insertions, 16 deletions
diff --git a/lib/sisu/v1/cgi_sql_common.rb b/lib/sisu/v1/cgi_sql_common.rb
index 9900ff43..5b2ef9b2 100644
--- a/lib/sisu/v1/cgi_sql_common.rb
+++ b/lib/sisu/v1/cgi_sql_common.rb
@@ -285,8 +285,8 @@ module SiSU_CGI_sql
@date_available=q['dta'] if q['dta']=~/\S/
@date_valid=q['dtv'] if q['dtv']=~/\S/
@filename=if q['doc'] and q['search'] !~/search db/; q['doc']
- elsif q['fns']=~/\S/; q['fns']ยท
- end
+ elsif q['fns']=~/\S/; q['fns']
+ end
@@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000
@@offset=q['off'] if q['off']=~/\d+/ # 0
end
@@ -448,7 +448,9 @@ module SiSU_CGI_sql
@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + @offset_next.to_s
end
def previous
- @offset_previous >= 0 ? (@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) : ''
+ @offset_previous >= 0 \
+ ? (@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) \
+ : ''
end
def start
@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + 0.to_s
@@ -877,14 +879,15 @@ module SiSU_CGI_sql
end
@counters_txt=if @counter_txt_doc > 0
if checked_stats =~/\S/
- @@lt_t=if @counter_txt_ocn == dbi_statement.sql_limit.to_i
- over='over'
+ @@lt_t=if @counter_txt_ocn==dbi_statement.sql_limit.to_i
+ over_limit='over the limit set of'
+ over_this_number='more than'
true
else
- over=''
+ over_limit,over_this_number='',''
false
end
- %{<hr /><font size="2" color="#666666">Found in the main body of #{@counter_txt_doc} documents, and at #{over} #{@counter_txt_ocn} locations within.</font><br />}
+ %{<hr /><font size="2" color="#666666">Found in the main body of #{over_this_number} #{@counter_txt_doc} documents, and at #{over_limit} #{@counter_txt_ocn} locations within.</font><br />}
else ''
end
else ''
@@ -930,14 +933,15 @@ module SiSU_CGI_sql
end
@counters_endn=if @counter_endn_doc > 0
if checked_stats =~/\S/
- @@lt_e=if @counter_endn_ocn == dbi_statement.sql_limit.to_i
- over='over'
+ @@lt_e=if @counter_endn_ocn==dbi_statement.sql_limit.to_i
+ over_limit='over the limit set of'
+ over_this_number='more than'
true
else
- over=''
+ over_limit,over_this_number='',''
false
end
- %{<font size="2" color="#666666">Found in the endnotes of #{@counter_endn_doc} documents, and at #{over} #{@counter_endn_ocn} locations within.</font><br />}
+ %{<font size="2" color="#666666">Found in the endnotes of #{over_this_number} #{@counter_endn_doc} documents, and at #{over_limit} #{@counter_endn_ocn} locations within.</font><br />}
else ''
end
end
diff --git a/lib/sisu/v1/harvest_topics.rb b/lib/sisu/v1/harvest_topics.rb
index 3ebd2da6..2ac181d0 100644
--- a/lib/sisu/v1/harvest_topics.rb
+++ b/lib/sisu/v1/harvest_topics.rb
@@ -91,7 +91,7 @@ module HARVEST_topics
idx_array=HARVEST_topics::Harvest.new(file_array,filename,idx_array).extract_harvest
end
the_idx=HARVEST_topics::Index.new(idx_array,@@the_idx_topics).construct_book_topic_index
- #HARVEST_topics::Output_index.new(the_idx).screen_print.cycle
+ #HARVEST_topics::Output_index.new('',the_idx).screen_print.cycle if @opt.cmd.inspect =~/[VM]/
HARVEST_topics::Output_index.new(@opt,the_idx).html_print.html_songsheet
puts "file://#{@env.path.output_md_harvest}/harvest_topics.html"
puts "file://#{@env.path.pwd}/harvest_topics.html" if @opt.cmd.inspect =~/-M/
@@ -125,7 +125,9 @@ module HARVEST_topics
break if @title and @subtitle and @author and @idx_lst
end
@fulltitle=@subtitle ? (@title + ' - ' + @subtitle) : @title
- if @title and @author_format and @idx_list
+ if @title \
+ and @author_format \
+ and @idx_list
creator=FORMAT::Author.new(@author_format.strip).author_details
@authors,@authorship=creator[:authors],creator[:authorship]
file=if filename=~/~[a-z]{2,3}\.ss[mt]$/
@@ -141,10 +143,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 author field: #@filename title: #@title; author: #@author_format; idx: #@idx_list"
@@ -167,7 +169,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