From 5331c088fb00a71bc397a0bd7eac78bae62f4ed5 Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph@amissah.com>
Date: Thu, 6 Jun 2013 21:15:34 -0400
Subject: v4 v5: db, population of database (--update), import of master files
 (.ssm), fix

* (Note: for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns,
  affects construction of unique identifier)
---
 lib/sisu/v4/db_import.rb | 4 ++--
 lib/sisu/v4/db_remove.rb | 8 ++++----
 lib/sisu/v5/db_import.rb | 4 ++--
 lib/sisu/v5/db_remove.rb | 8 ++++----
 4 files changed, 12 insertions(+), 12 deletions(-)

(limited to 'lib')

diff --git a/lib/sisu/v4/db_import.rb b/lib/sisu/v4/db_import.rb
index 199d4efa..a4251a98 100644
--- a/lib/sisu/v4/db_import.rb
+++ b/lib/sisu/v4/db_import.rb
@@ -129,9 +129,9 @@ module SiSU_DbImport
       select_first_match=%{
         SELECT metadata_and_text.tid
         FROM metadata_and_text
-        WHERE metadata_and_text.src_filename = '#{@opt.fns}'
+        WHERE metadata_and_text.src_filename = '#{@md.fns}'
         AND metadata_and_text.language_document_char = '#{@opt.lng}'
-      ;}
+      ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns
       file_exist=@sql_type=~/sqlite/ \
       ? @conn.get_first_value(select_first_match)
       : @conn.select_one(select_first_match)
diff --git a/lib/sisu/v4/db_remove.rb b/lib/sisu/v4/db_remove.rb
index 740977d0..c402f959 100644
--- a/lib/sisu/v4/db_remove.rb
+++ b/lib/sisu/v4/db_remove.rb
@@ -78,17 +78,17 @@ module SiSU_DbRemove
         remove_selected=%{
           SELECT tid
           FROM metadata_and_text
-          WHERE src_filename = '#{@opt.fns}'
+          WHERE src_filename = '#{@md.fns}'
           AND metadata_and_text.language_document_char = '#{@opt.lng}'
-        ;}
+        ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns
         @conn.get_first_value(remove_selected).to_i
       else
         remove_selected=%{
           SELECT metadata_and_text.tid
           FROM metadata_and_text
-          WHERE metadata_and_text.src_filename = '#{@opt.fns}'
+          WHERE metadata_and_text.src_filename = '#{@md.fns}'
           AND metadata_and_text.language_document_char = '#{@opt.lng}'
-        ;}
+        ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns
         x=@conn.select_one(remove_selected)
         x ? (x.join.to_i) : nil
       end
diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/v5/db_import.rb
index a1d332bb..293071ff 100644
--- a/lib/sisu/v5/db_import.rb
+++ b/lib/sisu/v5/db_import.rb
@@ -129,9 +129,9 @@ module SiSU_DbImport
       select_first_match=%{
         SELECT metadata_and_text.tid
         FROM metadata_and_text
-        WHERE metadata_and_text.src_filename = '#{@opt.fns}'
+        WHERE metadata_and_text.src_filename = '#{@md.fns}'
         AND metadata_and_text.language_document_char = '#{@opt.lng}'
-      ;}
+      ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns
       file_exist=@sql_type=~/sqlite/ \
       ? @conn.get_first_value(select_first_match)
       : @conn.select_one(select_first_match)
diff --git a/lib/sisu/v5/db_remove.rb b/lib/sisu/v5/db_remove.rb
index 1fb40e30..2e65d51a 100644
--- a/lib/sisu/v5/db_remove.rb
+++ b/lib/sisu/v5/db_remove.rb
@@ -78,17 +78,17 @@ module SiSU_DbRemove
         remove_selected=%{
           SELECT tid
           FROM metadata_and_text
-          WHERE src_filename = '#{@opt.fns}'
+          WHERE src_filename = '#{@md.fns}'
           AND metadata_and_text.language_document_char = '#{@opt.lng}'
-        ;}
+        ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns
         @conn.get_first_value(remove_selected).to_i
       else
         remove_selected=%{
           SELECT metadata_and_text.tid
           FROM metadata_and_text
-          WHERE metadata_and_text.src_filename = '#{@opt.fns}'
+          WHERE metadata_and_text.src_filename = '#{@md.fns}'
           AND metadata_and_text.language_document_char = '#{@opt.lng}'
-        ;}
+        ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns
         x=@conn.select_one(remove_selected)
         x ? (x.join.to_i) : nil
       end
-- 
cgit v1.2.3


From 152d9955789fedd51fd0411b8c174b454983be5a Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph@amissah.com>
Date: Thu, 6 Jun 2013 21:20:59 -0400
Subject: v4 v5: sysenv, requested load warning removed, less screen clutter

---
 lib/sisu/v4/sysenv.rb | 4 ++--
 lib/sisu/v5/sysenv.rb | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'lib')

diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index f95622b5..8884b0fb 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -254,8 +254,8 @@ module SiSU_Env
         require @prog
       else
         @mandatory \
-        ? (SiSU_Screen::Ansi.new(@cmd,"*WARN* module required: #{@prog}").warn)
-        : (SiSU_Screen::Ansi.new(@cmd,"*WARN* #{@prog} load requested").warn)
+        ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
+        : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
       end
       load_prog
     end
diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb
index 37492716..1a00baa7 100644
--- a/lib/sisu/v5/sysenv.rb
+++ b/lib/sisu/v5/sysenv.rb
@@ -254,8 +254,8 @@ module SiSU_Env
         require @prog
       else
         @mandatory \
-        ? (SiSU_Screen::Ansi.new(@cmd,"*WARN* module required: #{@prog}").warn)
-        : (SiSU_Screen::Ansi.new(@cmd,"*WARN* #{@prog} load requested").warn)
+        ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
+        : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
       end
       load_prog
     end
-- 
cgit v1.2.3


From f502a17211a01e7284b898f85f89fde6d99c44e3 Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph@amissah.com>
Date: Thu, 6 Jun 2013 21:26:36 -0400
Subject: v4 v5: cgi, cosmetic, drop use of images in sample form

---
 lib/sisu/v4/cgi_sql_common.rb | 49 ++++++++++++++++++++++++++++++-------------
 lib/sisu/v5/cgi_sql_common.rb | 49 ++++++++++++++++++++++++++++++-------------
 2 files changed, 68 insertions(+), 30 deletions(-)

(limited to 'lib')

diff --git a/lib/sisu/v4/cgi_sql_common.rb b/lib/sisu/v4/cgi_sql_common.rb
index 33cb2dc6..d15967aa 100644
--- a/lib/sisu/v4/cgi_sql_common.rb
+++ b/lib/sisu/v4/cgi_sql_common.rb
@@ -165,7 +165,19 @@ module SiSU_CGI_SQL
     </head>
     <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">
     <table summary="band" border="0" cellpadding="3" cellspacing="0">
-    <tr><td align="left" bgcolor="#ffffff"><a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" src="#{@image_src}/sisu.png" alt="SiSU --&gt;" /></a></td><td>
+    <tr><td width="20%">
+     <table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
+     <tr><td align="left" bgcolor="#ffffff">
+      <br /><a href="http://sisudoc.org/" target="_top">
+        <b>SiSU</b>
+      </a>
+      <br /><a href="http://git.sisudoc.org/" target="_top">
+        git
+      </a>
+     </td></tr>
+     </table>
+    </td>
+    <td>
       <label for="find"><b>#{@env.sample_search_form_title(@opt.dir_structure_by)}</b></label>
     </td></tr>
     </table>
@@ -541,26 +553,29 @@ module SiSU_CGI_SQL
 <table summary="SiSU summary" bgcolor="#ffffff" cellpadding="2" border="0">
   <!-- widget sisu -->
 <tr><td valign="top" width="10%">
-  <p class="tiny_left"><font color="#666666" size="2">
-    <a href="http://www.jus.uio.no/sisu" >
-      <img border="0" src="#{@image_src}/sisu.png" alt="SiSU" width="120" height="39" />
-    </a>
-  </font></p>
-</td><td valign="top" width="45%">
+ <table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
+ <tr><td align="left" bgcolor="#ffffff">
+  <br /><a href="http://sisudoc.org/" target="_top">
+    <b>SiSU</b>
+  </a>
+  <br /><a href="http://git.sisudoc.org/" target="_top">
+    git
+  </a>
+ </td></tr>
+ </table>
+</td>
+<td valign="top" width="45%">
 <!-- SiSU Rights -->
   <p class="tiny_left"><font color="#666666" size="2">
     Generated by
-    <a href="http://www.jus.uio.no/sisu" >
-      #{v[:project]}</a> #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
+      #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
     <br />
-    <a href="http://www.jus.uio.no/sisu" >
+    <a href="http://www.sisudoc.org" >
     <b>#{v[:project]}</b></a> <sup>&copy;</sup> Ralph Amissah
     1993, current 2013.
     All Rights Reserved.
     <br />
-    <a href="http://www.jus.uio.no/sisu" >
-      #{v[:project]}</a>
-    is software for document structuring, publishing and search,
+      #{v[:project]} is software for document structuring, publishing and search,
     <br />
     <a href="http://www.jus.uio.no/sisu" >
       www.jus.uio.no/sisu
@@ -569,6 +584,10 @@ module SiSU_CGI_SQL
     <a href="http://www.sisudoc.org" >
       www.sisudoc.org
     </a>
+    sources
+    <a href="http://git.sisudoc.org" >
+      git.sisudoc.org
+    </a>
   <br />
     <i>w3 since October 3 1993</i>
     <a href="mailto:ralph@amissah.com" >
@@ -589,7 +608,7 @@ module SiSU_CGI_SQL
     #{v[:project]} using:
     <br />Standard SiSU markup syntax,
     <br />Standard SiSU meta-markup syntax, and the
-    <br />Standard SiSU <u>object citation numbering</u> and system, (object/text positioning system)
+    <br />Standard SiSU <u>object citation numbering</u> and system, (object/text identifying/locating system)
   <br />
     <sup>&copy;</sup> Ralph Amissah 1997, current 2013.
     All Rights Reserved.
@@ -599,7 +618,7 @@ module SiSU_CGI_SQL
 <tr><td valign="top" width="10%">
   <p class="tiny_left"><font color="#666666" size="2">
     <a href="http://www.gnu.org/licenses/gpl.html">
-      <img border="0" src="#{@image_src}/gplv3_free_software.png" alt="GPLv3" width="127" height="51" />
+      .:
     </a>
   </font></p>
 </td><td valign="top" width="45%">
diff --git a/lib/sisu/v5/cgi_sql_common.rb b/lib/sisu/v5/cgi_sql_common.rb
index 9e872139..fddde88c 100644
--- a/lib/sisu/v5/cgi_sql_common.rb
+++ b/lib/sisu/v5/cgi_sql_common.rb
@@ -165,7 +165,19 @@ module SiSU_CGI_SQL
     </head>
     <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">
     <table summary="band" border="0" cellpadding="3" cellspacing="0">
-    <tr><td align="left" bgcolor="#ffffff"><a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" src="#{@image_src}/sisu.png" alt="SiSU --&gt;" /></a></td><td>
+    <tr><td width="20%">
+     <table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
+     <tr><td align="left" bgcolor="#ffffff">
+      <br /><a href="http://sisudoc.org/" target="_top">
+        <b>SiSU</b>
+      </a>
+      <br /><a href="http://git.sisudoc.org/" target="_top">
+        git
+      </a>
+     </td></tr>
+     </table>
+    </td>
+    <td>
       <label for="find"><b>#{@env.sample_search_form_title(@opt.dir_structure_by)}</b></label>
     </td></tr>
     </table>
@@ -541,26 +553,29 @@ module SiSU_CGI_SQL
 <table summary="SiSU summary" bgcolor="#ffffff" cellpadding="2" border="0">
   <!-- widget sisu -->
 <tr><td valign="top" width="10%">
-  <p class="tiny_left"><font color="#666666" size="2">
-    <a href="http://www.jus.uio.no/sisu" >
-      <img border="0" src="#{@image_src}/sisu.png" alt="SiSU" width="120" height="39" />
-    </a>
-  </font></p>
-</td><td valign="top" width="45%">
+ <table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
+ <tr><td align="left" bgcolor="#ffffff">
+  <br /><a href="http://sisudoc.org/" target="_top">
+    <b>SiSU</b>
+  </a>
+  <br /><a href="http://git.sisudoc.org/" target="_top">
+    git
+  </a>
+ </td></tr>
+ </table>
+</td>
+<td valign="top" width="45%">
 <!-- SiSU Rights -->
   <p class="tiny_left"><font color="#666666" size="2">
     Generated by
-    <a href="http://www.jus.uio.no/sisu" >
-      #{v[:project]}</a> #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
+      #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
     <br />
-    <a href="http://www.jus.uio.no/sisu" >
+    <a href="http://www.sisudoc.org" >
     <b>#{v[:project]}</b></a> <sup>&copy;</sup> Ralph Amissah
     1993, current 2013.
     All Rights Reserved.
     <br />
-    <a href="http://www.jus.uio.no/sisu" >
-      #{v[:project]}</a>
-    is software for document structuring, publishing and search,
+      #{v[:project]} is software for document structuring, publishing and search,
     <br />
     <a href="http://www.jus.uio.no/sisu" >
       www.jus.uio.no/sisu
@@ -569,6 +584,10 @@ module SiSU_CGI_SQL
     <a href="http://www.sisudoc.org" >
       www.sisudoc.org
     </a>
+    sources
+    <a href="http://git.sisudoc.org" >
+      git.sisudoc.org
+    </a>
   <br />
     <i>w3 since October 3 1993</i>
     <a href="mailto:ralph@amissah.com" >
@@ -589,7 +608,7 @@ module SiSU_CGI_SQL
     #{v[:project]} using:
     <br />Standard SiSU markup syntax,
     <br />Standard SiSU meta-markup syntax, and the
-    <br />Standard SiSU <u>object citation numbering</u> and system, (object/text positioning system)
+    <br />Standard SiSU <u>object citation numbering</u> and system, (object/text identifying/locating system)
   <br />
     <sup>&copy;</sup> Ralph Amissah 1997, current 2013.
     All Rights Reserved.
@@ -599,7 +618,7 @@ module SiSU_CGI_SQL
 <tr><td valign="top" width="10%">
   <p class="tiny_left"><font color="#666666" size="2">
     <a href="http://www.gnu.org/licenses/gpl.html">
-      <img border="0" src="#{@image_src}/gplv3_free_software.png" alt="GPLv3" width="127" height="51" />
+      .:
     </a>
   </font></p>
 </td><td valign="top" width="45%">
-- 
cgit v1.2.3


From 13f66fe40a8eec2c68d0a67e5e7ac80658450f1e Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph@amissah.com>
Date: Thu, 6 Jun 2013 21:28:06 -0400
Subject: v4 v5: cgi helper script, sample search form generator, file name
 matching

---
 lib/sisu/v4/cgi_sql_common.rb | 4 ++--
 lib/sisu/v5/cgi_sql_common.rb | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'lib')

diff --git a/lib/sisu/v4/cgi_sql_common.rb b/lib/sisu/v4/cgi_sql_common.rb
index d15967aa..a6639fb3 100644
--- a/lib/sisu/v4/cgi_sql_common.rb
+++ b/lib/sisu/v4/cgi_sql_common.rb
@@ -917,7 +917,7 @@ module SiSU_CGI_SQL
                     #% text_objects_body
           s_contents.each do |c|                                               #% text body
             location=c['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
-            file_suffix=c['src_filename'][/.+?\.(_?sst|ssm)$/,1]
+            file_suffix=c['src_filename'][/.+?\.(ssm\.sst|sst)$/,1]
             lang=if location =~ /\S+?~(\S\S\S?)$/
               l=location[/\S+?~(\S\S\S?)$/,1]
               location=location.gsub(/(\S+?)~\S\S\S?/,'\1')
@@ -1009,7 +1009,7 @@ module SiSU_CGI_SQL
           oldtid = 0
           s_endnotes.each do |e|                                               #% endnotes
             location=e['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
-            file_suffix=e['src_filename'][/.+?\.(_?sst|ssm)$/,1]
+            file_suffix=e['src_filename'][/.+?\.(ssm\.sst|sst)$/,1]
             lang=if location =~ /\S+?~(\S\S\S?)$/
               l=location[/\S+?~(\S\S\S?)$/,1]
               location=location.gsub(/(\S+?)~\S\S\S?/,'\1')
diff --git a/lib/sisu/v5/cgi_sql_common.rb b/lib/sisu/v5/cgi_sql_common.rb
index fddde88c..b551d6c8 100644
--- a/lib/sisu/v5/cgi_sql_common.rb
+++ b/lib/sisu/v5/cgi_sql_common.rb
@@ -917,7 +917,7 @@ module SiSU_CGI_SQL
                     #% text_objects_body
           s_contents.each do |c|                                               #% text body
             location=c['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
-            file_suffix=c['src_filename'][/.+?\.(_?sst|ssm)$/,1]
+            file_suffix=c['src_filename'][/.+?\.(ssm\.sst|sst)$/,1]
             lang=if location =~ /\S+?~(\S\S\S?)$/
               l=location[/\S+?~(\S\S\S?)$/,1]
               location=location.gsub(/(\S+?)~\S\S\S?/,'\1')
@@ -1009,7 +1009,7 @@ module SiSU_CGI_SQL
           oldtid = 0
           s_endnotes.each do |e|                                               #% endnotes
             location=e['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
-            file_suffix=e['src_filename'][/.+?\.(_?sst|ssm)$/,1]
+            file_suffix=e['src_filename'][/.+?\.(ssm\.sst|sst)$/,1]
             lang=if location =~ /\S+?~(\S\S\S?)$/
               l=location[/\S+?~(\S\S\S?)$/,1]
               location=location.gsub(/(\S+?)~\S\S\S?/,'\1')
-- 
cgit v1.2.3