aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/util_cgi_rb_fcgi_sqlite_search.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-04-11 20:51:27 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2020-05-20 11:27:25 -0400
commit3dcd083585b3f486ece3cfaa0780a6e2ec5b43fe (patch)
treefda07f176104b63fb0bc23e829d457d2926bbdb1 /org/util_cgi_rb_fcgi_sqlite_search.org
parentmetaverse, set behavior of block & group text (diff)
help & manpages, start work
Diffstat (limited to 'org/util_cgi_rb_fcgi_sqlite_search.org')
-rw-r--r--org/util_cgi_rb_fcgi_sqlite_search.org32
1 files changed, 16 insertions, 16 deletions
diff --git a/org/util_cgi_rb_fcgi_sqlite_search.org b/org/util_cgi_rb_fcgi_sqlite_search.org
index 3460b32..124ac25 100644
--- a/org/util_cgi_rb_fcgi_sqlite_search.org
+++ b/org/util_cgi_rb_fcgi_sqlite_search.org
@@ -31,7 +31,7 @@ document home currently at /var/www/html (better placed at /var/www or srv/proje
*** sqlite cgi search TODO
**** head
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi" :tangle-mode (identity #o755) :shebang #!/usr/bin/env ruby
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" :tangle-mode (identity #o755) :shebang #!/usr/bin/env ruby
=begin
* Name: SiSU information Structuring Universe
* Author: Ralph Amissah
@@ -91,7 +91,7 @@ document home currently at /var/www/html (better placed at /var/www or srv/proje
**** initialize
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
begin
require 'cgi'
require 'fcgi'
@@ -117,7 +117,7 @@ end
**** form
***** initialize form
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
class Form
def initialize(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='')
search_note = '' if checked_searched !~ /\S/
@@ -133,7 +133,7 @@ class Form
***** submission form
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
def submission_form
search_form =<<-WOK
<!DOCTYPE html>
@@ -218,7 +218,7 @@ end
**** search request
***** initialize request
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
class SearchRequest #% search_for
attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:src_filename_base
def initialize(search_field='',q='')
@@ -293,7 +293,7 @@ class SearchRequest #% sea
***** text to match
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
def text_to_match(identifier='')
m={
string: /#{identifier}\s*(.+?)/,
@@ -318,7 +318,7 @@ end
**** search string
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
class DBI_SearchString
def initialize(l,t,q,cse=false)
@l,@t,@q=l,t,q
@@ -346,7 +346,7 @@ end
**** search statement
***** init
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
class DBI_SearchStatement
attr_reader :text_search_flag,:sql_select_body_format,:sql_offset,:sql_limit
def initialize(conn,search_for,q,c)
@@ -453,7 +453,7 @@ class DBI_SearchStatement
***** misc
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
def sql_offset
@@offset
end
@@ -540,7 +540,7 @@ class DBI_SearchStatement
***** select statement
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
def sql_select_body
limit ||= @@limit
offset ||= @@offset
@@ -565,7 +565,7 @@ end
**** tail
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
def tail
<<-'WOK'
<br /><hr /><br />
@@ -673,7 +673,7 @@ end
**** fcgi each
***** init & start loop
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
@tail=tail
@counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0
@counters_txt,@counters_endn,@sql_select_body='','',''
@@ -748,7 +748,7 @@ FCGI.each_cgi do |cgi|
***** canned search
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
#Canned_search.new(@base,@search_for.text1,cgi)
if @search_for.text1=~/\S+/ or @search_for.fulltext=~/\S+/ or @search_for.author=~/\S+/ or @search_for.topic_register=~/\S+/ #and search_field =~/\S/
s1 = 's1=' + CGI.escape(@search_for.text1) if @search_for.text1 =~ /\S/
@@ -849,7 +849,7 @@ FCGI.each_cgi do |cgi|
***** submission form
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
@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"
@@ -944,7 +944,7 @@ FCGI.each_cgi do |cgi|
***** contents each, text body
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
#% text_objects_body
s_contents.each do |c| #% text body
location=c['src_filename_base'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
@@ -1040,7 +1040,7 @@ FCGI.each_cgi do |cgi|
***** after
-#+BEGIN_SRC ruby :tangle "../util/rb/cgi/spine.search.cgi"
+#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi"
olduid = ""
offset=dbi_statement.sql_offset.to_s
limit=dbi_statement.sql_match_limit.to_s