Generated by
#{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
|
#{v[:project]} using:
| |
SiSU is released under GPL v3 or later, http://www.gnu.org/licenses/gpl.html |
#{v[:project]}, developed using Ruby on Debian/Gnu/Linux software infrastructure, with the usual GPL (or OSS) suspects. |
ocn #{c['ocn']}:
#{matched_para}} elsif c['suffix'] =~/1/ #doc %{#{title}ocn #{c['ocn']}:#{c['body']}}
end
@counter_txt_ocn+=1
output=title+text
else #elsif cgi['view']=~/index/ #% idx body
if c['suffix'] !~/1/ #seg
index=%{#{c['ocn']}, } if @text_search_flag
elsif c['suffix'] =~/1/ #doc #FIX
index=%{#{c['ocn']}, }
end
if c['seg'] =~/\S+/
if @text_search_flag
@counter_txt_ocn+=1
output=title+index
end
else
@counter_txt_ocn+=1
output=c['suffix'] !~/1/ \
? title+index
: %{#{title}#{c['ocn'].sort}, }
end
end
else output=title
end
@counters_txt=if @counter_txt_doc > 0
if checked_stats =~/\S/
@@lt_t=(@counter_txt_ocn==dbi_statement.sql_match_limit.to_i) ? true : false
start=(@@offset.to_i+1).to_s
range=(@@offset.to_i+@counter_txt_ocn.to_i).to_s
%{
Found #{@counter_txt_ocn} times in the main body of #{@counter_txt_doc} documents [ matches #{start} to #{range} ]
}
else ''
end
else ''
end
@body_main << output #+ details
end
#text_objects_endnote
oldtid = 0
s_endnotes.each do |e| #% endnotes
location=e['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
file_suffix=e['src_filename'][/.+?\.(_?sst|ssm)$/,1]
lang=if location =~ /\S+?~(\S\S\S?)$/
l=location[/\S+?~(\S\S\S?)$/,1]
location=location.gsub(/(\S+?)~\S\S\S?/,'\1')
l=".#{l}"
else ''
end
#metadata_found_endnotes
if @text_search_flag
if e['metadata_tid'].to_i != oldtid.to_i
ti=e['title']
can_txt_srch=(cgi['view']=~/index/) \
? %{ }
: %{ }
title=%{
#{ti} [#{e['language_document_char']}] by #{e['creator_author']} #{can_txt_srch}
} if file_suffix=~/s/
@counter_endn_doc+=1
oldtid=e['metadata_tid'].to_i
else title = ''
end
if cgi['view']=~/text/ \
or (cgi['view']!~/index/ and cgi['search'] !~/search db/) #% txt endnotes
@counter_endn_ocn+=1
matched_endnote=(@search_regx.to_s.is_a?(String) \
&& @search_regx.to_s=~/\S\S+/) \
? (matched=e['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{\\1}))
: e['body']
output=%{#{title}
note #{e['nr']} referred to from ocn #{e['ocn']}: #{matched_endnote}}
else #elsif cgi['view']=~/index/ #doc #FIX #% idx endnotes
@counter_endn_ocn+=1
output=%{#{title}#{e['nr']} [§ #{e['ocn']}], }
end
@counters_endn=if @counter_endn_doc > 0
if checked_stats =~/\S/
@@lt_e=@counter_endn_ocn==dbi_statement.sql_match_limit.to_i \
? true
: false
start=(@@offset.to_i+1).to_s
range=(@@offset.to_i+@counter_endn_ocn.to_i).to_s
%{Found #{@counter_endn_ocn} times in the endnotes of #{@counter_endn_doc} documents [ matches #{start} to #{range} ]
}
else ''
end
end
@endnotes << output #+ details
else @endnotes='' #does not take out yet
end
end
offset=dbi_statement.sql_offset.to_s
limit=dbi_statement.sql_match_limit.to_s
@@lt_t ||=false; @@lt_e ||=false
canned=(@@lt_t or @@lt_e) \
? dbi_statement.pre_next(true,@image_src).to_s
: dbi_statement.pre_next(false,@image_src).to_s
limit=dbi_statement.sql_match_limit.to_s
cgi.out{@header.force_encoding("UTF-8") + @counters_txt.force_encoding("UTF-8") + @counters_endn.force_encoding("UTF-8") + canned.force_encoding("UTF-8") + @body_main.force_encoding("UTF-8") + @endnotes.force_encoding("UTF-8") + canned.force_encoding("UTF-8") + @tail.force_encoding("UTF-8")} #% print cgi_output_header+counters+body+endnotes
end
rescue Exception => e
s='' + CGI::escapeHTML(e.backtrace.reverse.join("\n"))
s << CGI::escapeHTML(e.message) + '
'
cgi.out{s}
next
ensure # eg. disconnect from server
@conn.disconnect if @conn
end
end
WOK_SQL
end
end
end
__END__