aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-10 15:35:44 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-10 15:35:44 +0100
commit22fab950e51ba9fc551bea840925b3020ec381bc (patch)
tree2e7978ff32ec31bc740b8f33b3c4aa24743493e1
parentimproved url matching, and texpdf tolerance and indentation levels set (diff)
cgi search form worked on and presentation, (an info button added and used)
* cgi, generated sample search form, rearranged presentation * editor syntax highlighting, kate, kwrite visited
-rw-r--r--CHANGELOG7
-rw-r--r--data/sisu/conf/syntax/sisu.xml39
-rw-r--r--data/sisu/image/b_info.pngbin0 -> 201 bytes
-rw-r--r--data/sisu/image/bluebell.pngbin410 -> 0 bytes
-rw-r--r--lib/sisu/v0/cgi_pgsql.rb5
-rw-r--r--lib/sisu/v0/cgi_sql_common.rb166
-rw-r--r--lib/sisu/v0/cgi_sqlite.rb2
-rw-r--r--lib/sisu/v0/defaults.rb5
-rw-r--r--lib/sisu/v0/help.rb2
-rw-r--r--lib/sisu/v0/sysenv.rb4
-rw-r--r--lib/sisu/v0/xml_scaffold.rb2
11 files changed, 112 insertions, 120 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ae4d6eec..e1f016ad 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,7 +6,7 @@ Reverse Chronological:
%% STABLE MANIFEST
-%% sisu_0.55.3.orig.tar.gz (2007-07-07:27/6)
+%% sisu_0.55.3.orig.tar.gz (2007-07-14:28/6)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.3.orig.tar.gz
sisu_0.55.3.orig.tar.gz
sisu_0.55.3-1.dsc
@@ -23,8 +23,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.3.orig.tar.gz
better
* indentation levels reset
- FIX [* texpdf, indent levels, level 1 goes in to far, level 2 not
- differentiated!] FIX
+ * cgi, generated sample search form, rearranged presentation
+
+ * editor syntax highlighting, kate, kwrite visited
%% sisu_0.55.2.orig.tar.gz (2007-07-07:27/6)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.2.orig.tar.gz
diff --git a/data/sisu/conf/syntax/sisu.xml b/data/sisu/conf/syntax/sisu.xml
index 9467ec44..61135285 100644
--- a/data/sisu/conf/syntax/sisu.xml
+++ b/data/sisu/conf/syntax/sisu.xml
@@ -8,10 +8,20 @@
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
+ <StringDetect String="&lt;br&gt;" attribute="Break" context="#pop" />
+ <RegExpr String="\s+$" attribute="Warn" context="#pop" />
+ <RegExpr String="&lt;\S+&gt;" attribute="Warn" context="#pop" />
+ <RegExpr String="&lt;a href=\S+&gt;" attribute="Warn" context="#pop" />
+ <RegExpr String="&lt;a href=" attribute="Warn" context="#pop" />
+ <RegExpr String="&lt;/a&gt;" attribute="Warn" context="#pop" />
+ <RegExpr String="&lt;https?:\/\/\S+&gt;" attribute="Warn" context="#pop"/>
+ <RegExpr String="&gt;https?:\/\/\S+" attribute="Warn" context="#pop"/>
+ <RegExpr String="&lt;&lt;\s+&#124;" attribute="Link" context="#pop"/>
+ <RegExpr String="https?:\/\/\S+&lt;" attribute="Warn" context="#pop"/>
<keyword attribute="Keyword" context="#stay" String="somename" />
<DetectChar attribute="String" context="string" char="&quot;" />
<RegExpr String="^(0~\S+|@\S+)\s.+$" attribute="Header" context="#pop" />
- <RegExpr String="^:?[A-C1-6]~.+$" attribute="Heading" context="#pop" />
+ <RegExpr String="^:?[A-C1-9]~.+$" attribute="Heading" context="#pop" />
<StringDetect String="~{" attribute="Endnote" context="footnote"/>
<StringDetect String="^~" attribute="Endnote" context="endnote"/>
<StringDetect String="!{" attribute="Bold" context="emphasis"/>
@@ -22,11 +32,13 @@
<StringDetect String=",{" attribute="Subscript" context="subscript"/>
<StringDetect String="-{" attribute="Strike" context="strike"/>
<StringDetect String="+{" attribute="Insert" context="insert"/>
- <StringDetect String="&lt;br&gt;" attribute="Break" context="#pop" />
- <RegExpr String="\{.+?\}(http:\/\/\S+|image)" attribute="Link" context="#stay"/>
- <RegExpr String="(^|\s)http:\/\/\S+" attribute="Link" context="#stay"/>
+ <RegExpr String="\{[\s\S]+\}https?:\/\/\S+(\s|$)" attribute="Link" context="#pop" minimal="true" />
+ <RegExpr String="\{[\s\S]+\}\.\.\/\S+(\s|$)" attribute="Link" context="#stay" minimal="true" />
+ <RegExpr String="\{[\s\S]+\}image(\s|$)" attribute="Link" context="#stay" minimal="true" />
+ <RegExpr String="\s_?https?:\/\/\S+" attribute="Link" context="#stay"/>
+ <RegExpr String="^_?https?:\/\/\S+" attribute="Link" context="#stay"/>
<RegExpr String="^!_ .+" attribute="Bold" context="boldline"/>
- <RegExpr String="^(_[12]|_\*|_[12]\*)\s" attribute="Indent" context="#stay"/>
+ <RegExpr String="^(_[1-9]|_\*|_[1-9]\*)\s" attribute="Indent" context="#stay"/>
<RegExpr String="~\^" attribute="Endnote" context="#stay"/>
<RegExpr String="^%+\s.+$" attribute="Comment" context="#stay" endRegion="regionMarker" firstNonSpace="true" />
</context>
@@ -35,6 +47,11 @@
</context>
<context attribute="Endnote" lineEndContext="#stay" name="footnote" >
<StringDetect attribute="Endnote" context="#pop" String="}~" />
+ <RegExpr String="\{[\s\S]+\}https?:\/\/\S+(\s|$)" attribute="Link" context="#pop" minimal="true" />
+ <RegExpr String="\{[\s\S]+\}\.\.\/\S+(\s|$)" attribute="Link" context="#stay" minimal="true" />
+ <RegExpr String="\{[\s\S]+\}image(\s|$)" attribute="Link" context="#stay" minimal="true" />
+ <RegExpr String="\s_?https?:\/\/\S+" attribute="Link" context="#stay"/>
+ <RegExpr String="^_?https?:\/\/\S+" attribute="Link" context="#stay"/>
<StringDetect String="!{" attribute="Bold" context="emphasis"/>
<StringDetect String="*{" attribute="Bold" context="bold"/>
<StringDetect String="/{" attribute="Italic" context="italic"/>
@@ -106,11 +123,11 @@
<StringDetect attribute="Strike" context="#pop" String="}-" />
<StringDetect String="!{" attribute="Bold" context="emphasis"/>
<StringDetect String="*{" attribute="Bold" context="bold"/>
- <StringDetect String="/{" attribute="Italic" context="italic"/>
+ <StringDetect String="/{" attribute="Italic" context="italic"/>
<StringDetect String="_{" attribute="Underscore" context="underscore"/>
- <StringDetect String="^{" attribute="Superscript" context="superscript"/>
- <StringDetect String=",{" attribute="Subscript" context="subscript"/>
- <StringDetect String="+{" attribute="Insert" context="insert"/>
+ <StringDetect String="^{" attribute="Superscript" context="superscript"/>
+ <StringDetect String=",{" attribute="Subscript" context="subscript"/>
+ <StringDetect String="+{" attribute="Insert" context="insert"/>
</context>
<context attribute="Insert" lineEndContext="#stay" name="insert" >
<StringDetect attribute="Insert" context="#pop" String="}+" />
@@ -125,6 +142,7 @@
<context attribute="Endnote" lineEndContext="#pop" name="endnote" />
<context attribute="Bold" lineEndContext="#pop" name="boldline" />
<context attribute="Indent" lineEndContext="#pop" name="indent" />
+ <context attribute="Warn" lineEndContext="#pop" name="warn" />
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
@@ -138,7 +156,7 @@
<itemData name="Strike" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/>
<itemData name="Insert" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/>
<itemData name="Keyword" defStyleNum="dsKeyword" />
- <itemData name="Endnote" defStyleNum="dsNormal" color="#086800" selColor="#60FFFF" bold="0" italic="0"/>
+ <itemData name="Endnote" defStyleNum="dsNormal" color="#0AAA00" selColor="#60FFFF" bold="0" italic="0"/>
<itemData name="Link" defStyleNum="dsNormal" color="#0000FF" selColor="#60FFFF" bold="0" italic="0"/>
<itemData name="String" defStyleNum="dsString" />
<itemData name="Comment" defStyleNum="dsComment"/>
@@ -146,6 +164,7 @@
<itemData name="Break" defStyleNum="dsNormal" color="#FF0000" selColor="#60FFFF" bold="0" italic="0"/>
<itemData name="Indent" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/>
<itemData name="Structure" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/>
+ <itemData name="Warn" defStyleNum="dsError" color="#FF00FF" selColor="#000000" bold="1" italic="0"/>
</itemDatas>
</highlighting>
<general>
diff --git a/data/sisu/image/b_info.png b/data/sisu/image/b_info.png
new file mode 100644
index 00000000..133fd8b6
--- /dev/null
+++ b/data/sisu/image/b_info.png
Binary files differ
diff --git a/data/sisu/image/bluebell.png b/data/sisu/image/bluebell.png
deleted file mode 100644
index 99c572d4..00000000
--- a/data/sisu/image/bluebell.png
+++ /dev/null
Binary files differ
diff --git a/lib/sisu/v0/cgi_pgsql.rb b/lib/sisu/v0/cgi_pgsql.rb
index 0032a927..9a577337 100644
--- a/lib/sisu/v0/cgi_pgsql.rb
+++ b/lib/sisu/v0/cgi_pgsql.rb
@@ -92,7 +92,7 @@ module SiSU_CGI_pgsql
f2 << " end\n"
if FileTest.writable?('.')
output=File.open('sisu_pgsql.cgi','w')
- output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons2 << buttons2_pgsql << buttons3 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << dbi_connect << @common.main2
+ output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons1_pgsql << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << dbi_connect << @common.main2
a=%{ generated sisu_pgsql.cgi,
BASED ON ALREADY EXISTING directories that could potentially be used to populate postgresql db, (-D)
}
@@ -213,9 +213,8 @@ module SiSU_CGI_pgsql
end
WOK_SQL
end
- def buttons2_pgsql
+ def buttons1_pgsql
<<-'WOK_SQL'
- <font size="2" color="#222222">
<input type="checkbox" name="casesense" #@checked_case> case sensitive
WOK_SQL
end
diff --git a/lib/sisu/v0/cgi_sql_common.rb b/lib/sisu/v0/cgi_sql_common.rb
index 37ca67b8..fbb627db 100644
--- a/lib/sisu/v0/cgi_sql_common.rb
+++ b/lib/sisu/v0/cgi_sql_common.rb
@@ -131,13 +131,13 @@ module SiSU_CGI_sql
@color_heading='#DDFFAA'
@color_match='#ffff48'
class Form
- def initialize(base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can='')
+ def initialize(base,search_field,selected_db,checked_index,checked_text,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/
the_can='' if checked_url !~/\S/
search_field='' if checked_echo !~/\S/
- @base,@search_field,@selected_db,@checked_index,@checked_text,@checked_tip,@checked_searched,@checked_url,@checked_case,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_ignore,@search_note,@the_can=base,search_field,selected_db,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can
+ @base,@search_field,@selected_db,@checked_index,@checked_text,@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=base,search_field,selected_db,checked_index,checked_text,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
@tip=if checked_tip =~/\S/
- '<font size="2" color="#666666">text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;</font>'
+ '<font size="2" color="#666666">text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;</font><br />'
else ''
end
end
@@ -171,62 +171,53 @@ module SiSU_CGI_sql
end
def header2
<<-'WOK_SQL'
- <table cellpadding="0">
- <tr><td valign=\"top\">
- <form action="#@base" id="Test Form" method="post">
- <!input type="text" id="find" name="find" value="#@search_field" />
- <!input type="text" id="find" name="find" value="" />
- <font size="2" color="#222222">
- select which database to search
- </font>
- <br />
- <select name="db" size="1">
- #@selected_db
- WOK_SQL
- end
- def buttons1
- <<-'WOK_SQL'
- </select>
- <font size="2" color="#222222">
- <input type="radio" name="view" value="index" #@checked_index> index
- <input type="radio" name="view" value="text" #@checked_text> text / grep
- </font>
- </td></tr></table>
+ <form action="#@base" id="Test Form" method="post">
<table cellpadding="2">
<tr><td valign=\"top\">
- <textarea id="find" name="find" type="text" rows="4" cols="30" maxlength="256">#@search_field</textarea>
- <br /><input type="submit" value="SiSU search" />
- WOK_SQL
- end
- def buttons2
- <<-'WOK_SQL'
+ <textarea id="find" name="find" type="text" rows="4" cols="30" maxlength="256">#@search_field</textarea>
</td>
<td valign=\"top\">
#@tip
#@search_note
#@the_can
</td></tr></table>
- <table><tr><td>
+ <td valign=\"top\"><tr><td>
+ <!input type="text" id="find" name="find" value="#@search_field" />
+ <!input type="text" id="find" name="find" value="" />
+ <font size="2" color="#222222">
+ <b>to search:</b> select which database to search (drop-down menu below); enter your search query (in the form above); and <b>click on the search button</b> (below)
+ <br />
+ <select name="db" size="1">
+ #@selected_db
+ WOK_SQL
+ end
+ def buttons1
+ <<-'WOK_SQL'
+ </select>
+ <input type="submit" value="SiSU search" />
+ <input type="radio" name="view" value="index" #@checked_index> index
+ <input type="radio" name="view" value="text" #@checked_text> text / grep
WOK_SQL
end
- def buttons3
+ def buttons2
<<-'WOK_SQL'
- <br />
- <input type="checkbox" name="echo" #@checked_echo> echo previous search
- <input type="checkbox" name="searched" #@checked_searched> search result stats
- <input type="checkbox" name="url" #@checked_url> url for search
- <input type="checkbox" name="tip" #@checked_tip> available search fields
- <input type="checkbox" name="sql" #@checked_sql> sql statement
- <br />
- checks:
- <input type="radio" name="checks" value="check_ignore" #@checked_ignore> selected
- <input type="radio" name="checks" value="check_all" #@checked_all> all
- <input type="radio" name="checks" value="check_none" #@checked_none> none
- </font>
-
+ <br />
+ <input type="checkbox" name="echo" #@checked_echo> echo query
+ <input type="checkbox" name="stats" #@checked_stats> result stats
+ <input type="checkbox" name="url" #@checked_url> search url
+ <input type="checkbox" name="searched" #@checked_searched> searched
+ <input type="checkbox" name="tip" #@checked_tip> available fields
+ <input type="checkbox" name="sql" #@checked_sql> sql statement
+ <br />
+ checks:
+ <input type="radio" name="checks" value="check_default" #@checked_default> default
+ <input type="radio" name="checks" value="check_selected" #@checked_selected> selected
+ <input type="radio" name="checks" value="check_all" #@checked_all> all
+ <input type="radio" name="checks" value="check_none" #@checked_none> none
+ </font>
</td></tr>
</table>
- </form>
+ </form>
WOK
end
end
@@ -601,23 +592,34 @@ module SiSU_CGI_sql
@stub='sisu'
'SiSU_sisu'
end
- checked_url,checked_searched,checked_tip,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,selected_db='','','','','','','','',''
+ checked_url,checked_stats,checked_searched,checked_tip,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,selected_db='','','','','','','','',''
if cgi['view']=~/text/; checked_index,checked_text='','checked'
else checked_index,checked_text='checked',''
end
+ checked_echo='checked' if cgi['echo'] =~/\S/
+ checked_stats='checked' if cgi['stats'] =~/\S/
checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1
checked_searched='checked' if cgi['searched'] =~/\S/
checked_tip='checked' if cgi['tip'] =~/\S/
checked_case='checked' if cgi['casesense'] =~/\S/
- checked_echo='checked' if cgi['echo'] =~/\S/
checked_sql='checked' if cgi['sql'] =~/\S/
if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1
- checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='checked'
+ checked_all='checked'
+ checked_echo=checked_stats=checked_url=checked_searched=checked_tip=checked_sql='checked'
checked_none=''
- elsif cgi['checks'] =~/check_none/ #or cgi['a'].to_i==0
+ elsif cgi['checks'] =~/check_none/
checked_none='checked'
- checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql=''
- else checked_ignore='checked'
+ checked_all=checked_url=checked_stats=checked_searched=checked_tip=checked_echo=checked_sql=''
+ elsif cgi['checks'] =~/check_selected/
+ checked_selected='checked'
+ elsif cgi['checks'] =~/check_default/
+ checked_default='checked'
+ checked_echo=checked_stats=checked_url='checked'
+ checked_searched=checked_tip=checked_case=checked_sql=''
+ else
+ checked_selected='checked'
+ checked_echo=checked_stats=checked_url='checked'
+ checked_searched=checked_tip=checked_case=checked_sql=''
end
WOK_SQL
end
@@ -654,7 +656,7 @@ module SiSU_CGI_sql
fns='&fns=' + CGI.escape(@search_for.filename) if @search_for.filename=~/\S/
@@canned_search_url=if checked_all =~/checked/
"#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1"
- else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&u=1&e=1"
+ else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}"
end
if checked_case=~/\S/
@search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1
@@ -663,7 +665,7 @@ module SiSU_CGI_sql
@search[:text][1]=%{documents.clean~*'#{@search_for.text1}'} #s1
@search[:endnotes][1]=%{endnotes.clean~*'#{@search_for.text1}'} #s1
end
- canned_note='previous search url:'
+ canned_note='search url:'
else
@@canned_search_url="#@base?s1=United+Nations&db=documents&view=index"
canned_note='search url example:'
@@ -684,7 +686,7 @@ module SiSU_CGI_sql
end
green=%{<font size="2" color="#004000">}
canned_search_url_txt=CGI.escapeHTML(@@canned_search_url)
- the_can=%{<font size="2" color="#666666">#{canned_note}<br /> <a href="#{@@canned_search_url}">#{canned_search_url_txt}</a></font><br />}
+ the_can=%{<font size="2" color="#666666">#{canned_note} <a href="#{@@canned_search_url}">#{canned_search_url_txt}</a></font><br />}
p_text=p_keywords=p_title=p_author=p_subject=p_description=p_publisher=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_subject=p_filename=''
p_text=%{text: #{green}#{@search_for.text1}</font><br />} if @search_for.text1 =~/\S+/
p_keywords=%{keywords: #{green}#{@search_for.keywords}</font><br />} if @search_for.keywords =~/\S+/
@@ -708,15 +710,14 @@ module SiSU_CGI_sql
p_filename=%{filename: #{green}#{@search_for.filename}</font><br />} if @search_for.filename =~/\S+/
search_note=<<-WOK
<font size="2" color="#666666">
- <br /><b>previous selection</b>:<br />
- database: #{green}#@db</font>; selected view: #{green}#{cgi['view']}</font><br />
- search string: "#{green}#{analyze_format}</font>"<br />
+ <b>database:</b> #{green}#@db</font>; <b>selected view:</b> #{green}#{cgi['view']}</font>
+ <b>search string:</b> "#{green}#{analyze_format}</font>"<br />
#{p_text} #{p_keywords} #{p_title} #{p_author} #{p_subject} #{p_description} #{p_publisher} #{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,checked_index,checked_text,checked_tip,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_ignore,search_note,the_can).submission_form #% form
+ @header=Form.new(@base,search_field,selected_db,checked_index,checked_text,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)
@@ -763,7 +764,7 @@ module SiSU_CGI_sql
end
#metadata_found_body
if c['tid'].to_i != oldtid.to_i
- title=%{<span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html">#{c['title']}</a></span> by #{c['creator']} <a href="#@hosturl_files/#@stub/#{location}/portrait#{lang}.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape#{lang}.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="12" height="12" src="#@image_src/bullet_red.png" alt="manifest"><font size="2">&nbsp;?</font></a><br />} if file_suffix=~/s/ #hmm watch file_suffix
+ title=%{<span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html">#{c['title']}</a></span> by #{c['creator']} <a href="#@hosturl_files/#@stub/#{location}/portrait#{lang}.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape#{lang}.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="12" height="12" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix
if @text_search_flag; title='<br /><hr>'+title
else title='<br />'+title
end
@@ -796,7 +797,7 @@ module SiSU_CGI_sql
end
matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/)
matched=if c['body'] =~/<a href="https?:\/\//mi; c['body']
- else (c['body'].gsub(/(#@search_regx)/,%{<span style="background-color: #@color_match">\\1</span>}))
+ else (c['body'].gsub(/(#@search_regx)/i,%{<span style="background-color: #@color_match">\\1</span>}))
end
matched
else c['body']
@@ -830,7 +831,10 @@ module SiSU_CGI_sql
else output=title
end
@counters_txt=if @counter_txt_doc > 0
- %{<font size="2" color="#666666">Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.</font><br />}
+ if checked_stats =~/\S/
+ %{<hr /><font size="2" color="#666666">Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.</font><br />}
+ else ''
+ end
else ''
end
@body_main << output #+ details
@@ -849,7 +853,7 @@ module SiSU_CGI_sql
#metadata_found_endnotes
if @text_search_flag
if e['metadata_tid'].to_i != oldtid.to_i
- title=%{<br /><hr><span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html">#{e['title']}</a></span> by #{e['creator']} <a href="#@hosturl_files/#@stub/#{location}/portrait.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="12" height="12" src="#@image_src/bullet_red.png" alt="manifest"><font size="2">&nbsp;?</font></a><br />} if file_suffix=~/s/
+ title=%{<br /><hr><span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html">#{e['title']}</a></span> by #{e['creator']} <a href="#@hosturl_files/#@stub/#{location}/portrait.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="12" height="12" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/
@counter_endn_doc+=1
oldtid=e['metadata_tid'].to_i
else title = ''
@@ -858,7 +862,7 @@ module SiSU_CGI_sql
@counter_endn_ocn+=1
matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/)
matched=if e['body'] =~/<a href="https?:\/\//mi; e['body']
- else e['body'].gsub(/(#@search_regx)/,%{<span style="background-color: #@color_match">\\1</span>})
+ else e['body'].gsub(/(#@search_regx)/i,%{<span style="background-color: #@color_match">\\1</span>})
#e['body']
end
matched
@@ -870,7 +874,10 @@ module SiSU_CGI_sql
output=%{#{title}<a href="#@hosturl_files/#@stub/#{location}/endnotes.html#_#{e['nr']}">#{e['nr']}</a> [&sect; <a href="#@hosturl_files/#@stub/#{location}/doc.html##{e['ocn']}">#{e['ocn']}</a>], }
end
@counters_endn=if @counter_endn_doc > 0
- %{<font size="2" color="#666666">Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.</font><br />}
+ if checked_stats =~/\S/
+ %{<font size="2" color="#666666">Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.</font><br />}
+ else ''
+ end
end
@endnotes << output #+ details
else @endnotes=[] #does not take out yet
@@ -896,32 +903,3 @@ module SiSU_CGI_sql
end
end
__END__
-#@counter_txt_ocn
-#@counter_endn_ocn
-
-
- if cgi['checks'] =~/check_all/ or cgi['check_all'] =~/\S/ or cgi['a'].to_i==1
- checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql='checked'
- checked_none=''
- #elsif cgi['checks'] =~/check_fixed/ or cgi['check_fixed'] =~/\S/
- # #checked_ignore='checked'
- # checked_fixed='checked'
- # checked_url='checked'
- # checked_searched='checked'
- # checked_echo='checked'
- # #checked_tip='checked'
- # #checked_sql='checked'
- # checked_tip=checked_sql=checked_none=''
- #elsif cgi['checks'] =~/check_ignore/ or cgi['check_ignore'] =~/\S/
- # checked_ignore='checked'
- # checked_url='checked' if cgi['url'] =~/\S/ or cgi['u'].to_i==1
- # checked_searched='checked' if cgi['searched'] =~/\S/
- # checked_tip='checked' if cgi['tip'] =~/\S/
- # checked_echo='checked' if cgi['echo'] =~/\S/
- # checked_sql='checked' if cgi['sql'] =~/\S/
- # checked_none=''
- elsif cgi['checks'] =~/check_none/ or cgi['a'].to_i==0
- checked_none='checked'
- checked_all=checked_url=checked_searched=checked_tip=checked_echo=checked_sql=''
- else checked_ignore='checked'
- end
diff --git a/lib/sisu/v0/cgi_sqlite.rb b/lib/sisu/v0/cgi_sqlite.rb
index 4565ebe2..56b1e588 100644
--- a/lib/sisu/v0/cgi_sqlite.rb
+++ b/lib/sisu/v0/cgi_sqlite.rb
@@ -92,7 +92,7 @@ module SiSU_CGI_sqlite
f3 << " end\n"
if FileTest.writable?('.')
output=File.open('sisu_sqlite.cgi','w')
- output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons2 << buttons3 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << f3 << dbi_connect << @common.main2
+ output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << f3 << dbi_connect << @common.main2
a=%{ generated sisu_sqlite.cgi,
BASED ON ALREADY CREATED sisu_sqlite.db OUTPUT, (-d)
}
diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb
index 66333528..694b2e83 100644
--- a/lib/sisu/v0/defaults.rb
+++ b/lib/sisu/v0/defaults.rb
@@ -377,7 +377,7 @@ module SiSU_Viz
'sisu.png'
end
def icon_manifest
- 'bullet_red.png'
+ 'b_info.png'
end
def icon_doc
'b_doc.png'
@@ -911,7 +911,7 @@ module SiSU_Viz
end
def nav_txt_manifest
%{ <font face="#{font_fonts}" size="2">
- #{png_manifest}&nbsp;&nbsp;?&nbsp;
+ #{png_manifest}&nbsp;
</font> }
end
def nav_txt_concordance
@@ -1528,7 +1528,6 @@ outputs include: plaintext, html, XHTML, XML, ODF (OpenDocument), LaTeX, PDF, SQ
<br />
<input type="submit" name="ignore" value="search" />
<input type="hidden" name="db" value="SiSU_sisu" />
-<input type="hidden" name="a" value="1" />
<input type="radio" name="view" value="index" checked="checked" /> idx
<input type="radio" name="view" value="text" /> txt
</form>
diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb
index 9c10c27e..768a52cf 100644
--- a/lib/sisu/v0/help.rb
+++ b/lib/sisu/v0/help.rb
@@ -1053,7 +1053,7 @@ WOK
latex to pdf: #{program_found?(@env.program.pdflatex)}
postgresql: #{program_found?(@env.program.postgresql)}
sqlite: #{program_found?(@env.program.sqlite)}
- (these can be turned off if unavailable in sisurc.yaml under program_set:)
+ (these can be turned off if unavailable in sisurc.yml under program_set:)
#{@cX.green}processing shortcut defaults set to:#{@cX.off}
color defaut set (on==true) #{@cX.blue}#{cf_defaults.color}#{@cX.off}
sisu -0 #{@cX.blue}#{cf_defaults.cf_0}#{@cX.off} [default]
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index c2d694f2..ddd84aaa 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -881,7 +881,6 @@ module SiSU_Env
<input type="text" name="s1" size="24" maxlength="255" />
<br />
<input type="hidden" name="db" value="#{db}" />
-<input type="hidden" name="a" value="1" />
<input type="hidden" name="ltd" value="1000" />
<input type="hidden" name="off" value="0" />
<input type="radio" name="view" value="index" checked="checked" /> idx
@@ -917,7 +916,6 @@ module SiSU_Env
<input type="text" name="s1" size="24" maxlength="255" />
<br />
<input type="hidden" name="db" value="#{db}" />
-<input type="hidden" name="a" value="1" />
<input type="hidden" name="ltd" value="1000" />
<input type="hidden" name="off" value="0" />
<input type="radio" name="view" value="index" checked="checked" /> idx
@@ -995,7 +993,6 @@ module SiSU_Env
<input type="text" name="s1" size="24" maxlength="255" />
<br />
<input type="hidden" name="db" value="#{db}" />
-<input type="hidden" name="a" value="1" />
<input type="hidden" name="fns" value="#@fnb" />
<input type="radio" name="view" value="index" /> idx
<input type="radio" name="view" value="text" checked="checked" /> txt
@@ -1011,7 +1008,6 @@ module SiSU_Env
<input type="text" name="s1" size="24" maxlength="255" />
<br />
<input type="hidden" name="db" value="#{db}" />
-<input type="hidden" name="a" value="1" />
<input type="radio" name="view" value="index" checked="checked" /> idx
<input type="radio" name="view" value="text" /> txt
<input type="submit" />
diff --git a/lib/sisu/v0/xml_scaffold.rb b/lib/sisu/v0/xml_scaffold.rb
index 93987840..21ce1231 100644
--- a/lib/sisu/v0/xml_scaffold.rb
+++ b/lib/sisu/v0/xml_scaffold.rb
@@ -68,7 +68,7 @@ module SiSU_XML_scaffold
def read
begin
@md=SiSU_Param::Parameters.new(@opt).get
- @dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
+ @dal_array=SiSU_DAL::Source.new(@opt).get
SiSU_XML_scaffold::Source::Scroll.new(@dal_array,@md).songsheet
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure