aboutsummaryrefslogtreecommitdiffhomepage
path: root/sundry/misc/util/rb/cgi/spine.search.cgi
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-10-13 13:33:08 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-11-27 19:51:22 -0500
commit0ff37b772594b21a26b4b878a5ddbc6f1e0d1e67 (patch)
tree86de7f449aab13cee6be7dbff314a024c1aeb499 /sundry/misc/util/rb/cgi/spine.search.cgi
parentconfiguration, hierarchy filenames & paths ... (diff)
org files, tangle output, some fixes
Diffstat (limited to 'sundry/misc/util/rb/cgi/spine.search.cgi')
-rwxr-xr-xsundry/misc/util/rb/cgi/spine.search.cgi174
1 files changed, 87 insertions, 87 deletions
diff --git a/sundry/misc/util/rb/cgi/spine.search.cgi b/sundry/misc/util/rb/cgi/spine.search.cgi
index ff2bfc2..9184847 100755
--- a/sundry/misc/util/rb/cgi/spine.search.cgi
+++ b/sundry/misc/util/rb/cgi/spine.search.cgi
@@ -44,7 +44,7 @@
* Standard SiSU meta-markup syntax, and the
* Standard SiSU object citation numbering and system
- * Hompages:
+ * Homepages:
<https://www.sisudoc.org>
* Ralph Amissah
@@ -739,99 +739,99 @@ FCGI.each_cgi do |cgi|
<b>search string:</b> "#{green}#{analyze_format}</font>"<br />
#{p_text} #{p_fulltext} #{p_keywords} #{p_title} #{p_author} #{p_topic_register} #{p_subject} #{p_description} #{p_publisher} #{p_editor} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename}
</font>
- WOK
- #eg = %{canned search e.g.:<br /> <a href="#{url}">#{url}</a><br />find: #{analyze}<br />database: #{database}}
- #% dbi_canning
- @header = Form.new(@base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form
- unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/
- print "Content-type: text/html\n\n"
- puts (@header+@tail)
- else #% searches
- s1=(@search_for.text1 =~/\S/) \
- ? @search_for.text1
- : 'Unavailable'
- if checked_case=~/\S/
- @search[:text]<<%{doc_objects.clean~'#{CGI.unescape(s1)}'}
- else
- @search[:text]<<%{doc_objects.clean~*'#{CGI.unescape(s1)}'}
- end
- #% dbi_request
- dbi_statement=DBI_SearchStatement.new(@conn,@search_for,q,checked_case)
- @text_search_flag=false
- @text_search_flag=dbi_statement.text_search_flag
- s_contents=dbi_statement.contents
- @body_main=''
- @search_regx=nil
- olduid=""
- if @text_search_flag
- if checked_sql =~/\S/
- sql_select_body=dbi_statement.sql_select_body_format
- else sql_select_body=''
- end
- @body_main << sql_select_body
- #@body_main << '<p><hr><br /><b>Main Text:</b><br />' << sql_select_body
- else
- end
- @hostpath = "#{@hosturl_files}"
- #@hostpath="#{@hosturl_files}/#{@stub}"
- def path_manifest(fn,ln=nil)
- case @output_dir_structure_by
- when 'filename'
- @lingual =='mono' \
- ? "#{@hostpath}/#{fn}/sisu_manifest.html"
- : "#{@hostpath}/#{fn}/sisu_manifest.#{ln}.html"
- when 'filetype'
- @lingual =='mono' \
- ? "#{@hostpath}/manifest/#{fn}.html"
- : "#{@hostpath}/manifest/#{fn}.#{ln}.html"
+ WOK
+ #eg = %{canned search e.g.:<br /> <a href="#{url}">#{url}</a><br />find: #{analyze}<br />database: #{database}}
+ #% dbi_canning
+ @header = Form.new(@base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form
+ unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/
+ print "Content-type: text/html\n\n"
+ puts (@header+@tail)
+ else #% searches
+ s1=(@search_for.text1 =~/\S/) \
+ ? @search_for.text1
+ : 'Unavailable'
+ if checked_case=~/\S/
+ @search[:text]<<%{doc_objects.clean~'#{CGI.unescape(s1)}'}
else
- "#{@hostpath}/#{ln}/manifest/#{fn}.html"
+ @search[:text]<<%{doc_objects.clean~*'#{CGI.unescape(s1)}'}
end
- end
- def path_html_seg(fn,ln=nil)
- case @output_dir_structure_by
- when 'filename'
- "#{@hostpath}/#{fn}"
- when 'filetype'
- "#{@hostpath}/html/#{fn}"
+ #% dbi_request
+ dbi_statement=DBI_SearchStatement.new(@conn,@search_for,q,checked_case)
+ @text_search_flag=false
+ @text_search_flag=dbi_statement.text_search_flag
+ s_contents=dbi_statement.contents
+ @body_main=''
+ @search_regx=nil
+ olduid=""
+ if @text_search_flag
+ if checked_sql =~/\S/
+ sql_select_body=dbi_statement.sql_select_body_format
+ else sql_select_body=''
+ end
+ @body_main << sql_select_body
+ #@body_main << '<p><hr><br /><b>Main Text:</b><br />' << sql_select_body
else
- "#{@hostpath}/#{ln}/html/#{fn}"
end
- end
- def path_toc(fn,ln=nil)
- if @output_dir_structure_by =='filename' \
- or @output_dir_structure_by =='filetype'
- @lingual =='mono' \
- ? "#{path_html_seg(fn,ln)}/toc.html"
- : "#{path_html_seg(fn,ln)}/toc.#{ln}.html"
- else
- "#{path_html_seg(fn,ln)}/toc.html"
+ @hostpath = "#{@hosturl_files}"
+ #@hostpath="#{@hosturl_files}/#{@stub}"
+ def path_manifest(fn,ln=nil)
+ case @output_dir_structure_by
+ when 'filename'
+ @lingual =='mono' \
+ ? "#{@hostpath}/#{fn}/sisu_manifest.html"
+ : "#{@hostpath}/#{fn}/sisu_manifest.#{ln}.html"
+ when 'filetype'
+ @lingual =='mono' \
+ ? "#{@hostpath}/manifest/#{fn}.html"
+ : "#{@hostpath}/manifest/#{fn}.#{ln}.html"
+ else
+ "#{@hostpath}/#{ln}/manifest/#{fn}.html"
+ end
end
- end
- def path_filename(fn,seg_name,ln=nil)
- if @output_dir_structure_by =='filename' \
- or @output_dir_structure_by =='filetype'
- @lingual =='mono' \
- ? "#{path_html_seg(fn,ln)}/#{seg_name}.html"
- : "#{path_html_seg(fn,ln)}/#{seg_name}.#{ln}.html"
- else
- "#{path_html_seg(fn,ln)}/#{seg_name}.html"
+ def path_html_seg(fn,ln=nil)
+ case @output_dir_structure_by
+ when 'filename'
+ "#{@hostpath}/#{fn}"
+ when 'filetype'
+ "#{@hostpath}/html/#{fn}"
+ else
+ "#{@hostpath}/#{ln}/html/#{fn}"
+ end
end
- end
- def path_html_doc(fn,ln=nil)
- case @output_dir_structure_by
- when 'filename'
- @lingual =='mono' \
- ? "#{path_html_seg(fn,ln)}/scroll.html"
- : "#{path_html_seg(fn,ln)}/scroll.#{ln}.html"
- when 'filetype'
- @lingual =='mono' \
- ? "#{@hostpath}/html/#{fn}.html"
- : "#{@hostpath}/html/#{fn}.#{ln}.html"
- else
- "#{@hostpath}/#{ln}/html/#{fn}.html"
+ def path_toc(fn,ln=nil)
+ if @output_dir_structure_by =='filename' \
+ or @output_dir_structure_by =='filetype'
+ @lingual =='mono' \
+ ? "#{path_html_seg(fn,ln)}/toc.html"
+ : "#{path_html_seg(fn,ln)}/toc.#{ln}.html"
+ else
+ "#{path_html_seg(fn,ln)}/toc.html"
+ end
+ end
+ def path_filename(fn,seg_name,ln=nil)
+ if @output_dir_structure_by =='filename' \
+ or @output_dir_structure_by =='filetype'
+ @lingual =='mono' \
+ ? "#{path_html_seg(fn,ln)}/#{seg_name}.html"
+ : "#{path_html_seg(fn,ln)}/#{seg_name}.#{ln}.html"
+ else
+ "#{path_html_seg(fn,ln)}/#{seg_name}.html"
+ end
+ end
+ def path_html_doc(fn,ln=nil)
+ case @output_dir_structure_by
+ when 'filename'
+ @lingual =='mono' \
+ ? "#{path_html_seg(fn,ln)}/scroll.html"
+ : "#{path_html_seg(fn,ln)}/scroll.#{ln}.html"
+ when 'filetype'
+ @lingual =='mono' \
+ ? "#{@hostpath}/html/#{fn}.html"
+ : "#{@hostpath}/html/#{fn}.#{ln}.html"
+ else
+ "#{@hostpath}/#{ln}/html/#{fn}.html"
+ end
end
- end
#% text_objects_body
s_contents.each do |c| #% text body
location=c['src_filename_base'][/(.+?)\.(?:ssm\.sst|sst)$/,1]