aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/out_cgi_search_sqlite.org479
-rw-r--r--org/out_xmls.org15
2 files changed, 458 insertions, 36 deletions
diff --git a/org/out_cgi_search_sqlite.org b/org/out_cgi_search_sqlite.org
index d3f965d..be963cb 100644
--- a/org/out_cgi_search_sqlite.org
+++ b/org/out_cgi_search_sqlite.org
@@ -393,6 +393,8 @@ auto text_fields() {
if (auto m = got.search_text_area.matchFirst(rgx.fn)) {
got.fn = m["matched"];
got.canned_query ~= "&fn=" ~ m["matched"];
+ } else if ("fn" in cgi.post) {
+ got.search_text_area ~= "\nfn: " ~ cgi.post["fn"] ~ "\n";
}
if (auto m = got.search_text_area.matchFirst(rgx.keywords)) {
got.keywords = m["matched"];
@@ -716,13 +718,13 @@ string previous_next () {
<!DOCTYPE html>
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
≅ SiSU spine search form
</title>
- <meta name="sourcefile" content="SiSU.sst" />
- <link rel="generator" href="sisudoc.org" />
- <link rel="shortcut icon" href="http://%%s/image_sys/spine.ico" />
+ <meta name="sourcefile" content="SiSU.sst">
+ <link rel="generator" href="sisudoc.org">
+ <link rel="shortcut icon" href="http://%%s/image_sys/spine.ico">
<style media = "all">
*{
padding : 0px;
@@ -768,6 +770,417 @@ string previous_next () {
color : #003399;
text-decoration : underline;
}
+ p.norm { }
+ p.i1 { padding-left : 1em; }
+ p.i2 { padding-left : 2em; }
+ p.i3 { padding-left : 3em; }
+ p.i4 { padding-left : 4em; }
+ p.i5 { padding-left : 5em; }
+ p.i6 { padding-left : 6em; }
+ p.i7 { padding-left : 7em; }
+ p.i8 { padding-left : 8em; }
+ p.i9 { padding-left : 9em; }
+ /* hanging indent */
+ p[indent="h0i0"] {
+ padding-left : 0em;
+ text-indent : 0em;
+ }
+ p[indent="h0i1"] {
+ padding-left : 1em;
+ text-indent : -1em;
+ }
+ p[indent="h0i2"] {
+ padding-left : 2em;
+ text-indent : -2em;
+ }
+ p[indent="h0i3"] {
+ padding-left : 3em;
+ text-indent : -3em;
+ }
+ p[indent="h0i4"] {
+ padding-left : 4em;
+ text-indent : -4em;
+ }
+ p[indent="h0i5"] {
+ padding-left : 5em;
+ text-indent : -5em;
+ }
+ p[indent="h0i6"] {
+ padding-left : 6em;
+ text-indent : -6em;
+ }
+ p[indent="h0i7"] {
+ padding-left : 7em;
+ text-indent : -7em;
+ }
+ p[indent="h0i8"] {
+ padding-left : 8em;
+ text-indent : -8em;
+ }
+ p[indent="h0i9"] {
+ padding-left : 9em;
+ text-indent : -9em;
+ }
+ p[indent="h1i0"] {
+ padding-left : 0em;
+ text-indent : 1em;
+ }
+ p[indent="h1i1"] {
+ padding-left : 1em;
+ text-indent : 0em;
+ }
+ p[indent="h1i2"] {
+ padding-left : 2em;
+ text-indent : -1em;
+ }
+ p[indent="h1i3"] {
+ padding-left : 3em;
+ text-indent : -2em;
+ }
+ p[indent="h1i4"] {
+ padding-left : 4em;
+ text-indent : -3em;
+ }
+ p[indent="h1i5"] {
+ padding-left : 5em;
+ text-indent : -4em;
+ }
+ p[indent="h1i6"] {
+ padding-left : 6em;
+ text-indent : -5em;
+ }
+ p[indent="h1i7"] {
+ padding-left : 7em;
+ text-indent : -6em;
+ }
+ p[indent="h1i8"] {
+ padding-left : 8em;
+ text-indent : -7em;
+ }
+ p[indent="h1i9"] {
+ padding-left : 9em;
+ text-indent : -8em;
+ }
+ p[indent="h2i0"] {
+ padding-left : 0em;
+ text-indent : 2em;
+ }
+ p[indent="h2i1"] {
+ padding-left : 1em;
+ text-indent : 1em;
+ }
+ p[indent="h2i2"] {
+ padding-left : 2em;
+ text-indent : 0em;
+ }
+ p[indent="h2i3"] {
+ padding-left : 3em;
+ text-indent : -1em;
+ }
+ p[indent="h2i4"] {
+ padding-left : 4em;
+ text-indent : -2em;
+ }
+ p[indent="h2i5"] {
+ padding-left : 5em;
+ text-indent : -3em;
+ }
+ p[indent="h2i6"] {
+ padding-left : 6em;
+ text-indent : -4em;
+ }
+ p[indent="h2i7"] {
+ padding-left : 7em;
+ text-indent : -5em;
+ }
+ p[indent="h2i8"] {
+ padding-left : 8em;
+ text-indent : -6em;
+ }
+ p[indent="h2i9"] {
+ padding-left : 9em;
+ text-indent : -7em;
+ }
+ p[indent="h3i0"] {
+ padding-left : 0em;
+ text-indent : 3em;
+ }
+ p[indent="h3i1"] {
+ padding-left : 1em;
+ text-indent : 2em;
+ }
+ p[indent="h3i2"] {
+ padding-left : 2em;
+ text-indent : 1em;
+ }
+ p[indent="h3i3"] {
+ padding-left : 3em;
+ text-indent : 0em;
+ }
+ p[indent="h3i4"] {
+ padding-left : 4em;
+ text-indent : -1em;
+ }
+ p[indent="h3i5"] {
+ padding-left : 5em;
+ text-indent : -2em;
+ }
+ p[indent="h3i6"] {
+ padding-left : 6em;
+ text-indent : -3em;
+ }
+ p[indent="h3i7"] {
+ padding-left : 7em;
+ text-indent : -4em;
+ }
+ p[indent="h3i8"] {
+ padding-left : 8em;
+ text-indent : -5em;
+ }
+ p[indent="h3i9"] {
+ padding-left : 9em;
+ text-indent : -6em;
+ }
+ p[indent="h4i0"] {
+ padding-left : 0em;
+ text-indent : 4em;
+ }
+ p[indent="h4i1"] {
+ padding-left : 1em;
+ text-indent : 3em;
+ }
+ p[indent="h4i2"] {
+ padding-left : 2em;
+ text-indent : 2em;
+ }
+ p[indent="h4i3"] {
+ padding-left : 3em;
+ text-indent : 1em;
+ }
+ p[indent="h4i4"] {
+ padding-left : 4em;
+ text-indent : 0em;
+ }
+ p[indent="h4i5"] {
+ padding-left : 5em;
+ text-indent : -1em;
+ }
+ p[indent="h4i6"] {
+ padding-left : 6em;
+ text-indent : -2em;
+ }
+ p[indent="h4i7"] {
+ padding-left : 7em;
+ text-indent : -3em;
+ }
+ p[indent="h4i8"] {
+ padding-left : 8em;
+ text-indent : -4em;
+ }
+ p[indent="h4i9"] {
+ padding-left : 9em;
+ text-indent : -5em;
+ }
+ p[indent="h5i0"] {
+ padding-left : 0em;
+ text-indent : 5em;
+ }
+ p[indent="h5i1"] {
+ padding-left : 1em;
+ text-indent : 4em;
+ }
+ p[indent="h5i2"] {
+ padding-left : 2em;
+ text-indent : 3em;
+ }
+ p[indent="h5i3"] {
+ padding-left : 3em;
+ text-indent : 2em;
+ }
+ p[indent="h5i4"] {
+ padding-left : 4em;
+ text-indent : 1em;
+ }
+ p[indent="h5i5"] {
+ padding-left : 5em;
+ text-indent : 0em;
+ }
+ p[indent="h5i6"] {
+ padding-left : 6em;
+ text-indent : -1em;
+ }
+ p[indent="h5i7"] {
+ padding-left : 7em;
+ text-indent : -2em;
+ }
+ p[indent="h5i8"] {
+ padding-left : 8em;
+ text-indent : -3em;
+ }
+ p[indent="h5i9"] {
+ padding-left : 9em;
+ text-indent : -4em;
+ }
+ p[indent="h6i0"] {
+ padding-left : 0em;
+ text-indent : 6em;
+ }
+ p[indent="h6i1"] {
+ padding-left : 1em;
+ text-indent : 5em;
+ }
+ p[indent="h6i2"] {
+ padding-left : 2em;
+ text-indent : 4em;
+ }
+ p[indent="h6i3"] {
+ padding-left : 3em;
+ text-indent : 3em;
+ }
+ p[indent="h6i4"] {
+ padding-left : 4em;
+ text-indent : 2em;
+ }
+ p[indent="h6i5"] {
+ padding-left : 5em;
+ text-indent : 1em;
+ }
+ p[indent="h6i6"] {
+ padding-left : 6em;
+ text-indent : 0em;
+ }
+ p[indent="h6i7"] {
+ padding-left : 7em;
+ text-indent : -1em;
+ }
+ p[indent="h6i8"] {
+ padding-left : 8em;
+ text-indent : -2em;
+ }
+ p[indent="h6i9"] {
+ padding-left : 9em;
+ text-indent : -3em;
+ }
+ p[indent="h7i0"] {
+ padding-left : 0em;
+ text-indent : 7em;
+ }
+ p[indent="h7i1"] {
+ padding-left : 1em;
+ text-indent : 6em;
+ }
+ p[indent="h7i2"] {
+ padding-left : 2em;
+ text-indent : 5em;
+ }
+ p[indent="h7i3"] {
+ padding-left : 3em;
+ text-indent : 4em;
+ }
+ p[indent="h7i4"] {
+ padding-left : 4em;
+ text-indent : 3em;
+ }
+ p[indent="h7i5"] {
+ padding-left : 5em;
+ text-indent : 2em;
+ }
+ p[indent="h7i6"] {
+ padding-left : 6em;
+ text-indent : 1em;
+ }
+ p[indent="h7i7"] {
+ padding-left : 7em;
+ text-indent : 0em;
+ }
+ p[indent="h7i8"] {
+ padding-left : 8em;
+ text-indent : -1em;
+ }
+ p[indent="h7i9"] {
+ padding-left : 9em;
+ text-indent : -2em;
+ }
+ p[indent="h8i0"] {
+ padding-left : 0em;
+ text-indent : 8em;
+ }
+ p[indent="h8i1"] {
+ padding-left : 1em;
+ text-indent : 7em;
+ }
+ p[indent="h8i2"] {
+ padding-left : 2em;
+ text-indent : 6em;
+ }
+ p[indent="h8i3"] {
+ padding-left : 3em;
+ text-indent : 5em;
+ }
+ p[indent="h8i4"] {
+ padding-left : 4em;
+ text-indent : 4em;
+ }
+ p[indent="h8i5"] {
+ padding-left : 5em;
+ text-indent : 3em;
+ }
+ p[indent="h8i6"] {
+ padding-left : 6em;
+ text-indent : 2em;
+ }
+ p[indent="h8i7"] {
+ padding-left : 7em;
+ text-indent : 1em;
+ }
+ p[indent="h8i8"] {
+ padding-left : 8em;
+ text-indent : 0em;
+ }
+ p[indent="h8i9"] {
+ padding-left : 9em;
+ text-indent : -1em;
+ }
+ p[indent="h9i0"] {
+ padding-left : 0em;
+ text-indent : 9em;
+ }
+ p[indent="h9i1"] {
+ padding-left : 1em;
+ text-indent : 8em;
+ }
+ p[indent="h9i2"] {
+ padding-left : 2em;
+ text-indent : 7em;
+ }
+ p[indent="h9i3"] {
+ padding-left : 3em;
+ text-indent : 6em;
+ }
+ p[indent="h9i4"] {
+ padding-left : 4em;
+ text-indent : 5em;
+ }
+ p[indent="h9i5"] {
+ padding-left : 5em;
+ text-indent : 4em;
+ }
+ p[indent="h9i6"] {
+ padding-left : 6em;
+ text-indent : 3em;
+ }
+ p[indent="h9i7"] {
+ padding-left : 7em;
+ text-indent : 2em;
+ }
+ p[indent="h9i8"] {
+ padding-left : 8em;
+ text-indent : 1em;
+ }
+ p[indent="h9i9"] {
+ padding-left : 9em;
+ text-indent : 0em;
+ }
hr {
width : 100%%%%;
margin-left : 0%%%%;
@@ -794,10 +1207,10 @@ string previous_next () {
<tr><td width="20%%%%">
<table summary="home button / home information" border="0" cellpadding="2" cellspacing="0">
<tr><td align="left">
- <br /><a href="http://sisudoc.org/" target="_top">
+ <br><a href="http://sisudoc.org/" target="_top">
<b>SiSU</b>
</a>
- <br /><a href="http://git.sisudoc.org/" target="_top">
+ <br><a href="http://git.sisudoc.org/" target="_top">
git
</a>
</td></tr>
@@ -905,7 +1318,7 @@ string previous_next () {
tip = format(q"┃
<font size="2" color="#666666">
<b>database:</b> <font size="2" color="#004000">%%s</font>; <b>selected view:</b> <font size="2" color="#004000">index</font>
-<b>search string:</b> %%s %%s %%s %%s %%s %%s<br />
+<b>search string:</b> %%s %%s %%s %%s %%s %%s<br>
%%s %%s %%s %%s %%s %%s
</font>
┃",
@@ -916,10 +1329,10 @@ string previous_next () {
(tf.date.empty ? "" : "\"date <font size=\"2\" color=\"#004000\">" ~ tf.date ~ "</font>; "),
(tf.uid.empty ? "" : "\"uid: <font size=\"2\" color=\"#004000\">" ~ tf.uid ~ "</font>; "),
(tf.fn.empty ? "" : "\"fn: <font size=\"2\" color=\"#004000\">" ~ tf.fn ~ "</font>; "),
- (tf.text.empty ? "" : "text: <font size=\"2\" color=\"#004000\">" ~ tf.text ~ "</font><br />"),
- (tf.title.empty ? "" : "title: <font size=\"2\" color=\"#004000\">" ~ tf.title ~ "</font><br />"),
- (tf.author.empty ? "" : "author: <font size=\"2\" color=\"#004000\">" ~ tf.author ~ "</font><br />"),
- (tf.date.empty ? "" : "date: <font size=\"2\" color=\"#004000\">" ~ tf.date ~ "</font><br />"),
+ (tf.text.empty ? "" : "text: <font size=\"2\" color=\"#004000\">" ~ tf.text ~ "</font><br>"),
+ (tf.title.empty ? "" : "title: <font size=\"2\" color=\"#004000\">" ~ tf.title ~ "</font><br>"),
+ (tf.author.empty ? "" : "author: <font size=\"2\" color=\"#004000\">" ~ tf.author ~ "</font><br>"),
+ (tf.date.empty ? "" : "date: <font size=\"2\" color=\"#004000\">" ~ tf.date ~ "</font><br>"),
(tf.uid.empty ? "" : "\"uid: <font size=\"2\" color=\"#004000\">" ~ tf.uid ~ "</font>; "),
(tf.fn.empty ? "" : "\"fn: <font size=\"2\" color=\"#004000\">" ~ tf.fn ~ "</font>; "),
);
@@ -946,27 +1359,20 @@ string previous_next () {
</td></tr></table>
<td valign=\"top\"><tr><td>
<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">
- %%s
- <option value="%%s">spine</option>
- </select>
- <input type="submit" value="SiSU search" />
+ <input type="hidden" name="db" value="%%s">
+ <input type="submit" value="SiSU search">
<input type="radio" name="rt" id="results_type_index" value="idx" %%s> index
<input type="radio" name="rt" id="results_type_text" value="txt" %%s> text / grep;
match limit:
<input type="radio" name="sml" id="sql_match_limit_1000" value="1000" %%s> 1,000
<input type="radio" name="sml" id="sql_match_limit_2500" value="2500" %%s> 2,500
- <br />
+ <br>
<input type="checkbox" name="ec" %%s> echo query
- <input type="checkbox" name="sts" %%s> result stats
<input type="checkbox" name="url" %%s> search url
<input type="checkbox" name="se" %%s> searched
- <input type="checkbox" name="tip" %%s> available fields
<input type="checkbox" name="sql" %%s> sql statement
<input type="hidden" name="smo" value="0">
- <br />
+ <br>
</font>
</td></tr>
</table>
@@ -983,16 +1389,13 @@ string previous_next () {
search_note,
the_can(post_value("sf", "field")),
cv.db_selected,
- cv.db_selected,
post_value("rt", "box", "idx"),
post_value("rt", "box", "txt"),
post_value("sml", "box", "1000"),
post_value("sml", "box", "2500"),
post_value("ec"),
- post_value("sts"),
post_value("url"),
post_value("se"),
- post_value("tip"),
post_value("sql"),
);
#+END_SRC
@@ -1169,12 +1572,12 @@ LIMIT %%s OFFSET %%s
#+END_SRC
***** html write selected
-****** ocn index
+****** head
#+NAME: cgi_sqlite_select_statement_0
#+BEGIN_SRC d
(cv.checked_sql)
- ? cgi.write(previous_next ~ "<hr><font size=\"2\" color=\"#666666\">" ~ sql_select.the_body.split("\n ").join(" ").split("\n").join("<br>") ~ "</font>\n")
+ ? cgi.write(previous_next ~ "<hr><font size=\"2\" color=\"#666666\">" ~ sql_select.the_body.strip.split("\n ").join(" ").split("\n").join("<br>") ~ "</font>\n")
: "";
cgi.write(previous_next);
auto select_query_results = db.execute(sql_select.the_body).cached;
@@ -1199,9 +1602,15 @@ LIMIT %%s OFFSET %%s
~ row["language_document_char"].as!string
~ "] "
~ row["creator_author_last_first"].as!string
- ~ ":<br>\n"
+ ~ "<br>\n"
);
}
+#+END_SRC
+
+****** text found
+
+#+NAME: cgi_sqlite_select_statement_0
+#+BEGIN_SRC d
if (cv.results_type == "txt") {
cgi.write(
"<hr><a href=\""
@@ -1215,6 +1624,12 @@ LIMIT %%s OFFSET %%s
~ "<br>"
~ row["body"].as!string
);
+#+END_SRC
+
+****** ocn index
+
+#+NAME: cgi_sqlite_select_statement_0
+#+BEGIN_SRC d
} else {
cgi.write(
"<a href=\""
@@ -1227,6 +1642,12 @@ LIMIT %%s OFFSET %%s
~ "</a>, "
);
}
+#+END_SRC
+
+****** tail
+
+#+NAME: cgi_sqlite_select_statement_0
+#+BEGIN_SRC d
}
cgi.write( previous_next);
} else { // offset_not_beyond_limit = false;
@@ -1237,8 +1658,6 @@ LIMIT %%s OFFSET %%s
}
#+END_SRC
-****** text found
-
*** db close
#+NAME: cgi_sqlite_db_close
diff --git a/org/out_xmls.org b/org/out_xmls.org
index db3f0e5..da5b640 100644
--- a/org/out_xmls.org
+++ b/org/out_xmls.org
@@ -264,18 +264,21 @@ import
<a name="search"></a>
<form action="%s" target="_top" method="POST" accept-charset="UTF-8" id="search">
<font size="2">
-<input type="text" name="sf" size="24" maxlength="255" />
-<input type="hidden" name="db" value="%s" />
-<input type="hidden" name="sml" value="1000" />
-<input type="hidden" name="ec" value="on" />
-<input type="hidden" name="url" value="on" />
+<input type="text" name="sf" size="24" maxlength="255">%s
+<input type="hidden" name="sml" value="1000">
+<input type="hidden" name="ec" value="on">
+<input type="hidden" name="url" value="on">
<button type="submit" form="search" name="fn" value="%s">doc</button>
<button type="submit" form="search">db</button>
</font></form>
<!-- SiSU Spine Search -->
</div>┃",
doc_matters.conf_make_meta.conf.w_srv_cgi_action,
- doc_matters.conf_make_meta.conf.w_srv_db_sqlite,
+ (doc_matters.conf_make_meta.conf.w_srv_db_sqlite.empty)
+ ? ""
+ : "\n <input type=\"hidden\" name=\"db\" value=\""
+ ~ doc_matters.conf_make_meta.conf.w_srv_db_sqlite
+ ~ "\">",
doc_matters.src.filename_base,
);
} else {