From 5331c088fb00a71bc397a0bd7eac78bae62f4ed5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah 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 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 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 - +
SiSU --> +
+ + +
+
+ SiSU + +
+ git + +
+
@@ -541,26 +553,29 @@ module SiSU_CGI_SQL +
-

- - SiSU - -

-
+ + +
+
+ SiSU + +
+ git + +
+

Generated by - - #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
- + #{v[:project]} © Ralph Amissah 1993, current 2013. All Rights Reserved.
- - #{v[:project]} - is software for document structuring, publishing and search, + #{v[:project]} is software for document structuring, publishing and search,
www.jus.uio.no/sisu @@ -569,6 +584,10 @@ module SiSU_CGI_SQL www.sisudoc.org + sources + + git.sisudoc.org +
w3 since October 3 1993 @@ -589,7 +608,7 @@ module SiSU_CGI_SQL #{v[:project]} using:
Standard SiSU markup syntax,
Standard SiSU meta-markup syntax, and the -
Standard SiSU object citation numbering and system, (object/text positioning system) +
Standard SiSU object citation numbering and system, (object/text identifying/locating system)
© Ralph Amissah 1997, current 2013. All Rights Reserved. @@ -599,7 +618,7 @@ module SiSU_CGI_SQL

- GPLv3 + .:

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 - +
SiSU --> +
+ + +
+
+ SiSU + +
+ git + +
+
@@ -541,26 +553,29 @@ module SiSU_CGI_SQL +
-

- - SiSU - -

-
+ + +
+
+ SiSU + +
+ git + +
+

Generated by - - #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
- + #{v[:project]} © Ralph Amissah 1993, current 2013. All Rights Reserved.
- - #{v[:project]} - is software for document structuring, publishing and search, + #{v[:project]} is software for document structuring, publishing and search,
www.jus.uio.no/sisu @@ -569,6 +584,10 @@ module SiSU_CGI_SQL www.sisudoc.org + sources + + git.sisudoc.org +
w3 since October 3 1993 @@ -589,7 +608,7 @@ module SiSU_CGI_SQL #{v[:project]} using:
Standard SiSU markup syntax,
Standard SiSU meta-markup syntax, and the -
Standard SiSU object citation numbering and system, (object/text positioning system) +
Standard SiSU object citation numbering and system, (object/text identifying/locating system)
© Ralph Amissah 1997, current 2013. All Rights Reserved. @@ -599,7 +618,7 @@ module SiSU_CGI_SQL

- GPLv3 + .:

-- cgit v1.2.3 From 13f66fe40a8eec2c68d0a67e5e7ac80658450f1e Mon Sep 17 00:00:00 2001 From: Ralph Amissah 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