diff --git a/lib/sisu/v1/cgi_sqlite.rb b/lib/sisu/v1/cgi_sqlite.rb
index 9a2be6dd..6f0bec06 100644
--- a/lib/sisu/v1/cgi_sqlite.rb
+++ b/lib/sisu/v1/cgi_sqlite.rb
@@ -1,13 +1,12 @@
# coding: utf-8
=begin
-
* Name: SiSU
* Description: a framework for document structuring, publishing and search
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/character_encoding.rb b/lib/sisu/v1/character_encoding.rb
index 2bac8edc..202cdcaf 100644
--- a/lib/sisu/v1/character_encoding.rb
+++ b/lib/sisu/v1/character_encoding.rb
@@ -1,13 +1,12 @@
# coding: utf-8
=begin
-
* Name: SiSU
* Description: a framework for document structuring, publishing and search
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/composite.rb b/lib/sisu/v1/composite.rb
index 9dc35eec..9d8a1558 100644
--- a/lib/sisu/v1/composite.rb
+++ b/lib/sisu/v1/composite.rb
@@ -1,13 +1,12 @@
# coding: utf-8
=begin
-
* Name: SiSU
* Description: a framework for document structuring, publishing and search
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/concordance.rb b/lib/sisu/v1/concordance.rb
index 3c2b8326..c5d2820b 100644
--- a/lib/sisu/v1/concordance.rb
+++ b/lib/sisu/v1/concordance.rb
@@ -1,13 +1,12 @@
# coding: utf-8
=begin
-
* Name: SiSU
* Description: a framework for document structuring, publishing and search
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/conf.rb b/lib/sisu/v1/conf.rb
index 9e2b7efd..1eee963b 100644
--- a/lib/sisu/v1/conf.rb
+++ b/lib/sisu/v1/conf.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/constants.rb b/lib/sisu/v1/constants.rb
index b2fdf5a1..8ea65b2a 100644
--- a/lib/sisu/v1/constants.rb
+++ b/lib/sisu/v1/constants.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/css.rb b/lib/sisu/v1/css.rb
index 60ebf35c..6a918131 100644
--- a/lib/sisu/v1/css.rb
+++ b/lib/sisu/v1/css.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal.rb b/lib/sisu/v1/dal.rb
index 63b7b534..8599964d 100644
--- a/lib/sisu/v1/dal.rb
+++ b/lib/sisu/v1/dal.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_character_check.rb b/lib/sisu/v1/dal_character_check.rb
index 99ee25cd..bd5837ac 100644
--- a/lib/sisu/v1/dal_character_check.rb
+++ b/lib/sisu/v1/dal_character_check.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_doc_str.rb b/lib/sisu/v1/dal_doc_str.rb
index bed3115c..e52210d1 100644
--- a/lib/sisu/v1/dal_doc_str.rb
+++ b/lib/sisu/v1/dal_doc_str.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_doc_str_code.rb b/lib/sisu/v1/dal_doc_str_code.rb
index 02643fa3..8ccd45e1 100644
--- a/lib/sisu/v1/dal_doc_str_code.rb
+++ b/lib/sisu/v1/dal_doc_str_code.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_doc_str_tables.rb b/lib/sisu/v1/dal_doc_str_tables.rb
index ff29706b..d9d39632 100644
--- a/lib/sisu/v1/dal_doc_str_tables.rb
+++ b/lib/sisu/v1/dal_doc_str_tables.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_endnotes.rb b/lib/sisu/v1/dal_endnotes.rb
index 77909443..3d4bd148 100644
--- a/lib/sisu/v1/dal_endnotes.rb
+++ b/lib/sisu/v1/dal_endnotes.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_expand_insertions.rb b/lib/sisu/v1/dal_expand_insertions.rb
index 90102c7d..4f698f36 100644
--- a/lib/sisu/v1/dal_expand_insertions.rb
+++ b/lib/sisu/v1/dal_expand_insertions.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_hash_digest.rb b/lib/sisu/v1/dal_hash_digest.rb
index 2b7370ca..734772ec 100644
--- a/lib/sisu/v1/dal_hash_digest.rb
+++ b/lib/sisu/v1/dal_hash_digest.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_idx.rb b/lib/sisu/v1/dal_idx.rb
index fec0e1ed..3033fdb9 100644
--- a/lib/sisu/v1/dal_idx.rb
+++ b/lib/sisu/v1/dal_idx.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_images.rb b/lib/sisu/v1/dal_images.rb
index 2e3e3fdd..64d4bcef 100644
--- a/lib/sisu/v1/dal_images.rb
+++ b/lib/sisu/v1/dal_images.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_metadata.rb b/lib/sisu/v1/dal_metadata.rb
index bdf0dace..0981eb69 100644
--- a/lib/sisu/v1/dal_metadata.rb
+++ b/lib/sisu/v1/dal_metadata.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_numbering.rb b/lib/sisu/v1/dal_numbering.rb
index 05123bbc..56a2999c 100644
--- a/lib/sisu/v1/dal_numbering.rb
+++ b/lib/sisu/v1/dal_numbering.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_substitutions_and_insertions.rb b/lib/sisu/v1/dal_substitutions_and_insertions.rb
index 1ffb22d4..8733d764 100644
--- a/lib/sisu/v1/dal_substitutions_and_insertions.rb
+++ b/lib/sisu/v1/dal_substitutions_and_insertions.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dal_syntax.rb b/lib/sisu/v1/dal_syntax.rb
index c6bab08f..3a3273c7 100644
--- a/lib/sisu/v1/dal_syntax.rb
+++ b/lib/sisu/v1/dal_syntax.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_columns.rb b/lib/sisu/v1/db_columns.rb
index 2dc88a9d..c580db5f 100644
--- a/lib/sisu/v1/db_columns.rb
+++ b/lib/sisu/v1/db_columns.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_create.rb b/lib/sisu/v1/db_create.rb
index 2cdb2c06..62d46cb7 100644
--- a/lib/sisu/v1/db_create.rb
+++ b/lib/sisu/v1/db_create.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_dbi.rb b/lib/sisu/v1/db_dbi.rb
index 1c09f334..932dd440 100644
--- a/lib/sisu/v1/db_dbi.rb
+++ b/lib/sisu/v1/db_dbi.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_drop.rb b/lib/sisu/v1/db_drop.rb
index 258b31c1..beec90a5 100644
--- a/lib/sisu/v1/db_drop.rb
+++ b/lib/sisu/v1/db_drop.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_import.rb b/lib/sisu/v1/db_import.rb
index 3ead75f6..7e96d7d5 100644
--- a/lib/sisu/v1/db_import.rb
+++ b/lib/sisu/v1/db_import.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_indexes.rb b/lib/sisu/v1/db_indexes.rb
index 315ae199..cdbfc0a8 100644
--- a/lib/sisu/v1/db_indexes.rb
+++ b/lib/sisu/v1/db_indexes.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_load_tuple.rb b/lib/sisu/v1/db_load_tuple.rb
index 447e9354..64b6cd7b 100644
--- a/lib/sisu/v1/db_load_tuple.rb
+++ b/lib/sisu/v1/db_load_tuple.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_remove.rb b/lib/sisu/v1/db_remove.rb
index e7ed70a8..2ab4b992 100644
--- a/lib/sisu/v1/db_remove.rb
+++ b/lib/sisu/v1/db_remove.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_select.rb b/lib/sisu/v1/db_select.rb
index 1d5e1f20..e902971c 100644
--- a/lib/sisu/v1/db_select.rb
+++ b/lib/sisu/v1/db_select.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/db_tests.rb b/lib/sisu/v1/db_tests.rb
index c5370b52..0b617aa9 100644
--- a/lib/sisu/v1/db_tests.rb
+++ b/lib/sisu/v1/db_tests.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/dbi.rb b/lib/sisu/v1/dbi.rb
index 644b150d..edd2e3ef 100644
--- a/lib/sisu/v1/dbi.rb
+++ b/lib/sisu/v1/dbi.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -108,10 +108,10 @@ module SiSU_DBI
rescue
if @opt.mod.inspect=~/--(createall|create)/
puts %{manually create the database: "#{db}" if it does not yet exist}
- #sudo su -p postgres; createdb #{db}; #[createuser?]
+ #sudo su -p postgres; createdb #{@db.db}; #[createuser?]
end
SiSU_DB_DBI::Case.new(@opt,@conn,@sql_type).cases
- @conn=DBI.connect(dbi,user,db)
+ @conn=DBI.connect(@db.dbi,@db.user,@db.db)
ensure
end
end
diff --git a/lib/sisu/v1/defaults.rb b/lib/sisu/v1/defaults.rb
index fe2a61e8..97736210 100644
--- a/lib/sisu/v1/defaults.rb
+++ b/lib/sisu/v1/defaults.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/digests.rb b/lib/sisu/v1/digests.rb
index d4e5befc..c376e9c2 100644
--- a/lib/sisu/v1/digests.rb
+++ b/lib/sisu/v1/digests.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/embedded.rb b/lib/sisu/v1/embedded.rb
index 7f351a18..9152af2a 100644
--- a/lib/sisu/v1/embedded.rb
+++ b/lib/sisu/v1/embedded.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/errors.rb b/lib/sisu/v1/errors.rb
index 93aab7cb..d6dac5c3 100644
--- a/lib/sisu/v1/errors.rb
+++ b/lib/sisu/v1/errors.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/harvest.rb b/lib/sisu/v1/harvest.rb
index 1e390c50..7722fb46 100644
--- a/lib/sisu/v1/harvest.rb
+++ b/lib/sisu/v1/harvest.rb
@@ -9,7 +9,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/harvest_authors.rb b/lib/sisu/v1/harvest_authors.rb
index e413b1d2..a276f333 100644
--- a/lib/sisu/v1/harvest_authors.rb
+++ b/lib/sisu/v1/harvest_authors.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/harvest_topics.rb b/lib/sisu/v1/harvest_topics.rb
index f1274b40..3ebd2da6 100644
--- a/lib/sisu/v1/harvest_topics.rb
+++ b/lib/sisu/v1/harvest_topics.rb
@@ -9,7 +9,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/help.rb b/lib/sisu/v1/help.rb
index a56a06ef..6cc5ca4b 100644
--- a/lib/sisu/v1/help.rb
+++ b/lib/sisu/v1/help.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -158,7 +158,7 @@ module SiSU_Help
end
def summary
print < 0
para.each do |line|
line.gsub!(/\s+$/m,'')
diff --git a/lib/sisu/v1/manpage_format.rb b/lib/sisu/v1/manpage_format.rb
index 36009f8d..d5402b8d 100644
--- a/lib/sisu/v1/manpage_format.rb
+++ b/lib/sisu/v1/manpage_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/odf.rb b/lib/sisu/v1/odf.rb
index e4873a10..65029bdd 100644
--- a/lib/sisu/v1/odf.rb
+++ b/lib/sisu/v1/odf.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/odf_format.rb b/lib/sisu/v1/odf_format.rb
index d779d82d..615b6fca 100644
--- a/lib/sisu/v1/odf_format.rb
+++ b/lib/sisu/v1/odf_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/options.rb b/lib/sisu/v1/options.rb
index f43034dc..b0a9c8bb 100644
--- a/lib/sisu/v1/options.rb
+++ b/lib/sisu/v1/options.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/param.rb b/lib/sisu/v1/param.rb
index 889ec351..7281871f 100644
--- a/lib/sisu/v1/param.rb
+++ b/lib/sisu/v1/param.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/param_identify_markup.rb b/lib/sisu/v1/param_identify_markup.rb
index 37eb8be1..0f0f40a0 100644
--- a/lib/sisu/v1/param_identify_markup.rb
+++ b/lib/sisu/v1/param_identify_markup.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/particulars.rb b/lib/sisu/v1/particulars.rb
index ac6b10bc..ce32ef96 100644
--- a/lib/sisu/v1/particulars.rb
+++ b/lib/sisu/v1/particulars.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/plaintext.rb b/lib/sisu/v1/plaintext.rb
index 540c1bce..60f0f745 100644
--- a/lib/sisu/v1/plaintext.rb
+++ b/lib/sisu/v1/plaintext.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/plaintext_format.rb b/lib/sisu/v1/plaintext_format.rb
index 42c206e8..9652edbb 100644
--- a/lib/sisu/v1/plaintext_format.rb
+++ b/lib/sisu/v1/plaintext_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/relaxng.rb b/lib/sisu/v1/relaxng.rb
index a53b6dee..aba4b8d9 100644
--- a/lib/sisu/v1/relaxng.rb
+++ b/lib/sisu/v1/relaxng.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -70,7 +70,7 @@ module SiSU_relaxng
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/remote.rb b/lib/sisu/v1/remote.rb
index cc217018..d0ce57d9 100644
--- a/lib/sisu/v1/remote.rb
+++ b/lib/sisu/v1/remote.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/response.rb b/lib/sisu/v1/response.rb
index b69f2677..075c29f9 100644
--- a/lib/sisu/v1/response.rb
+++ b/lib/sisu/v1/response.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/rexml.rb b/lib/sisu/v1/rexml.rb
index 6b6ff906..0b7ab94b 100644
--- a/lib/sisu/v1/rexml.rb
+++ b/lib/sisu/v1/rexml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/screen_text_color.rb b/lib/sisu/v1/screen_text_color.rb
index 915cf58b..8ffcf2c3 100644
--- a/lib/sisu/v1/screen_text_color.rb
+++ b/lib/sisu/v1/screen_text_color.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/share_src.rb b/lib/sisu/v1/share_src.rb
index d151daff..ee8749ac 100644
--- a/lib/sisu/v1/share_src.rb
+++ b/lib/sisu/v1/share_src.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/share_src_kdissert.rb b/lib/sisu/v1/share_src_kdissert.rb
index 8dbe83f2..4193aae1 100644
--- a/lib/sisu/v1/share_src_kdissert.rb
+++ b/lib/sisu/v1/share_src_kdissert.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/shared_html.rb b/lib/sisu/v1/shared_html.rb
index baefa2fd..a62f3526 100644
--- a/lib/sisu/v1/shared_html.rb
+++ b/lib/sisu/v1/shared_html.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/shared_html_lite.rb b/lib/sisu/v1/shared_html_lite.rb
index 7fe77e0b..5e0888bf 100644
--- a/lib/sisu/v1/shared_html_lite.rb
+++ b/lib/sisu/v1/shared_html_lite.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/shared_sem.rb b/lib/sisu/v1/shared_sem.rb
index e7a0724b..837422a9 100644
--- a/lib/sisu/v1/shared_sem.rb
+++ b/lib/sisu/v1/shared_sem.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/shared_structure.rb b/lib/sisu/v1/shared_structure.rb
index 60e6a451..5d12fec8 100644
--- a/lib/sisu/v1/shared_structure.rb
+++ b/lib/sisu/v1/shared_structure.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/shared_txt.rb b/lib/sisu/v1/shared_txt.rb
index f5762c8e..ffed2778 100644
--- a/lib/sisu/v1/shared_txt.rb
+++ b/lib/sisu/v1/shared_txt.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/shared_xml.rb b/lib/sisu/v1/shared_xml.rb
index 05161c41..de1f7266 100644
--- a/lib/sisu/v1/shared_xml.rb
+++ b/lib/sisu/v1/shared_xml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sisupod_make.rb b/lib/sisu/v1/sisupod_make.rb
index 470cbb01..1fa742aa 100644
--- a/lib/sisu/v1/sisupod_make.rb
+++ b/lib/sisu/v1/sisupod_make.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sitemaps.rb b/lib/sisu/v1/sitemaps.rb
index f838373b..adafa3c6 100644
--- a/lib/sisu/v1/sitemaps.rb
+++ b/lib/sisu/v1/sitemaps.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/spell.rb b/lib/sisu/v1/spell.rb
index 6ceb44cf..84f503f9 100644
--- a/lib/sisu/v1/spell.rb
+++ b/lib/sisu/v1/spell.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sst_convert_markup.rb b/lib/sisu/v1/sst_convert_markup.rb
index 1d678b11..35b09b71 100644
--- a/lib/sisu/v1/sst_convert_markup.rb
+++ b/lib/sisu/v1/sst_convert_markup.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sst_do_inline_footnotes.rb b/lib/sisu/v1/sst_do_inline_footnotes.rb
index ebe038fb..1c8a75cd 100644
--- a/lib/sisu/v1/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v1/sst_do_inline_footnotes.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sst_from_kdissert.rb b/lib/sisu/v1/sst_from_kdissert.rb
index 8f22c5f5..f42755b3 100644
--- a/lib/sisu/v1/sst_from_kdissert.rb
+++ b/lib/sisu/v1/sst_from_kdissert.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sst_from_xml.rb b/lib/sisu/v1/sst_from_xml.rb
index cab88cbb..db7e859f 100644
--- a/lib/sisu/v1/sst_from_xml.rb
+++ b/lib/sisu/v1/sst_from_xml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sst_identify_markup.rb b/lib/sisu/v1/sst_identify_markup.rb
index 7d8e0eda..aa2a5438 100644
--- a/lib/sisu/v1/sst_identify_markup.rb
+++ b/lib/sisu/v1/sst_identify_markup.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sst_to_s_xml_dom.rb b/lib/sisu/v1/sst_to_s_xml_dom.rb
index 39ae7bcc..af8c140a 100644
--- a/lib/sisu/v1/sst_to_s_xml_dom.rb
+++ b/lib/sisu/v1/sst_to_s_xml_dom.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -57,20 +57,20 @@
=end
module SiSU_simple_xml_model_dom
- require "#{SiSU_lib}/particulars"
- include SiSU_Particulars
- require "#{SiSU_lib}/defaults"
- include SiSU_Viz
- require "#{SiSU_lib}/sysenv"
- include SiSU_Env
- require "#{SiSU_lib}/dal_doc_str"
- require "#{SiSU_lib}/shared_xml"
- require "#{SiSU_lib}/shared_sem"
- require "#{SiSU_lib}/xml_format"
- include SiSU_XML_format
- include SiSU_XML_munge
- require "#{SiSU_lib}/rexml"
- include SiSU_Rexml
+ require "#{SiSU_lib}/particulars" # particulars.rb
+ include SiSU_Particulars
+ require "#{SiSU_lib}/defaults" # defaults.rb
+ include SiSU_Viz
+ require "#{SiSU_lib}/sysenv" # sysenv.rb
+ include SiSU_Env
+ require "#{SiSU_lib}/dal_doc_str" # dal_doc_str.rb
+ require "#{SiSU_lib}/shared_xml" # shared_xml.rb
+ include SiSU_XML_munge
+ require "#{SiSU_lib}/shared_sem" # shared_sem.rb
+ require "#{SiSU_lib}/xml_format" # xml_format.rb
+ include SiSU_XML_format
+ require "#{SiSU_lib}/rexml" # rexml.rb
+ include SiSU_Rexml
@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0
@@tablefoot=''
class Convert
@@ -126,9 +126,9 @@ module SiSU_simple_xml_model_dom
end
end
class Scroll
- require "#{SiSU_lib}/shared_txt"
- require "#{SiSU_lib}/css"
- include SiSU_text_utils
+ require "#{SiSU_lib}/shared_txt" # shared_txt.rb
+ require "#{SiSU_lib}/css" # css.rb
+ include SiSU_text_utils
@@xml={ :body=>[],:open=>[],:close=>[],:head=>[] }
def initialize(data='',particulars='')
@data,@env,@md=data,particulars.env,particulars.md
diff --git a/lib/sisu/v1/sst_to_s_xml_node.rb b/lib/sisu/v1/sst_to_s_xml_node.rb
index 3cbd1156..cba4c81e 100644
--- a/lib/sisu/v1/sst_to_s_xml_node.rb
+++ b/lib/sisu/v1/sst_to_s_xml_node.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -57,22 +57,22 @@
=end
module SiSU_simple_xml_model_node
- require "#{SiSU_lib}/particulars"
- include SiSU_Particulars
- require "#{SiSU_lib}/defaults"
- require "#{SiSU_lib}/param"
- include SiSU_Param
- include SiSU_Viz
- require "#{SiSU_lib}/sysenv"
- include SiSU_Env
- require "#{SiSU_lib}/dal_syntax"
- require "#{SiSU_lib}/dal_doc_str"
- require "#{SiSU_lib}/shared_xml"
- require "#{SiSU_lib}/shared_sem"
- require "#{SiSU_lib}/xml_format"
- include SiSU_XML_format
- include SiSU_XML_munge
- require "#{SiSU_lib}/rexml"
+ require "#{SiSU_lib}/particulars" # particulars.rb
+ include SiSU_Particulars
+ require "#{SiSU_lib}/defaults" # defaults.rb
+ include SiSU_Viz
+ require "#{SiSU_lib}/param" # param.rb
+ include SiSU_Param
+ require "#{SiSU_lib}/sysenv" # sysenv.rb
+ include SiSU_Env
+ require "#{SiSU_lib}/dal_syntax" # dal_syntax.rb
+ require "#{SiSU_lib}/dal_doc_str" # dal_doc_str.rb
+ require "#{SiSU_lib}/shared_xml" # shared_xml.rb
+ include SiSU_XML_munge
+ require "#{SiSU_lib}/shared_sem" # shared_sem.rb
+ require "#{SiSU_lib}/xml_format" # xml_format.rb
+ include SiSU_XML_format
+ require "#{SiSU_lib}/rexml" # rexml.rb
include SiSU_Rexml
@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0
@@tablefoot=''
@@ -130,9 +130,9 @@ module SiSU_simple_xml_model_node
end
end
class Scroll
- require "#{SiSU_lib}/shared_txt"
- require "#{SiSU_lib}/css"
- include SiSU_text_utils
+ require "#{SiSU_lib}/shared_txt" # shared_txt.rb
+ require "#{SiSU_lib}/css" # css.rb
+ include SiSU_text_utils
@@xml={ :body=>[],:open=>[],:close=>[],:head=>[] }
@@parent={ :ocn=>[],:node=>[] }
@@offspring={ :ocn=>[],:node=>[] }
diff --git a/lib/sisu/v1/sst_to_s_xml_sax.rb b/lib/sisu/v1/sst_to_s_xml_sax.rb
index 26bd96f5..54118349 100644
--- a/lib/sisu/v1/sst_to_s_xml_sax.rb
+++ b/lib/sisu/v1/sst_to_s_xml_sax.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/sysenv.rb b/lib/sisu/v1/sysenv.rb
index e542e680..a55b03cc 100644
--- a/lib/sisu/v1/sysenv.rb
+++ b/lib/sisu/v1/sysenv.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -87,7 +87,7 @@ module SiSU_Env
@t.month
end
def year_static
- '2009'
+ '2010'
end
end
class Info_system
diff --git a/lib/sisu/v1/termsheet.rb b/lib/sisu/v1/termsheet.rb
index ce4d63f3..eb37c085 100644
--- a/lib/sisu/v1/termsheet.rb
+++ b/lib/sisu/v1/termsheet.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/texinfo.rb b/lib/sisu/v1/texinfo.rb
index 08b0cbe9..a4b26e43 100644
--- a/lib/sisu/v1/texinfo.rb
+++ b/lib/sisu/v1/texinfo.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/texinfo_format.rb b/lib/sisu/v1/texinfo_format.rb
index eede7b71..9563e22e 100644
--- a/lib/sisu/v1/texinfo_format.rb
+++ b/lib/sisu/v1/texinfo_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/texpdf.rb b/lib/sisu/v1/texpdf.rb
index 1e5375af..eb3b943f 100644
--- a/lib/sisu/v1/texpdf.rb
+++ b/lib/sisu/v1/texpdf.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/texpdf_format.rb b/lib/sisu/v1/texpdf_format.rb
index b13220e4..9689eccc 100644
--- a/lib/sisu/v1/texpdf_format.rb
+++ b/lib/sisu/v1/texpdf_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/update.rb b/lib/sisu/v1/update.rb
index a54a6e1b..64337726 100644
--- a/lib/sisu/v1/update.rb
+++ b/lib/sisu/v1/update.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/urls.rb b/lib/sisu/v1/urls.rb
index ea090253..b530d0d6 100644
--- a/lib/sisu/v1/urls.rb
+++ b/lib/sisu/v1/urls.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/webrick.rb b/lib/sisu/v1/webrick.rb
index 0e8ed910..e8d4ae1c 100644
--- a/lib/sisu/v1/webrick.rb
+++ b/lib/sisu/v1/webrick.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/wikispeak.rb b/lib/sisu/v1/wikispeak.rb
index 170ff39e..896649a2 100644
--- a/lib/sisu/v1/wikispeak.rb
+++ b/lib/sisu/v1/wikispeak.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xhtml.rb b/lib/sisu/v1/xhtml.rb
index e83943af..02201755 100644
--- a/lib/sisu/v1/xhtml.rb
+++ b/lib/sisu/v1/xhtml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml.rb b/lib/sisu/v1/xml.rb
index a270494c..c313a1e6 100644
--- a/lib/sisu/v1/xml.rb
+++ b/lib/sisu/v1/xml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml_dom.rb b/lib/sisu/v1/xml_dom.rb
index 5145be98..e6006c6b 100644
--- a/lib/sisu/v1/xml_dom.rb
+++ b/lib/sisu/v1/xml_dom.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml_fictionbook.rb b/lib/sisu/v1/xml_fictionbook.rb
index a0a82cba..8f0178ea 100644
--- a/lib/sisu/v1/xml_fictionbook.rb
+++ b/lib/sisu/v1/xml_fictionbook.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml_format.rb b/lib/sisu/v1/xml_format.rb
index c636ba2d..90688cb1 100644
--- a/lib/sisu/v1/xml_format.rb
+++ b/lib/sisu/v1/xml_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml_md_oai_pmh_dc.rb b/lib/sisu/v1/xml_md_oai_pmh_dc.rb
index afe46d88..73995f53 100644
--- a/lib/sisu/v1/xml_md_oai_pmh_dc.rb
+++ b/lib/sisu/v1/xml_md_oai_pmh_dc.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml_scaffold.rb b/lib/sisu/v1/xml_scaffold.rb
index 4e8745fb..f8931f10 100644
--- a/lib/sisu/v1/xml_scaffold.rb
+++ b/lib/sisu/v1/xml_scaffold.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/xml_tables.rb b/lib/sisu/v1/xml_tables.rb
index 72a4d9d1..f5267b97 100644
--- a/lib/sisu/v1/xml_tables.rb
+++ b/lib/sisu/v1/xml_tables.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v1/zap.rb b/lib/sisu/v1/zap.rb
index 54b60bed..4351e81e 100644
--- a/lib/sisu/v1/zap.rb
+++ b/lib/sisu/v1/zap.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2009 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v2/air.rb b/lib/sisu/v2/air.rb
new file mode 100644
index 00000000..abe0ee6c
--- /dev/null
+++ b/lib/sisu/v2/air.rb
@@ -0,0 +1,85 @@
+# coding:utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: system environment, resource control and configuration details
+
+=end
+module SiSU_Air
+ require "#{SiSU_lib}/particulars" # particulars.rb
+ #require "#{SiSU_lib}/defaults" # defaults.rb
+ #require "#{SiSU_lib}/sysenv" # sysenv.rb
+ #require "#{SiSU_lib}/param" # param.rb
+ class Source
+ @@dal_array=[]
+ @@fns=nil
+ def initialize(opt)
+ @opt=opt
+ @@fns||@opt.fns
+ @particulars=SiSU_Particulars::Combined.new(opt)
+ #@env=@particulars.env
+ #@md=@particulars.md
+ #@dal_array=@particulars.dal_array
+ end
+ def read
+ end
+ protected
+ def print
+ puts @particulars.md.inspect
+ puts @particulars.env.inspect
+ puts @particulars.dal_array
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/author_format.rb b/lib/sisu/v2/author_format.rb
new file mode 100644
index 00000000..da03f324
--- /dev/null
+++ b/lib/sisu/v2/author_format.rb
@@ -0,0 +1,113 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: system environment, resource control and configuration details
+
+=end
+module FORMAT
+ class Author
+ def initialize(author_param)
+ @author_param=author_param
+ end
+ def author_details
+ @authors,@author_array=[],[]
+ authors=@author_param.scan(/[^;]+/)
+ authors.each do |a|
+ a.strip!
+ if a =~/"(.+?)"/
+ @authors << { :the => $1 }
+ @author_array << $1.upcase
+ else #if a =~/,/
+ x=a.scan(/[^,]+/)
+ x[0].strip!
+ x[1].strip! if x[1]
+ if x.length==1
+ @authors << { :the => x[0] }
+ @author_array << x[0].upcase
+ elsif x.length==2
+ @authors << { :the=> x[0], :others => x[1] }
+ @author_array << "#{x[0].upcase}, #{x[1]}"
+ else #p x.length
+ end
+ end
+ end
+ l = @authors.length
+ authors_string=''
+ @authors.each_with_index do |a,i|
+ authors_string += if a[:others]
+ if (l - i) > 1
+ "#{a[:others]} #{a[:the]}, "
+ else
+ "#{a[:others]} #{a[:the]}"
+ end
+ else
+ if (l - i) > 2
+ "#{a[:the]}, "
+ else
+ "#{a[:the]}"
+ end
+ end
+ end
+ {
+ :last_first_a => authors,
+ :last_first_format_a => @author_array,
+ :authors_h => @authors,
+ :authors_s => authors_string,
+ :authors_param => @author_param
+ }
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/cgi.rb b/lib/sisu/v2/cgi.rb
new file mode 100644
index 00000000..dbdc15e7
--- /dev/null
+++ b/lib/sisu/v2/cgi.rb
@@ -0,0 +1,87 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: generates naive cgi search form for search of sisu database
+ (pgsql sqlite)
+
+=end
+module SiSU_CGI #% database building documents
+ require "#{SiSU_lib}/sysenv" # sysenv.rb
+ require "#{SiSU_lib}/cgi_pgsql" # cgi_pgsql.rb
+ include SiSU_CGI_pgsql
+ require "#{SiSU_lib}/cgi_sqlite" # cgi_sqlite.rb
+ class SiSU_search
+ def initialize(opt)
+ @opt=opt
+ @webserv=@opt.files[0].to_s.strip #verify @opt.files[0].class
+ end
+ def search_info
+ a=%{
+ For help on sisu search, type:
+ sisu --help search
+ For help on setting up hyperestraier for sisu, type:
+ sisu --help hyperestraier
+ }
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
+ tell.print_grey
+ end
+ def read
+ SiSU_CGI_sqlite::SiSU_search_sqlite.new(@opt,@webserv).sqlite
+ SiSU_CGI_pgsql::SiSU_search_pgsql.new(@opt,@webserv).pgsql
+ search_info unless @opt.cmd =~/q/
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/cgi_pgsql.rb b/lib/sisu/v2/cgi_pgsql.rb
new file mode 100644
index 00000000..bc47b0bc
--- /dev/null
+++ b/lib/sisu/v2/cgi_pgsql.rb
@@ -0,0 +1,231 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: generates naive cgi search form for search of sisu database (pgsql sqlite)
+
+=end
+module SiSU_CGI_pgsql #% database building documents
+ require "#{SiSU_lib}/sysenv" # sysenv.rb
+ require "#{SiSU_lib}/cgi_sql_common" # cgi_sql_common.rb
+ include SiSU_CGI_sql
+ class SiSU_search_pgsql < SiSU_CGI_common
+ def initialize(opt,webserv)
+ @opt,@webserv=opt,webserv
+ @env=SiSU_Env::Info_env.new('',opt)
+ @sys=SiSU_Env::System_call.new
+ @image_src="#{@env.url.webserv_cgi}/_sisu/image_sys"
+ @common=SiSU_CGI_sql::SiSU_CGI_common.new(@webserv,@opt.cmd,@image_src,@env)
+ @db=SiSU_Env::Info_db.new
+ end
+ def pgsql
+ serve=[]
+ if @sys.psql
+ available_db_table=`psql --list` # system call requires psql
+ available_db=available_db_table.scan(/(#{Db[:name_prefix]}\S+)/) if not available_db_table.nil?
+ if available_db \
+ and available_db.class==Array
+ available_db.flatten.each do |x|
+ serve << x.gsub(/#{Db[:name_prefix]}(\S+)/,'\1')
+ end
+ else put "WARNING: no postgresql database available, (have you created one?)"
+ end
+ serve.sort!
+ f1,f2,f3=[],[],[]
+ serve.each do |x|
+ f1 << %{ \n} unless x =~/apache|sisu\/image/ #check
+ end
+ f2 << %{ selected_db=case cgi['db']\n}
+ serve.each do |x|
+ f2 << %{ when /#{Db[:name_prefix]}#{x}/; ''\n} unless x =~/apache|sisu\/image/ #check
+ end
+ end
+ f2 << " end\n"
+ if FileTest.writable?('.')
+ output=File.open('sisu_pgsql.cgi','w')
+ 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)
+ }
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
+ tell.print_grey
+ c=case @webserv
+ when /pwd/; ''
+ else "if necessary make the directory /usr/lib/cgi-bin :
+ sudo cp -vi #{Dir.pwd}/sisu_pgsql.cgi /usr/lib/cgi-bin/.
+ sudo chmod -v 755 /usr/lib/cgi-bin/sisu_pgsql.cgi
+ (copy sisu_pgsql.cgi to your cgi directory) and set file permissions to 755"
+ end
+ a=%{#{c}
+ #{@env.webserv_base_cgi}/cgi-bin/sisu_pgsql.cgi
+ }
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
+ tell.warn
+ a="postgresql db used for present directory: #{@db.psql.db}"
+ b="\n\t(to create and populate postgresql database see 'man sisu' and in particular the -D flag)\n\t[the database to be used for this directory (#{@db.psql.db}) will have to be created manually if it does not exist,\n\tsee 'sisu --help sql'\n\tif you have permission to create databases:\n\t'sisu -d --createdb'\n\tor using postgresql tools directly:\n\t'createdb #{@db.psql.db}'\n\tfor a list of existing databases try 'psql --list']"
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,a,b)
+ tell.txt_cyan
+ else puts 'failed in attempt to write sisu_pgsql.cgi to present directory, is directory writable?'
+ end
+ end
+ def header0
+ <<-WOK_SQL
+#!/usr/bin/env ruby
+=begin
+#{about}
+ * Description: generates naive cgi search form for search of sisu database (pgsql)
+#{gpl}
+=end
+ require 'cgi'
+ require 'fcgi'
+ require 'dbi'
+ @version='sisu_pgsql'
+ @image_src="#{@env.url.webserv_cgi}/_sisu/image_sys"
+ @hosturl_db="#{@env.url.webserv_base_cgi}"
+ @hosturl_files="#{@env.url.webserv_files_from_db}"
+ @port="#{@db.psql.port}"
+ @db_name_prefix="#{Db[:name_prefix]}"
+ user='#{@env.user}' # check user name for access to pg database: '#{@env.user}'
+ WOK_SQL
+ end
+ def search_statement
+ <<-'WOK_SQL'
+ class Dbi_search_string
+ def initialize(l,t,q,cse=false)
+ @l,@t,@q,@c=l,t,q,cse
+ end
+ def string
+ search={ :search => [],:flag => false }
+ if @t =~/\S+/ or @q =~/\S+/
+ if @t =~/\S+/; unescaped_search=CGI.unescape(@t)
+ elsif @q =~/\S+/; unescaped_search=CGI.unescape(@q)
+ end
+ search_construct=[]
+ if @c
+ unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #{@l}~\( '")
+ unescaped_search.gsub!(/(.+)/,"#{@l}~\( '\\1' \)")
+ else
+ unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #{@l}~*\( '")
+ unescaped_search.gsub!(/(.+)/,"#{@l}~*\( '\\1' \)")
+ end
+ search_construct << unescaped_search
+ search_construct=search_construct.join(' ')
+ search[:search] << search_construct
+ search[:flag]=true
+ search
+ end
+ search
+ end
+ end
+ WOK_SQL
+ end
+ def search_query1
+ <<-'WOK_SQL'
+ @search_text,@search_endnotes=[],[]
+ search[:text].each{|x| @search_text << "#{x} AND " }
+ @search_text=@search_text.join.gsub!(/AND\s+$/,'') #watch
+ @search_text.gsub!(/(documents\.clean~[*]?\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+documents\.clean~[*]?\(\s*'[^']+'\s*\))+)/,'(\1)')
+ search[:endnotes].each{|x| @search_endnotes << "#{x} AND " }
+ @search_endnotes=@search_endnotes.join.gsub!(/AND\s+$/,'') #watch
+ @search_endnotes.gsub!(/(endnotes\.clean~\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+endnotes\.clean~\(\s*'[^']+'\s*\))+)/,'(\1)')
+ end
+ WOK_SQL
+ end
+ def search_query2
+ <<-'WOK_SQL'
+ def sql_select_body
+ limit ||=@@limit
+ offset ||=@@offset
+ @sql_statement[:body]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE (#{@search_text}) AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, metadata.filename, documents.ocn}
+ @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;}
+ select=@sql_statement[:body] + ' ' + @sql_statement[:range]
+ select
+ end
+ def sql_select_endnotes
+ limit ||=@@limit
+ offset ||=@@offset
+ @sql_statement[:endnotes]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE (#{@search_endnotes}) AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, metadata.filename, endnotes.nr}
+ @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;}
+ select=@sql_statement[:endnotes] + ' ' + @sql_statement[:range]
+ select
+ end
+ def sql_select_body_format
+ %{#{sql_select_body}}
+ end
+ def sql_select_endnotes_format
+ %{#{sql_select_endnotes}}
+ end
+ def contents
+ @conn.select_all(sql_select_body)
+ end
+ def endnotes
+ @conn.select_all(sql_select_endnotes)
+ end
+ end
+ WOK_SQL
+ end
+ def buttons1_pgsql
+ <<-'WOK_SQL'
+ case sensitive
+ WOK_SQL
+ end
+ def dbi_connect
+ <<-'WOK_SQL'
+ dbi="dbi:Pg:database=#{@db};port=#{@port}"
+ @conn=DBI.connect(dbi,user)
+ WOK_SQL
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/cgi_sql_common.rb b/lib/sisu/v2/cgi_sql_common.rb
new file mode 100644
index 00000000..f7b035db
--- /dev/null
+++ b/lib/sisu/v2/cgi_sql_common.rb
@@ -0,0 +1,971 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: generates naive cgi search form for search of sisu database (pgsql sqlite)
+
+=end
+module SiSU_CGI_sql
+ class SiSU_CGI_common
+ def initialize(webserv,cmd,image_src,dir)
+ @webserv,@cmd,@image_src,@env=webserv,cmd,image_src,dir
+ end
+ def about
+ <<-'WOK_SQL'
+ * Name: SiSU information Structuring Universe
+ * Author: Ralph Amissah
+ * http://www.jus.uio.no/sisu
+ * http://www.jus.uio.no/sisu/SiSU/download
+ WOK_SQL
+ end
+ def gpl
+ <<-'WOK_SQL'
+ * Name: SiSU generated sample cgi search form
+
+ * Description: generated sample cgi search form for SiSU
+ (SiSU is a framework for document structuring, publishing and search)
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+ WOK_SQL
+ end
+ def header1
+ <<-'WOK_SQL'
+#Common TOP
+ @@limit,@@offset=1000,0
+ @base="#{@hosturl_db}/cgi-bin/#{@version}.cgi"
+ @@canned_search_url=@base
+ @color_heading='#DDFFAA'
+ @color_match='#ffff48'
+ class Form
+ 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_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/
+ 'text:__; keywords:__; title:__; author:__; subject:__; description:__; publisher:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__; '
+ else ''
+ end
+ end
+ def submission_form
+ search_form=<<-WOK
+ WOK_SQL
+ end
+ def header_desc
+ <<-WOK_SQL
+
+
+
+
+ SiSU search form (sample): SiSU information Structuring Universe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WOK_SQL
+ end
+ def header2
+ <<-'WOK_SQL'
+
+ WOK
+ end
+ end
+ WOK_SQL
+ end
+ def search_request
+ <<-'WOK_SQL'
+ class Search_request #% search_for
+ attr_accessor :text1,:keywords,:title,:author,:subject,:description,:publisher,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename
+ def initialize(search_field='',q='')
+ @search_field,@q=search_field,q
+ @text1=@keywords=@title=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@comment=@abstract=@owner=@date_created=@date_issued=@date_modified=@date_available=@date_valid=@filename=''
+ if @search_field=~/\S/
+ @text1=text_to_match('text:')
+ @keywords=text_to_match('key(?:words?)?:')
+ @title=text_to_match('title:') # DublinCore 1 - title
+ @author=text_to_match('(?:author|creator)s?:') # DublinCore 2 - creator/author
+ @subject=text_to_match('subj(?:ect)?:') # DublinCore 3 - subject
+ @description=text_to_match('description:') # DublinCore 4 - description
+ @publisher=text_to_match('pub(?:lisher)?:') # DublinCore 5 - publisher
+ @contributor=text_to_match('contributor:') # DublinCore 6 - contributor
+ @date=text_to_match('date:') # DublinCore 7 - date dd-mm-yy
+ @type=text_to_match('type:') # DublinCore 8 - type
+ @format=text_to_match('format:') # DublinCore 9 - format
+ @identifier=text_to_match('identifier:') # DublinCore 10 - identifier
+ @source=text_to_match('source:') # DublinCore 11 - source
+ @language=text_to_match('language:') # DublinCore 12 - language
+ @relation=text_to_match('relation:') # DublinCore 13 - relation
+ @coverage=text_to_match('coverage:') # DublinCore 14 - coverage
+ @rights=text_to_match('rights:') # DublinCore 15 - rights
+ @comment=text_to_match('comment:')
+ @abstract=text_to_match('abs(?:tract)?:')
+ @owner=text_to_match('owner:')
+ @date_created=text_to_match('date_created:')
+ @date_issued=text_to_match('date_issued:')
+ @date_modified=text_to_match('date_modified:')
+ @date_available=text_to_match('date_available:')
+ @date_valid=text_to_match('date_valid:')
+ @filename=text_to_match('filename:')
+ @text1=text_to_match unless @keywords or @author or @title or @text1 or @comment or @abstract or @rights or @subject or @publisher or @date or @filename
+ else
+ @text1=q['s1'] if q['s1']=~/\S/
+ @keywords=q['key'] if q['key']=~/\S/
+ @title=q['ti'] if q['ti']=~/\S/
+ @author=q['au'] if q['au']=~/\S/
+ @subject=q['sj'] if q['sj']=~/\S/
+ @description=q['dsc'] if q['dsc']=~/\S/
+ @publisher=q['pb'] if q['pb']=~/\S/
+ @contributor=q['cntr'] if q['cntr']=~/\S/
+ @date=q['dt'] if q['dt']=~/\S/
+ @type=q['ty'] if q['ty']=~/\S/
+ @identifier=q['id'] if q['id']=~/\S/
+ @source=q['src'] if q['src']=~/\S/
+ @language=q['lang'] if q['lang']=~/\S/
+ @relation=q['rel'] if q['rel']=~/\S/
+ @coverage=q['cov'] if q['cov']=~/\S/
+ @rights=q['cr'] if q['cr']=~/\S/
+ @comment=q['co'] if q['co']=~/\S/
+ @abstract=q['ab'] if q['ab']=~/\S/
+ @date_created=q['dtc'] if q['dtc']=~/\S/
+ @date_issued=q['dti'] if q['dti']=~/\S/
+ @date_modified=q['dtm'] if q['dtm']=~/\S/
+ @date_available=q['dta'] if q['dta']=~/\S/
+ @date_valid=q['dtv'] if q['dtv']=~/\S/
+ @filename=if q['doc'] and q['search'] !~/search db/; q['doc'] #if q['doc']; q['doc']
+ elsif q['fns']=~/\S/; q['fns']
+ end
+ @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000
+ @@offset=q['off'] if q['off']=~/\d+/ # 0
+ end
+ end
+ def text_to_match(identifier='')
+ m={
+ :string => /#{identifier}\s*(.+?)/,
+ :string => /#{identifier}\s*(.+?)(?:;|\n|\r|$)/,
+ :word => /#{identifier}[\s(]*(\S+)/
+ }
+ search_string=if @search_field =~m[:word]
+ search_string=if @search_field =~m[:braces]; m[:braces].match(@search_field)[1]
+ elsif @search_field =~m[:string]; m[:string].match(@search_field)[1]
+ else
+ str=m[:word].match(@search_field)[1]
+ str.gsub!(/[()]/,'')
+ str
+ end
+ search_string.strip!
+ search_string.gsub!(/\s+/,'+')
+ search_string
+ #else
+ # "__"
+ end
+ end
+ end
+ WOK_SQL
+ end
+ def search_statement_common
+ <<-'WOK_SQL'
+ class Dbi_search_statement
+ attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format,:sql_offset,:sql_limit
+ def initialize(conn,search_for,q,c)
+ @conn=conn
+ @text_search_flag=false
+ @sql_statement={ :body=>'',:endnotes=>'',:range=>'' }
+ #@offset||=@@offset
+ #@offset+=@@limit
+ search={ :text => [],:endnotes => [] }
+ cse=if c =~/\S/; true
+ else false
+ end
+ st=Dbi_search_string.new('documents.clean',search_for.text1,q['s1'],cse).string
+ se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1'],cse).string
+ @text_search_flag=st[:flag]
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << se[:search]
+ end
+ st=Dbi_search_string.new('metadata.keywords',search_for.keywords,q['key'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.title',search_for.title,q['ti'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.creator',search_for.author,q['au'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.subject',search_for.subject,q['sj'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.description',search_for.description,q['dsc'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.publisher',search_for.publisher,q['pb'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.contributor',search_for.contributor,q['cntr'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.date',search_for.date,q['dt'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.type',search_for.type,q['ty'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.identifier',search_for.identifier,q['id'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.source',search_for.source,q['src'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.language',search_for.language,q['lang'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.relation',search_for.relation,q['rel'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.coverage',search_for.coverage,q['cov'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.rights',search_for.rights,q['cr'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.comment',search_for.comment,q['co'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.abstract',search_for.abstract,q['ab'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata.filename',search_for.filename,q['fns'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000
+ @@offset=q['off'] if q['off']=~/\d+/ # 0
+ WOK_SQL
+ end
+ def pages
+ <<-'WOK_SQL'
+ def sql_offset
+ @@offset
+ end
+ def sql_limit
+ @@limit
+ end
+ def sql_canned_search
+ @offset_next=sql_offset.to_i + sql_limit.to_i
+ @offset_previous=sql_offset.to_i - sql_limit.to_i
+ def current
+ @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + sql_offset.to_s
+ end
+ def next
+ @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_next.to_s
+ end
+ def previous
+ @offset_previous >= (0 ? (@@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) : '')
+ end
+ def start
+ @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + 0.to_s
+ end
+ self
+ end
+ def pre_next(beyond_limit,img)
+ can=sql_canned_search
+ page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i
+ if beyond_limit
+ if page.to_s =~ /^1$/
+ %{
+ #{v[:project]}, developed using
+
+ Ruby
+
+ on
+
+ Debian/Gnu/Linux
+
+ software infrastructure,
+ with the usual GPL (or OSS) suspects.
+
+ Better - "performance, reliability, scalability, security & total cost of ownership"
+ [not to mention flexibility & choice] use of and adherence to open standards (where practical and fair) and it is software libré.
+
+ Get With the Future
+
+ Way Better!
+
+
+
+
+
+
+ WOK
+ end
+ WOK_SQL
+ end
+ def main1
+ <<-'WOK_SQL'
+ @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,@sql_select_endnotes='','','',''
+ FCGI.each_cgi do |cgi|
+ begin # all code goes in begin section
+ @search={ :text => [],:endnotes => [] }
+ q=CGI.new
+ @db=if cgi['db'] =~/\S+/;
+ @stub=/#{@db_name_prefix}(\S+)/.match(cgi['db'])[1]
+ cgi['db']
+ else
+ @stub='sisu'
+ "#{@db_name_prefix}#{@stub}"
+ end
+ 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_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'
+ checked_echo=checked_stats=checked_url=checked_searched=checked_tip=checked_sql='checked'
+ checked_none=''
+ elsif cgi['checks'] =~/check_none/
+ checked_none='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
+ def main2
+ <<-'WOK_SQL'
+ search_field=cgi['find'] if cgi['find'] # =~/\S+/
+ @search_for=Search_request.new(search_field,q) #.analyze #% search_for
+ #% searches
+ #Canned_search.new(@base,@search_for.text1,cgi)
+ if @search_for.text1=~/\S+/ or @search_for.author=~/\S+/ #and search_field =~/\S/
+ s1='s1=' + CGI.escape(@search_for.text1) if @search_for.text1=~/\S/
+ key='key=' + CGI.escape(@search_for.keywords) if @search_for.keywords=~/\S/
+ ti='&ti=' + CGI.escape(@search_for.title) if @search_for.title=~/\S/
+ au='&au=' + CGI.escape(@search_for.author) if @search_for.author=~/\S/
+ sj='&sj=' + CGI.escape(@search_for.subject) if @search_for.subject=~/\S/
+ dsc='&dsc=' + CGI.escape(@search_for.description) if @search_for.description=~/\S/
+ pb='&pb=' + CGI.escape(@search_for.publisher) if @search_for.publisher=~/\S/
+ cntr='&cntr=' + CGI.escape(@search_for.contributor) if @search_for.contributor=~/\S/
+ dt='&dt=' + CGI.escape(@search_for.date) if @search_for.date=~/\S/
+ ty='&ty=' + CGI.escape(@search_for.type) if @search_for.type=~/\S/
+ id='&id=' + CGI.escape(@search_for.identifier) if @search_for.identifier=~/\S/
+ src='&src=' + CGI.escape(@search_for.source) if @search_for.source=~/\S/
+ lang='&lang=' + CGI.escape(@search_for.language) if @search_for.language=~/\S/
+ rel='&rel=' + CGI.escape(@search_for.relation) if @search_for.relation=~/\S/
+ cov='&cov=' + CGI.escape(@search_for.coverage) if @search_for.coverage=~/\S/
+ cr='&cr=' + CGI.escape(@search_for.rights) if @search_for.rights=~/\S/
+ co='&co=' + CGI.escape(@search_for.comment) if @search_for.comment=~/\S/
+ ab='&ab=' + CGI.escape(@search_for.abstract) if @search_for.abstract=~/\S/
+ dtc='&dtc=' + CGI.escape(@search_for.date_created) if @search_for.date_created=~/\S/
+ dti='&dti=' + CGI.escape(@search_for.date_issued) if @search_for.date_issued=~/\S/
+ dtm='&dtm=' + CGI.escape(@search_for.date_modified) if @search_for.date_modified=~/\S/
+ dta='&dta=' + CGI.escape(@search_for.date_available) if @search_for.date_available=~/\S/
+ dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/
+ 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']}"
+ end
+ @canned_base_url="#{@base}?#{s1}&db=#{cgi['db']}"
+ if checked_case=~/\S/
+ @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1
+ @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1
+ else
+ @search[:text][1]=%{documents.clean~*'#{@search_for.text1}'} #s1
+ @search[:endnotes][1]=%{endnotes.clean~*'#{@search_for.text1}'} #s1
+ end
+ canned_note='search url:'
+ else
+ @@canned_search_url="#{@base}?db=#{@db}&view=index"
+ canned_note='search url example:'
+ end
+ if search_field =~/\S+/
+ analyze_format=search_field.gsub(/\s*\n/,'; ')
+ elsif checked_all =~/checked/ or checked_url =~/checked/
+ canned_search=@@canned_search_url.scan(/(?:s1|au|ti|fns)=[^&]+/)
+ af=canned_search.join('; ')
+ af.gsub!(/s1=/,'text: ')
+ af.gsub!(/au=/,'author: ')
+ af.gsub!(/ti=/,'title: ')
+ af.gsub!(/fns=/,'filename: ')
+ af.gsub!(/%2B/,' ')
+ analyze_format=af
+ st=af.split(/\s*;\s*/)
+ search_field=st.join("\n")
+ end
+ green=%{}
+ canned_search_url_txt=CGI.escapeHTML(@@canned_search_url)
+ the_can=%{#{canned_note} #{canned_search_url_txt} }
+ 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} } if @search_for.text1 =~/\S+/
+ p_keywords=%{keywords: #{green}#{@search_for.keywords} } if @search_for.keywords =~/\S+/
+ p_title=%{title: #{green}#{@search_for.title} } if @search_for.title =~/\S+/
+ p_author=%{author: #{green}#{@search_for.author} } if @search_for.author =~/\S+/
+ p_subject=%{subject: #{green}#{@search_for.subject} } if @search_for.subject =~/\S+/
+ p_description=%{description: #{green}#{@search_for.description} } if @search_for.description =~/\S+/
+ p_publisher=%{publisher: #{green}#{@search_for.publisher} } if @search_for.publisher =~/\S+/
+ p_contributor=%{contributor: #{green}#{@search_for.contributor} } if @search_for.contributor =~/\S+/
+ p_date=%{date: #{green}#{@search_for.date} } if @search_for.date =~/\S+/
+ p_type=%{type: #{green}#{@search_for.type} } if @search_for.type =~/\S+/
+ p_format=%{format: #{green}#{@search_for.format} } if @search_for.format =~/\S+/
+ p_identifier=%{identifier: #{green}#{@search_for.identifier} } if @search_for.identifier =~/\S+/
+ p_source=%{source: #{green}#{@search_for.source} } if @search_for.source =~/\S+/
+ p_language=%{language: #{green}#{@search_for.language} } if @search_for.language =~/\S+/
+ p_relation=%{relation: #{green}#{@search_for.relation} } if @search_for.relation =~/\S+/
+ p_coverage=%{coverage: #{green}#{@search_for.coverage} } if @search_for.coverage =~/\S+/
+ p_rights=%{rights: #{green}#{@search_for.rights} } if @search_for.rights =~/\S+/
+ p_comment=%{comment: #{green}#{@search_for.comment} } if @search_for.comment =~/\S+/
+ p_abstract=%{abstract: #{green}#{@search_for.abstract} } if @search_for.abstract =~/\S+/
+ p_filename=%{filename: #{green}#{@search_for.filename} } if @search_for.filename =~/\S+/
+ search_note=<<-WOK
+
+ database: #{green}#{@db}; selected view: #{green}#{cgi['view']}
+ search string: "#{green}#{analyze_format}"
+ #{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}
+
+ WOK
+ #eg = %{canned search e.g.: #{url} find: #{analyze} database: #{database}}
+ #dbi_canning
+ @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)
+ else #% searches
+ s1=if @search_for.text1 =~/\S/
+ @search_for.text1
+ else 'Unavailable'
+ end
+ if checked_case=~/\S/
+ @search[:text]<<%{documents.clean~'#{CGI.unescape(s1)}'}
+ @search[:endnotes]<<%{endnotes.clean~'#{CGI.unescape(s1)}'}
+ else
+ @search[:text]<<%{documents.clean~*'#{CGI.unescape(s1)}'}
+ @search[:endnotes]<<%{endnotes.clean~*'#{CGI.unescape(s1)}'}
+ end
+ #dbi_request
+ dbi_statement=Dbi_search_statement.new(@conn,@search_for,q,checked_case)
+ @text_search_flag=false
+ @text_search_flag=dbi_statement.text_search_flag
+ s_contents=dbi_statement.contents
+ s_endnotes=dbi_statement.endnotes
+ @body_main,@endnotes=[],[]
+ @search_regx=nil
+ oldtid=0
+ if @text_search_flag
+ if checked_sql =~/\S/
+ sql_select_body=dbi_statement.sql_select_body_format
+ sql_select_endnotes=dbi_statement.sql_select_endnotes_format
+ else sql_select_body,sql_select_endnotes='',''
+ end
+ @body_main << ' Main Text: ' << sql_select_body
+ @endnotes << ' Endnotes: ' << sql_select_endnotes
+ else
+ end
+ #text_objects_body
+ s_contents.each do |c| #% text body
+ location=c['filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
+ file_suffix=c['filename'][/.+?\.(_?sst|ssm)$/,1]
+ lang=if location =~ /\S+?~(\S\S\S?)$/
+ l=location[/\S+?~(\S\S\S?)$/,1]
+ location.gsub!(/(\S+?)~\S\S\S?/,'\1')
+ l=".#{l}"
+ else ''
+ end
+ #metadata_found_body
+ if c['tid'].to_i != oldtid.to_i
+ ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}"
+ else c['title']
+ end
+ can_txt_srch=if cgi['view']=~/index/; %{ }
+ else %{ }
+ end
+ title=%{ #{ti} by #{c['creator']} #{can_txt_srch} } if file_suffix=~/s/ #hmm watch file_suffix
+ if @text_search_flag; title=' '+title
+ else title=' '+title
+ end
+ @counter_txt_doc+=1
+ oldtid=c['tid'].to_i
+ else title=''
+ end
+ if @text_search_flag
+ if cgi['view']=~/text/ \
+ or (cgi['view']!~/index/ and cgi['search'] !~/search db/) #% txt body
+ text=if c['suffix'] !~/1/ #seg
+ if @search_for.text1 =~/\S+/ \
+ or q['s1'] =~/\S+/ #% only this branch is working !!
+ unescaped_search=if @search_for.text1 =~/\S+/
+ CGI.unescape(@search_for.text1)
+ elsif q['s1'] =~/\S+/
+ CGI.unescape(q['s1'])
+ else nil
+ end
+ @search_regx=if unescaped_search #check
+ search_regex=[]
+ build=unescaped_search.scan(/\S+/).each do |g|
+ if g.to_s =~/(AND|OR)/
+ search_regex << '|'
+ else search_regex << %{#{g.to_s}}
+ end
+ end
+ search_regex=search_regex.join(' ')
+ search_regex=search_regex.gsub(/\s*\|\s*/,'|')
+ Regexp.new(search_regex, Regexp::IGNORECASE)
+ else nil
+ end
+ else nil
+ end
+ matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/)
+ matched=c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{\\1})
+ else c['body']
+ end
+ %{
Word index links are to html versions of the text the segmented version followed by the scroll (single document) version. [For segmented text references [T1], [T2] or [T3] appearing without a link, indicates that the word appears in a title (or subtitle) of the text (that is identifiable by the appended object citation number).]
+
(The word listing/index is Case sensitive: Capitalized words appear before lower case)
+
+ word (number of occurences) linked references to word within document
+ [if number of occurences exceed number of references - word occurs more than once in at least one reference. Footnote/endnotes are either assigned to the paragraph from which they are referenced or ignored, so it is relevant to check the footnotes referenced from within a paragraph as well.]
+
+
+ (After the page is fully loaded) you can jump directly to a word by appending a hash (#) and the word to the url for this text, (do not forget that words are case sensitive, and may be listed twice (starting with and without an upper case letter)), #your_word # [ http://[web host]/#{@fnb}/concordance.html#your_word ]
+
+WOK
+ end
+ end
+ class Word
+ @@word_previous=''
+ def initialize(word,freq)
+ @word,@freq=word,freq
+ end
+ def html
+ w=if @word.capitalize==@@word_previous
+ %{\n
#{@word}
(#{@freq})
\n\t
}
+ else n=@word.strip.gsub(/\s+/,'_') #also need to convert extended character set to html
+ %{\n
}
+ end
+ @@word_previous=@word.capitalize
+ w
+ end
+ end
+ class Words
+ require "#{SiSU_lib}/defaults" # defaults.rb
+ include SiSU_Viz
+ require "#{SiSU_lib}/html_format" # html_format.rb
+ include SiSU_HTML_Format
+ require "#{SiSU_lib}/sysenv" # sysenv.rb
+ include SiSU_Screen
+ @@dp=nil
+ def initialize(particulars)
+ @particulars=particulars
+ begin
+ @vz=SiSU_Env::Get_init.instance.skin
+ @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array
+ @path="#{@env.path.output}/#{@md.fnb}"
+ @freq=Hash.new(0)
+ @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern
+ @rxp_lv1=/^#{Mx[:lv_o]}1:/ #fix @rxp_lv # Mx[:lv_o]
+ @rxp_lv2=/^#{Mx[:lv_o]}2:/ #fix @rxp_lv # Mx[:lv_o]
+ @rxp_lv3=/^#{Mx[:lv_o]}3:/ #fix @rxp_lv # Mx[:lv_o]
+ @rxp_title=Regexp.new("^#{Mx[:meta_o]}title#{Mx[:meta_c]}\s*(.+?)\s*$")
+ @rxp_t1=Regexp.new('^T1')
+ @rxp_t2=Regexp.new('^T2')
+ @rxp_t3=Regexp.new('^T3')
+ @rxp_excluded1=/#{Mx[:url_o]}\S+?#{Mx[:url_c]}/
+ @rxp_excluded0=/^(?:#{Mx[:fa_bold_o]}|#{Mx[:fa_italics_o]})?(?:to\d+|\d+| |#{Mx[:br_endnotes]}|EOF|#{Mx[:br_eof]}|thumb_\S+|snap_\S+|_+|-+|[(]?(?:ii+|iv|vi+|ix|xi+|xiv|xv|xvi+|xix|xx)[).]?|\S+?_\S+|[\d_]+\w\S+|[\w\d]{1,2}|\d{1,3}\w?|#{@dp}|[0-9a-f]{16,64}|\d{2,3}x\d{2,3}|\S{0,2}sha\d|\S{0,3}\d{4}w\d\d|\b\w\d+|\d_all\b|e\.?g\.?)(?:#{Mx[:fa_bold_c]}|#{Mx[:fa_italics_c]})?$/mi #this regex causes and cures a stack dump in ruby 1.9 !!!
+ @rgx_splitlist=%r{[—.,;:#{Mx[:nbsp]}-]}mi
+ @rgx_scanlist=%r{#{Mx[:fa_italics_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[a-zA-Z0-9"\s]{2,12}#{Mx[:fa_bold_c]}|(?:https?|file)://\S+|<\S+?>|\w+|[a-zA-Z]+}mi
+ rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
+ end
+ end
+ def songsheet
+ begin
+ mkdir_p(@path) unless FileTest.directory?(@path)
+ @file_concordance=File.open("#{@path}/#{@md.fn[:concordance]}",'w')
+ map_para
+ rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
+ ensure
+ @file_concordance.close
+ end
+ end
+ protected
+ def location_scroll(wordlocation,show)
+ %{#{wordlocation}; }
+ end
+ def location_seg(wordlocation,show) ##fix
+ @word_location_seg=wordlocation.gsub(/(.+?)\#(\d+)/,"#{@md.fnl[:pre]}\\1#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}#\\2") unless wordlocation.nil?
+ case wordlocation
+ when @rxp_t1
+ %{[H]#{show}, }
+ when @rxp_t2
+ %{[H]#{show}, }
+ when @rxp_t3
+ %{[H]#{show}, }
+ else %{#{show}, }
+ end
+ end
+ def map_para
+ @seg,ocn=nil,nil
+ @word_map={}
+ @dal_array.each do |line|
+ if defined? line.ocn \
+ and line.ocn.to_s =~/\d/
+ if line.is =~/heading/ \
+ and line.ln==4
+ @seg=line.name
+ end
+ ocn=line.ocn.to_s
+ if ocn =~/\d+/ \
+ and ocn !~/^0$/
+ line.obj.gsub!(/#{@rxp_excluded1}/,' ')
+ line.obj=line.obj.split(@rgx_splitlist).join(' ') #%take in word or other match
+ for word in line.obj.scan(@rgx_scanlist) #%take in word or other match
+ word.gsub!(/#{Mx[:lnk_o]}|#{Mx[:lnk_c]}|#{Mx[:url_o]}|#{Mx[:url_c]}/,'')
+ word.gsub!(/#{Mx[:fa_o]}\S+?#{Mx[:fa_o_c]}/,'')
+ word.gsub!(/#{Mx[:fa_c_o]}\S+?#{Mx[:fa_c]}/,'')
+ word.gsub!(/#{Mx[:gl_o]}#[a-z]+#{Mx[:gl_c]}/,'')
+ word.gsub!(/#{Mx[:gl_o]}#[0-9]+#{Mx[:gl_c]}/,'')
+ word.gsub!(/[0-9a-f]{10,}/,' ') if word =~/[0-9]/
+ word.gsub!(/#{Mx[:br_line]}/,' ')
+ word.gsub!(/^ +/,'')
+ word.gsub!(/^\S$/,'')
+ word=nil if word.empty?
+ word=nil if word =~@rxp_excluded0 #watch
+ word=nil if word =~/^\S$/
+ if word
+ word.gsub!(/#{Mx[:br_nl]}|#{Mx[:br_line]}/,' ')
+ word.gsub!(/#{Mx[:fa_o]}[a-z]{1,7}#{Mx[:fa_o_c]}|#{Mx[:fa_c_o]}[a-z]{1,7}#{Mx[:fa_c]}/,'')
+ word.gsub!(/#{Mx[:en_a_o]}(?:\d|[*+])*|#{Mx[:en_b_o]}(?:\d|[*+])*|#{Mx[:en_a_c]}|#{Mx[:en_b_c]}/mi,'')
+ word.gsub!(/#{Mx[:fa_o]}\S+?#{Mx[:fa_o_c]}/,''); word.gsub!(/#{Mx[:fa_c_o]}\S+?#{Mx[:fa_c]}/,'')
+ word.gsub!(/<\/?\S+?>/,'')
+ word.gsub!(/^\@+/,'')
+ word.strip!
+ word.gsub!(/#{Mx[:tc_p]}.+/,'')
+ word.gsub!(/[\.,;:"]$/,'')
+ word.gsub!(/["]/,'')
+ word.gsub!(/^\s*[\(]/,'')
+ word.gsub!(/[\(]\s*$/,'')
+ word.gsub!(/^(?:See|e\.?g\.?).+/,'')
+ word.gsub!(/^\s*[.,;:]\s*/,'')
+ word.strip!
+ word.gsub!(/^\(?[a-zA-Z]\)$/,'')
+ word.gsub!(/^\d+(st|nd|rd|th)$/,'')
+ word.gsub!(/^(\d+\.?)+$/, '')
+ word.gsub!(/#{Mx[:mk_o]}|#{Mx[:mk_c]}/,'')
+ word.gsub!(/:name#\S+/,'')
+ word.gsub!(/^\S$/,'')
+ word=nil if word =~/^\S$/
+ word=nil if word =~/^\s*$/ #watch
+ if word
+ unless word =~/[A-Z][A-Z]/ \
+ or word =~/\w+\s\w+/
+ word.capitalize!
+ end
+ @freq[word] +=1
+ @word_map[word] ||= []
+ if line !~@rxp_lv1 \
+ and line !~@rxp_lv2 \
+ and line !~@rxp_lv3 #fix @rxp_lv # Mx[:lv_o]
+ @word_map[word] << location_seg("#{@seg}\##{ocn}",ocn)
+ else
+ @word_map[word] << case line
+ when @rxp_lv1; location_seg('T1',ocn) #fix @rxp_lv # Mx[:lv_o]
+ when @rxp_lv2; location_seg('T2',ocn) #fix @rxp_lv # Mx[:lv_o]
+ when @rxp_lv3; location_seg('T3',ocn) #fix @rxp_lv # Mx[:lv_o]
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ scr=' scroll: doc# '
+ seg=''
+ @file_concordance << SiSU_Concordance::Source::Doc_title.new(@particulars).create
+ alph=%W[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
+ @file_concordance << '
}
+ for word in @freq.keys.sort! {|a,b| a.downcase<=>b.downcase}
+ f=/^(\S)/.match(word)[1]
+ if letter < f.upcase
+ while letter < f.upcase
+ if alph.length > 0
+ letter=alph.shift
+ @file_concordance << %{\n
}
+ the_idx.each do |i|
+ i.each do |x|
+ if x.class==String
+ f=/^(\S)/.match(x)[1]
+ if letter < f
+ while letter < f
+ if alph.length > 0
+ letter=alph.shift
+ idx[:html] << %{\n
'
+ idx[:xhtml][@r]=idx[:xhtml][@r] + ''
+ end
+ end
+ end
+ idx
+ @x +=1
+ end
+ end
+ end
+ print "\n" if @md.cmd =~/V/
+ idx
+ end
+ def screen_print(the_idx)
+ the_idx.each do |i|
+ i.each do |x|
+ if x.class==String
+ print "\n" + x + ', '
+ elsif x.class==Array
+ p 'array error? -->'
+ print x
+ elsif x.class==Hash
+ if x['term_node_lev1'].class==Array
+ x['term_node_lev1'].each do |a|
+ if a[:range]
+ print a[:range] + ', '
+ elsif a[:ocn]
+ print a[:ocn] + ', '
+ else p 'error'
+ end
+ end
+ end
+ if x['term_node_lev2']
+ m=x['term_node_lev2']
+ m=m.sort
+ m.each do |k,y|
+ if k !~/term_node_lev1/
+ print "\n\t" + k + ', '
+ y.each do |z|
+ if z[:range]
+ print z[:range] + ', '
+ elsif z[:ocn]
+ print z[:ocn] + ', '
+ else p 'error'
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ def output_idx(idx)
+ if @md.book_idx
+ path="#{@env.path.output}/#{@md.fnb}"
+ Dir.mkdir(path) unless FileTest.directory?(path)
+ puts "#{path}/#{@md.fn[:book_idx_html]} #{__FILE__}::#{__LINE__}"
+ html_index_file=File.new("#{path}/#{@md.fn[:book_idx_html]}",'w')
+ idx[:html].each {|x| html_index_file << x }
+ html_index_file.close
+ end
+ end
+ def clean_and_insert_index(data,sisu_markup_idx)
+ tuned_file=[]
+ data.each do |dob|
+ tuned_file << dob
+ if dob.obj =~/#{Mx[:br_endnotes]}/ \
+ and sisu_markup_idx
+ sisu_markup_idx.each do |idx|
+ tuned_file << idx
+ end
+ end
+ end
+ tuned_file
+ end
+ def clean_index(data) #check on use of dob
+ tuned_file=[]
+ data.each do |para|
+ para.gsub!(/\n*#{@rgx_idx}/m,'')
+ tuned_file << para
+ end
+ tuned_file
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/dal_images.rb b/lib/sisu/v2/dal_images.rb
new file mode 100644
index 00000000..1e474010
--- /dev/null
+++ b/lib/sisu/v2/dal_images.rb
@@ -0,0 +1,158 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: system environment, resource control and configuration details
+
+=end
+module SiSU_images
+ class Images
+ #require 'RMagick'
+ #include Magick
+ def initialize(md,data)
+ @md,@data=md,data
+ end
+ def images
+ data=@data
+ tuned_file=[]
+ @rmgk=false
+ imagemagick_=SiSU_Env::Info_settings.new.program?('rmagick')
+ if imagemagick_
+ begin
+ @rmgk=SiSU_Env::Load.new('RMagick').prog
+ rescue
+ @rmgk=false
+ end
+ else
+ if @md.cmd =~/[vVM]/
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'use of RMagick is not enabled in sisurc.yml')
+ tell.warn
+ end
+ end
+ data.each do |dob|
+ unless dob.is =~/^table/
+ dob.obj.strip!
+ if dob.obj =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/
+ if dob.obj !~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+\s+/
+ m=/#{Mx[:lnk_o]}\s*(\S+\.(?:png|jpg|gif))/
+ if imagemagick_
+ imgs=dob.obj.scan(m).flatten
+ img_col=img_row=nil
+ images=imgs.each do |image|
+ dir=SiSU_Env::Info_env.new(@md.fns)
+ path_image=[dir.path.image_source_local_tex,dir.path.image_source_remote_tex,dir.path.image_source_tex]
+ image_path=nil
+ path_image.each do |image_path|
+ break if FileTest.exist?("#{image_path}/#{image}")
+ end
+ if FileTest.exist?("#{image_path}/#{image}")
+ if @rmgk
+ img=Magick::ImageList.new("#{image_path}/#{image}")
+ img_col,img_row=img.columns,img.rows
+ else
+ if @md.cmd =~/[vVM]/
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'RMagick not present, will attempt to use imagemagick (identify) directly')
+ tell.warn
+ end
+ imgk=SiSU_Env::System_call.new.imagemagick
+ gmgk=SiSU_Env::System_call.new.graphicksmagick
+ if imgk or gmgk
+ if imgk
+ imgsys=`identify #{image_path}/#{image}`.strip #system call
+ elsif gmgk
+ imgsys=`gm identify #{image_path}/#{image}`.strip #system call
+ end
+ img_col,img_row=/(\d+)x(\d+)/m.match(imgsys)[1,2]
+ img_col,img_row=img_col.to_i,img_row.to_i
+ end
+ end
+ row=((img && defined? img.rows) ? img.rows : img_row)
+ col=((img && defined? img.columns) ? img.columns : img_col)
+ if img_col > img_row #landscape
+ if img_col> 640
+ img_col=640
+ img_row=((1.00*img_col/col)*row).round
+ end
+ else #portrait
+ if img_col> 640
+ img_col=640
+ img_row=((1.00*img_col/col)*row).round
+ end
+ if img_row > 640
+ img_row=640
+ img_col=((1.00*img_row/row)*col).round
+ end
+ end
+ dob.obj.gsub!(/(#{image})/,"#{image} #{img_col}x#{img_row}")
+ else dob.obj.gsub!(/#{Mx[:lnk_o]}\s*(\S+)\.(png|jpg|gif).+?#{Mx[:lnk_c]}(#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/,'[ \1 (\2 missing) ]')
+ end
+ end
+ else
+ images=dob.obj.scan(m) do |image|
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'where image dimensions have not been provided RMagick or imagemagick is required',image)
+ tell.warn #unless @opt.cmd =~/q/
+ end
+ end
+ end
+ end
+ dob.obj.gsub!(/(#{Mx[:lnk_o]})\s*(\S+\.(?:png|jpg|gif))\s+/i,'\1\2 ') if dob.obj =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif).+?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/
+ end
+ tuned_file << dob unless dob.nil?
+ end
+ tuned_file
+ end
+ end
+end
+__END__
+imgsys=`identify #{image_path}/#{image}`.strip
diff --git a/lib/sisu/v2/dal_metadata.rb b/lib/sisu/v2/dal_metadata.rb
new file mode 100644
index 00000000..77b58f86
--- /dev/null
+++ b/lib/sisu/v2/dal_metadata.rb
@@ -0,0 +1,79 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: system environment, resource control and configuration details
+
+=end
+module SiSU_metadata
+ class Metadata
+ def initialize(md,metad)
+ @md,@metadata=md,metad
+ l=SiSU_Env::Standardise_language.new.file_to_language(md.fns)
+ language=l[:l]
+ @tr=SiSU_Translate::Source.new(md,language)
+ end
+ def make_para(obj,ocn)
+ h={:obj=>obj,:ocn=>0}
+ SiSU_document_structure::Object_para.new.paragraph(h)
+ end
+ def make_heading(obj,ocn,name,lv,ln)
+ h={:lv=>lv,:ln=>ln,:name=>name,:obj=>obj,:ocn=>0}
+ SiSU_document_structure::Object_heading.new.heading(h)
+ end
+ def metadata
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/dal_numbering.rb b/lib/sisu/v2/dal_numbering.rb
new file mode 100644
index 00000000..ea68fd22
--- /dev/null
+++ b/lib/sisu/v2/dal_numbering.rb
@@ -0,0 +1,446 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+ ** Description: system environment, resource control and configuration details
+
+=end
+module SiSU_numbering
+ class Numbering
+ attr_accessor :obj,:osp,:ocn,:lv,:name,:index,:comment
+ def initialize(md,data)
+ @md,@data=md,data
+ @obj=@type=@ocn=@lv=@name=@index=@comment=nil
+ end
+ def numbering_song
+ data=@data
+ data=number_plaintext_para(data)
+ data=auto_number_heading_ie_title(data.compact) #tr issue
+ data=ocn(data.compact) #watch
+ data=xml(data.compact)
+ data=minor_numbering(data.compact)
+ data,tags_map,ocn_html_seg_map=name_para_seg_filename(data)
+ data=set_heading_top(data) unless @md.set_heading_top
+ [data,tags_map,ocn_html_seg_map]
+ end
+ def number_plaintext_para(data)
+ @tuned_file=[]
+ data.each do |dob|
+ if dob.of !~/(?:group|comment|layout)/ and dob.ocn_ #and dob.obj !~ /#{Mx[:gr_o]}Th|#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}/ #FIX
+ dob.obj.gsub!(/(.+)\n/,'\1 ') #messy, but idea is that tables should retain breaks
+ end
+ unless dob.obj.class==Array
+ dob.obj.gsub!(/^\s+/,'')
+ dob.obj.gsub!(/\s$/,"\n")
+ end
+ @tuned_file << dob
+ end
+ @tuned_file=@tuned_file.flatten
+ end
+ def number_sub_heading(dob,num,title_no)
+ case dob.name
+ when /-/; dob.obj.gsub!(/^/,"#{title_no} ")
+ when /^#/; dob.obj.gsub!(/^/,"#{title_no} ")
+ when /^[a-z_\.]+/
+ dob.obj.gsub!(/^/,"#{title_no} ")
+ else
+ dob.name=title_no if dob.name=~/^$/ #where title contains title number
+ dob.obj.gsub!(/^/,"#{title_no} ") if title_no =~/\d+/ #main, where title number is to be provided #watch changed placement
+ end
+ if @md.toc_lev_limit \
+ and @md.toc_lev_limit < num
+ dob.obj.gsub!(/^/,'!_ ') #bold line, watch
+ end
+ dob
+ end
+ def heading_tag_clean(heading_tag)
+ heading_tag.gsub!(/[ ]+/,'_')
+ heading_tag.gsub!(/["']/,'')
+ heading_tag.gsub!(/[\/]/,'-')
+ heading_tag.gsub!(/#{Mx[:fa_bold_o]}|#{Mx[:fa_bold_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_italics_o]}|#{Mx[:fa_italics_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_underscore_o]}|#{Mx[:fa_underscore_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_cite_o]}|#{Mx[:fa_cite_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_insert_o]}|#{Mx[:fa_insert_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_strike_o]}|#{Mx[:fa_strike_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_superscript_o]}|#{Mx[:fa_superscript_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_subscript_o]}|#{Mx[:fa_subscript_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:fa_hilite_o]}|#{Mx[:fa_hilite_c]}/,'')
+ heading_tag.gsub!(/#{Mx[:gl_bullet]}/,'')
+ heading_tag
+ end
+ def auto_number_heading_ie_title(data) #also does some segment naming
+ @tuned_file=[]
+ if defined? @md.make.num_top \
+ and @md.make.num_top \
+ and @md.make.num_top !~/^$/
+ input||=@md.make.num_top
+ end
+ num_top=(input ? input.to_i : nil)
+ t_no1=t_no2=t_no3=t_no4=0
+ if num_top
+ no1=num_top; no2=(num_top + 1); no3=(num_top + 2); no4=(num_top + 3)
+ end
+ t_not=0
+ data.compact!
+ data.each do |dob| #@md.seg_names << [additions to segment names]
+ title_no=nil
+ dob=SiSU_document_structure_extract::Structure.new(@md,dob).structure_markup #must happen earlier, node info etc. require
+ if dob.is =='heading' \
+ and dob.autonum_ \
+ and defined? @md.make.num_top \
+ and @md.make.num_top !~/^$/
+ if dob.ln==no1
+ @subnumber=1
+ @subnumber=0 if dob.ln==no1
+ end
+ if dob.ln.to_s =~/^[1-6]/ \
+ and not dob.toc_ \
+ and dob.obj !~/#{Mx[:fa_o]}(?:~#|-#)#{Mx[:fa_c]}/ # <-- fix
+ if dob.ln==no1
+ t_no1+=1; t_no2=0; t_no3=0
+ title_no="#{t_no1}"
+ if not @md.seg_names.nil? \
+ and not @md.seg_names.include?(title_no)
+ if dob.ln==no1
+ dob.name="#{title_no}" if not dob.name
+ dob.tags=[title_no,dob.tags].flatten if title_no !~/^\d+$/ #check whether will work across file types with stop signs
+ tag=dob.obj.gsub(/(Article|Clause|Section|Chapter)\s+/,"\\1_#{title_no}").downcase
+ tag=heading_tag_clean(tag)
+ dob.tags=[tag,dob.tags].flatten if tag !~/^\d+$/ #check whether will work across file types with stop signs
+ (dob.obj =~/(Article|Clause|Section)\s+/) \
+ ? (dob.obj.gsub!(/(Article|Clause|Section)\s+/,"\\1 #{title_no} ")) \
+ : (dob.obj.gsub!(/^/,"#{title_no}. ")) #fix stop later
+ end
+ if dob.ln !=no1 \
+ and dob.obj =~/^[\d.]+\s/ #fix -> if the title starts with a numbering scheme, do not auto-number, review
+ dob.name ="#{title_no}" if not dob.name
+ dob.tags=[title_no,dob.tags].flatten if title_no !~/^\d+$/ #check whether will work across file types with stop signs
+ dob.obj.gsub!(/^/,"#{title_no}. ")
+ end
+ @md.seg_names << title_no
+ end
+ if dob.ln!=no1 \
+ and dob.name!~/^[a-z_\.]+$/ \
+ and dob.obj !~/[A-Z]\.?\s/ #bug -> tmp fix, excludes A. B. C. lettering, but not roman numerals, is arbitrary, review required # not fixed, work on
+ dob.tags=[title_no,dob.tags].flatten if title_no !~/^\d+$/ #check whether will work across file types with stop signs
+ dob.obj.gsub!(/^/i,"#{title_no}. ")
+ end
+ end
+ if dob.ln==no1 #watch because here you change dob.name
+ dob.tags=["h#{title_no}",dob.tags].flatten #check whether will work across file types with stop signs
+ end
+ if dob.ln==no2 #watch because here you change dob.name
+ t_no2+=1; t_no3=0
+ title_no="#{t_no1}.#{t_no2}"
+ dob.tags=["h#{title_no}",dob.tags].flatten #check whether will work across file types with stop signs
+ dob=number_sub_heading(dob,no2,title_no)
+ end
+ if dob.ln==no3 #watch because here you change dob.name
+ t_no3+=1
+ title_no="#{t_no1}.#{t_no2}.#{t_no3}"
+ dob.tags=["h#{title_no}",dob.tags].flatten #check whether will work across file types with stop signs
+ dob=number_sub_heading(dob,no3,title_no)
+ end
+ elsif dob.ln.to_s =~/^[1-6]/ \
+ and dob.name =~ /^[\w-]+-/ # endnotes, watch2005# endnotes, watch2005
+ dob.tags=[dob.name,dob.tags].flatten if dob.name !~/^\d+$/ #check whether will work across file types with stop signs
+ dob.name.gsub(/^([a-z_\.]+)-$/,'\1')
+ end
+ elsif dob.is =='heading' \
+ and dob.autonum_ \
+ and @md.markup =~/num_extract/ #AS DANGEROUS force enable with document, note already does this type of numbering for cisg, locate and coordinate logic, is currently misplaced in code, chengwei inspired 2004w23/4
+ #here lies a bug, as is nil when run from -Dv --update, FIX
+ if (dob.name.nil? or dob.name.empty?) \
+ and dob.ln.to_s =~/^[1-9]/ \
+ and dob.obj =~ /^([\d\.]+)/ #risky (must be unique) consider output to 4~~\d instead of 4~\d
+ dob.name=$1
+ dob.tags=[dob.name,dob.tags].flatten if dob.name !~/^\d+$/ #check whether will work across file types with stop signs
+ end
+ if @md.toc_lev_limit
+ end
+ elsif defined? dob.name \
+ and dob.name
+ dob.tags=[dob.name,dob.tags].flatten if dob.name !~/^\d+$/ #check whether will work across file types with stop signs
+ end
+ dob.tags=dob.tags.uniq if defined? dob.tags
+ @tuned_file << dob
+ end
+ @tuned_file=@tuned_file.flatten
+ end
+ def ocn(data) #and auto segment numbering increment
+ @tuned_file=SiSU_document_structure_extract::OCN.new(@md,data).ocn
+ @tuned_file
+ end
+ def xml(data)
+ @tuned_file=SiSU_document_structure_extract::XML.new(@md,data).dom
+ @tuned_file
+ end
+ def minor_numbering(data) #and auto segment numbering increment
+ @tuned_file=[]
+ number_small,letter_small=0,0
+ letter=%w( a b c d e f g h i j k l m n o p q r s t u v w x y z )
+ data.each do |dob|
+ if dob.of =~/heading|para|group/
+ if dob.is =='heading' \
+ and dob.ln.to_s=~/^[1-9]/ #% sub-number system, (baby numbering) reset with any change of major number (more obviously should be placed in number titles, but that is conditionally executed, check and move later)
+ number_small,letter_small=0,0
+ elsif dob.is =~/para/
+ if dob.obj =~/^#[ 1]/ \
+ and dob.obj !~/^#\s+(?:~#)?$/
+ letter_small=0
+ number_small=0 if dob.obj =~ /^#1/
+ number_small+=1
+ dob.obj.gsub!(/^#[ 1]/,"#{number_small}. ") #change 2004
+ end
+ if dob.obj =~/^_# /
+ dob.obj.gsub!(/^_# /,"#{letter[letter_small]}. ") #change 2004
+ dob.indent='1'
+ letter_small+=1
+ end
+ end
+ end
+ @tuned_file << dob
+ end
+ @tuned_file=@tuned_file.flatten
+ end
+ def name_para_seg_filename(data) #segment naming, remaining
+ # paragraph name/numbering rules
+ # manual naming overrides, manual naming may be
+ # alpha-numeric characters mixed,
+ # numeric only (a number), if
+ # all segments have been named,
+ # the numbers used are over 1000 or
+ # it is not minded that auto-numbering uses a funny scheme for naming segments (not yet implemented)
+ # [for now a warning is printed for such documents on use of maintenance or very-verbose flag]
+ # auto-naming takes the form of giving numbers to segments
+ # the rules for which are as follows
+ # if the title/heading text starts with a numeric, then that is used (1 3.1 3rd etc.)
+ # otherwise the level 4 segment number from the embedded document structure info is used
+ # if there is none a sequential number is designated, preceded by an underscore
+ @tuned_file,@unique_auto_name=[],[]
+ tags={}
+ art_filename_auto=1
+ @counter=1
+ if not @md.seg_autoname_safe and @md.cmd =~/[MV]/
+ puts 'manual segment names, numbers used as names, risk warning (segmented html)'
+ end
+ ocn_html_seg=[]
+ data.each do |dob|
+ if dob.is=='heading' \
+ and dob.ln \
+ and dob.ln.to_s =~/^[456]/
+ if dob.ln==4 \
+ and not dob.name \
+ and not @md.set_heading_seg
+ @md.set_heading_seg=true
+ end
+ if dob.name !~/^\S+/ \
+ and dob.obj =~/^\s*(?:\S+\s+)?([\d.,:-]+)/m #heading starts with a recognised numeric or word followed by a recognised numerical construct, use that as name
+ possible_seg_name=$1
+ possible_seg_name.gsub!(/(?:[:,-]|\W)/,'.')
+ possible_seg_name.gsub!(/\.$/,'')
+ if not @md.seg_names.nil? \
+ and not @md.seg_names.include?(possible_seg_name)
+ dob.name=possible_seg_name
+ dob.tags=[dob.name,dob.tags].flatten if dob.name !~/^\d+$/
+ @md.seg_names << possible_seg_name
+ else puts 'warn, there may be a conflicting numbering scheme' if @md.cmd =~/[VM]/
+ end
+ end
+ if dob.ln==4 \
+ and dob.name #extract segment name from embedded document structure info
+ if not @md.seg_names.nil? \
+ and not @md.seg_names.include?(dob.name)
+ dob.tags=[dob.name,dob.tags].flatten if dob.name !~/^\d+$/
+ @md.seg_names << dob.name
+ end
+ end
+ if dob.ln==4 \
+ and not dob.name #if still no segment name, provide a numerical one
+ pf='_' #pg='' #may use e.g. '' or '~' or '_'
+ segn_auto="#{pf}#{art_filename_auto.to_s}"
+ if not @md.seg_names.nil? \
+ and not @md.seg_names.include?(segn_auto)
+ dob.name=segn_auto
+ dob.tags=[dob.name,dob.tags].flatten if dob.name !~/^\d+$/ #check whether will work across file types with stop signs
+ @md.seg_names << segn_auto
+ else puts 'segment name (numbering) error'
+ end
+ art_filename_auto+=1
+ end
+ if dob.ln==4 \
+ and not dob.name #should not occur
+ puts "e r r o r -\t#{__FILE__}::#{__LINE__}\n#{dob.inspect}"
+ end
+ end
+ if dob.is =~/heading/ \
+ and dob.ln==4
+ @seg=dob.name
+ end
+ @tuned_file << if dob.is=='heading' \
+ and (@md.pagenew or @md.pagebreak)
+ m=dob.ln.to_s
+ dob_tmp=[]
+ if @md.pagenew.inspect =~/#{m}/
+ dob_tmp << SiSU_document_structure::Object_layout.new.break(Hx[:br_page_new]) << dob
+ elsif @md.pagebreak.inspect =~/#{m}/
+ dob_tmp << SiSU_document_structure::Object_layout.new.break(Hx[:br_page]) << dob
+ end
+ para_result=unless dob_tmp.length > 0; dob
+ else dob_tmp
+ end
+ else dob
+ end
+ if defined? dob.ocn \
+ and dob.ocn
+ ocn_html_seg[dob.ocn]=if dob.is =~/heading/
+ x=if dob.ln =~/[1-3]/
+ {:seg=>nil,:level=> dob.ln}
+ else #elsif dob.ln =~/[4-6]/
+ {:seg=>@seg,:level=> dob.ln}
+ end
+ else
+ {:seg=>@seg,:level=>nil}
+ end
+ end
+ dob.tags=dob.tags.uniq if defined? dob.tags
+ if defined? dob.tags \
+ and dob.tags.length > 0
+ @segname=((dob.is=='heading'|| dob.is=='heading_insert') && dob.ln==4 && (defined? dob.name)) \
+ ? (dob.name) \
+ : @segname
+ dob.tags.each do |x|
+ tags[x]={:ocn=>dob.ocn.to_s,:segname=>@segname} #@tags[x.to_s]=[dob.ocn.to_s,@segname.to_s]
+ end
+ end
+ dob
+ end
+ ocn_html_seg.each_with_index do |ocn,i|
+ if ocn \
+ and ocn[:level].to_s=~/[1-3]/
+ ocn_seg=nil
+ (1..4).each do |x|
+ if ocn_html_seg[i+x] and ocn_html_seg[i+x][:level]==4
+ ocn[:seg]=ocn_html_seg[i+x][:seg]
+ end
+ end
+ end
+ end
+ if @md.seg_names.length > 0
+ @md.set_heading_seg=true
+ end
+ tuned_file=@tuned_file.flatten
+ [tuned_file,tags,ocn_html_seg]
+ end
+ def set_heading_top(data) #% make sure no false positives
+ unless @md.set_heading_top
+ puts "\tdocument contains no top level heading, (will have to manufacture one)" if @md.cmd =~/[MV]/
+ @tuned_file=[]
+ data.each do |t_o|
+ unless @md.set_heading_top
+ if t_o !~/^(?:#{Rx[:meta]}|@\S+:)\s/m \
+ and t_o !~/\A\s*\Z/m
+ @md.set_heading_top=true
+ head=@md.title.main ? ([@lv='1',@obj=@md.title.main]) : ([@lv='1',@obj='[no title provided]'])
+ @tuned_file << head
+ end
+ end
+ @tuned_file << t_o
+ end
+ @tuned_file=@tuned_file.flatten
+ end
+ end
+ def set_heading_seg(data) #% make sure no false positives
+ unless @md.set_heading_seg
+ puts "\tdocument contains no segment level, (will have to manufacture one)" if @md.cmd =~/[MV]/
+ @tuned_file=[]
+ data.each do |dob|
+ unless @md.set_heading_seg
+ if defined? dob.ln and dob.ln.to_s !~/^[123]/m \
+ and dob.obj !~/\A\s*\Z/m \
+ and dob.is !='layout'
+ @md.set_heading_seg=true
+ head=if @md.title.main ; dob.ln,dob.name,dob.obj=4,'seg',@md.title.main
+ else dob.ln,dob.name,dob.obj=4,'seg','[segment]'
+ end
+ @tuned_file << head
+ end
+ end
+ @tuned_file << dob
+ end
+ @tuned_file=@tuned_file.flatten
+ end
+ end
+ def set_header_title(data) #% make sure no false positives
+ unless @md.set_header_title
+ puts "\t no document title provided, (will have to manufacture one)" if @md.cmd =~/[MV]/
+ @tuned_file=[]
+ data.each do |t_o|
+ unless @md.set_header_title
+ if t_o !~/^%{1,2}\s/m \
+ and t_o !~/\A\s*\Z/m
+ @tuned_file << "#{Mx[:meta_o]}title#{Mx[:meta_c]} #{@md.heading_seg_first}"
+ @md.title.main=@md.heading_seg_first
+ @md.set_header_title=true
+ end
+ end
+ @tuned_file << t_o
+ end
+ @tuned_file=@tuned_file.flatten
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v2/dal_substitutions_and_insertions.rb b/lib/sisu/v2/dal_substitutions_and_insertions.rb
new file mode 100644
index 00000000..c699a17c
--- /dev/null
+++ b/lib/sisu/v2/dal_substitutions_and_insertions.rb
@@ -0,0 +1,154 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see .
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+
+
+
+ * Download:
+