diff --git a/lib/sisu/v3/cgi_sqlite.rb b/lib/sisu/v3/cgi_sqlite.rb
index 64124cc8..a046fe31 100644
--- a/lib/sisu/v3/cgi_sqlite.rb
+++ b/lib/sisu/v3/cgi_sqlite.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/character_encoding.rb b/lib/sisu/v3/character_encoding.rb
index f62d1dc3..0b565fb9 100644
--- a/lib/sisu/v3/character_encoding.rb
+++ b/lib/sisu/v3/character_encoding.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/composite.rb b/lib/sisu/v3/composite.rb
index 6dfcf0b2..95be6d1e 100644
--- a/lib/sisu/v3/composite.rb
+++ b/lib/sisu/v3/composite.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb
index c02824d2..a94531b6 100644
--- a/lib/sisu/v3/concordance.rb
+++ b/lib/sisu/v3/concordance.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/conf.rb b/lib/sisu/v3/conf.rb
index 3bae2179..05bc8608 100644
--- a/lib/sisu/v3/conf.rb
+++ b/lib/sisu/v3/conf.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/constants.rb b/lib/sisu/v3/constants.rb
index 1202e47c..d39c56ea 100644
--- a/lib/sisu/v3/constants.rb
+++ b/lib/sisu/v3/constants.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/css.rb b/lib/sisu/v3/css.rb
index e86c3076..348c89e7 100644
--- a/lib/sisu/v3/css.rb
+++ b/lib/sisu/v3/css.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal.rb b/lib/sisu/v3/dal.rb
index 5c059677..50cf94f9 100644
--- a/lib/sisu/v3/dal.rb
+++ b/lib/sisu/v3/dal.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_character_check.rb b/lib/sisu/v3/dal_character_check.rb
index c2109b9a..70cddf91 100644
--- a/lib/sisu/v3/dal_character_check.rb
+++ b/lib/sisu/v3/dal_character_check.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_doc_objects.rb b/lib/sisu/v3/dal_doc_objects.rb
index 8a330f13..4e8b5c0f 100644
--- a/lib/sisu/v3/dal_doc_objects.rb
+++ b/lib/sisu/v3/dal_doc_objects.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb
index 91110b44..c7d3087c 100644
--- a/lib/sisu/v3/dal_doc_str.rb
+++ b/lib/sisu/v3/dal_doc_str.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_endnotes.rb b/lib/sisu/v3/dal_endnotes.rb
index 58ac8d0c..53b6e8d3 100644
--- a/lib/sisu/v3/dal_endnotes.rb
+++ b/lib/sisu/v3/dal_endnotes.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_expand_insertions.rb b/lib/sisu/v3/dal_expand_insertions.rb
index cfd8fe54..e48acd47 100644
--- a/lib/sisu/v3/dal_expand_insertions.rb
+++ b/lib/sisu/v3/dal_expand_insertions.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_hash_digest.rb b/lib/sisu/v3/dal_hash_digest.rb
index fe432974..2c983919 100644
--- a/lib/sisu/v3/dal_hash_digest.rb
+++ b/lib/sisu/v3/dal_hash_digest.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_idx.rb b/lib/sisu/v3/dal_idx.rb
index ad1b5efb..5845437e 100644
--- a/lib/sisu/v3/dal_idx.rb
+++ b/lib/sisu/v3/dal_idx.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_images.rb b/lib/sisu/v3/dal_images.rb
index b05c7ec7..34157f74 100644
--- a/lib/sisu/v3/dal_images.rb
+++ b/lib/sisu/v3/dal_images.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_metadata.rb b/lib/sisu/v3/dal_metadata.rb
index 2e68c944..8647a075 100644
--- a/lib/sisu/v3/dal_metadata.rb
+++ b/lib/sisu/v3/dal_metadata.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_numbering.rb b/lib/sisu/v3/dal_numbering.rb
index 52cb4c7f..4b12793f 100644
--- a/lib/sisu/v3/dal_numbering.rb
+++ b/lib/sisu/v3/dal_numbering.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_substitutions_and_insertions.rb b/lib/sisu/v3/dal_substitutions_and_insertions.rb
index cf3309ec..5844071f 100644
--- a/lib/sisu/v3/dal_substitutions_and_insertions.rb
+++ b/lib/sisu/v3/dal_substitutions_and_insertions.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb
index b887904e..2d2a8430 100644
--- a/lib/sisu/v3/dal_syntax.rb
+++ b/lib/sisu/v3/dal_syntax.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_columns.rb b/lib/sisu/v3/db_columns.rb
index 99118f92..10b9635f 100644
--- a/lib/sisu/v3/db_columns.rb
+++ b/lib/sisu/v3/db_columns.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_create.rb b/lib/sisu/v3/db_create.rb
index 5f8b2465..71d0ce09 100644
--- a/lib/sisu/v3/db_create.rb
+++ b/lib/sisu/v3/db_create.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_dbi.rb b/lib/sisu/v3/db_dbi.rb
index f4d5c891..c290c9e3 100644
--- a/lib/sisu/v3/db_dbi.rb
+++ b/lib/sisu/v3/db_dbi.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_drop.rb b/lib/sisu/v3/db_drop.rb
index cbe604e8..1baecb73 100644
--- a/lib/sisu/v3/db_drop.rb
+++ b/lib/sisu/v3/db_drop.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_import.rb b/lib/sisu/v3/db_import.rb
index 856817e1..a78a0656 100644
--- a/lib/sisu/v3/db_import.rb
+++ b/lib/sisu/v3/db_import.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_indexes.rb b/lib/sisu/v3/db_indexes.rb
index 64a51474..5e387e27 100644
--- a/lib/sisu/v3/db_indexes.rb
+++ b/lib/sisu/v3/db_indexes.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_load_tuple.rb b/lib/sisu/v3/db_load_tuple.rb
index f7f39c08..812e8e5a 100644
--- a/lib/sisu/v3/db_load_tuple.rb
+++ b/lib/sisu/v3/db_load_tuple.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_remove.rb b/lib/sisu/v3/db_remove.rb
index a390b2cc..8147cda1 100644
--- a/lib/sisu/v3/db_remove.rb
+++ b/lib/sisu/v3/db_remove.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_select.rb b/lib/sisu/v3/db_select.rb
index 75a0a718..bce2b21c 100644
--- a/lib/sisu/v3/db_select.rb
+++ b/lib/sisu/v3/db_select.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/db_sqltxt.rb b/lib/sisu/v3/db_sqltxt.rb
index f4acb2c5..d1705c2b 100644
--- a/lib/sisu/v3/db_sqltxt.rb
+++ b/lib/sisu/v3/db_sqltxt.rb
@@ -4,12 +4,10 @@
* Name: SiSU
* Description: a framework for document structuring, publishing and search
- #___#
* Author: Ralph Amissah
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2011 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -24,7 +22,7 @@
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
+ 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
@@ -33,7 +31,7 @@
If you have Internet connection, the latest version of the GPL should be
available at these locations:
-
+
diff --git a/lib/sisu/v3/db_tests.rb b/lib/sisu/v3/db_tests.rb
index babcd683..0fe1370b 100644
--- a/lib/sisu/v3/db_tests.rb
+++ b/lib/sisu/v3/db_tests.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/dbi.rb b/lib/sisu/v3/dbi.rb
index 7d4a5445..008ac5d4 100644
--- a/lib/sisu/v3/dbi.rb
+++ b/lib/sisu/v3/dbi.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/defaults.rb b/lib/sisu/v3/defaults.rb
index cefab8a1..7278c5f9 100644
--- a/lib/sisu/v3/defaults.rb
+++ b/lib/sisu/v3/defaults.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/digests.rb b/lib/sisu/v3/digests.rb
index eac2e81d..4062b029 100644
--- a/lib/sisu/v3/digests.rb
+++ b/lib/sisu/v3/digests.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/embedded.rb b/lib/sisu/v3/embedded.rb
index 45e96c04..1dcc4fac 100644
--- a/lib/sisu/v3/embedded.rb
+++ b/lib/sisu/v3/embedded.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb
index a5c3f3b4..e0a1d219 100644
--- a/lib/sisu/v3/epub.rb
+++ b/lib/sisu/v3/epub.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/epub_concordance.rb b/lib/sisu/v3/epub_concordance.rb
index 3a961285..66864775 100644
--- a/lib/sisu/v3/epub_concordance.rb
+++ b/lib/sisu/v3/epub_concordance.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb
index 9d55d1d9..40fe8816 100644
--- a/lib/sisu/v3/epub_format.rb
+++ b/lib/sisu/v3/epub_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -598,7 +598,6 @@ module SiSU_EPUB_Format
text-indent: 0em;
}
-
p.it0 {
margin-left: 0em;
margin-top: 6px;
diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb
index 67d0884c..6ad278f4 100644
--- a/lib/sisu/v3/epub_segments.rb
+++ b/lib/sisu/v3/epub_segments.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/epub_tune.rb b/lib/sisu/v3/epub_tune.rb
index 5f50bb39..b348a7bf 100644
--- a/lib/sisu/v3/epub_tune.rb
+++ b/lib/sisu/v3/epub_tune.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/errors.rb b/lib/sisu/v3/errors.rb
index 57b961bd..70ab4666 100644
--- a/lib/sisu/v3/errors.rb
+++ b/lib/sisu/v3/errors.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/git.rb b/lib/sisu/v3/git.rb
index a0e70a97..148b35fc 100644
--- a/lib/sisu/v3/git.rb
+++ b/lib/sisu/v3/git.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/harvest.rb b/lib/sisu/v3/harvest.rb
index ce8880f0..b8b82524 100644
--- a/lib/sisu/v3/harvest.rb
+++ b/lib/sisu/v3/harvest.rb
@@ -9,7 +9,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/harvest_authors.rb b/lib/sisu/v3/harvest_authors.rb
index 08716f2b..996b748c 100644
--- a/lib/sisu/v3/harvest_authors.rb
+++ b/lib/sisu/v3/harvest_authors.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/harvest_topics.rb b/lib/sisu/v3/harvest_topics.rb
index c489092f..de03b615 100644
--- a/lib/sisu/v3/harvest_topics.rb
+++ b/lib/sisu/v3/harvest_topics.rb
@@ -9,7 +9,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/help.rb b/lib/sisu/v3/help.rb
index 27822e20..9dc26aec 100644
--- a/lib/sisu/v3/help.rb
+++ b/lib/sisu/v3/help.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -160,7 +160,7 @@ module SiSU_Help
end
def summary
print <.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+
+
+
+
+
+
+
+ * Hompages:
+
+
+
+ * Download:
+
+
+ * Ralph Amissah
+
+
+
+=end
+module SiSU_Modify
+ class Operations
+ def initialize(cf,files)
+ @cf,@files=cf,files
+ @description="This is a script that contains canned text conversions for reuse"
+ pwd=Dir.pwd
+ @mod_inst='modify_instructions.rb'
+ @modify_instructions_script="#{pwd}/#{@mod_inst}"
+ if FileTest.file?(@modify_instructions_script) ==true
+ puts <<-WOK
+ autoload script: "#{@modify_instructions_script}"
+ used by "ruby #{__FILE__} --convert" if
+ "Extracted.new.modify.modules_and_classes" is used
+ (see "matches_and_replaces")
+ EDIT this file manually
+ [to rebuild run: "ruby #{__FILE__} --build-gsub"]
+
+ WOK
+ else
+ puts <<-WOK
+ autoload script does not exist: "#{@modify_instructions_script}"
+ needed for "ruby #{__FILE__} --convert" if
+ "Extracted.new.modify.modules_and_classes" is used
+ (see "matches_and_replaces")
+ try run: "ruby #{__FILE__} --build-gsub"
+
+ WOK
+ end
+ autoload :Extracted, "./#{@mod_inst}"
+ end
+ def matches_and_replaces #edit manually
+ [
+ #Extracted.new.modify.modules_and_classes,
+ #Extracted.new.modify.modules,
+ #Extracted.new.modify.classes,
+ modify.dates,
+ #modify.modules,
+ #modify.classes,
+ #modify.misc,
+ ]
+ end
+ def message(text)
+ response=''
+ while response !~/yes/
+ print %{
+ #{text}
+ To continue type "yes" [to exit type "no" or "quit"]: }
+ response=File.new('/dev/tty').gets.strip
+ exit if response =~/^(?:quit|no)$/
+ end
+ end
+ def help
+ print < 0
+ @files.each do |i|
+ @new,@matched,@empty1,@empty2=true,false,false,false
+ file=File.open(i,'r')
+ cont=file.readlines
+ file.close
+ @file=File.new(i,'w')
+ cont.each do |t|
+ matches_and_replaces.each do |match_and_replace|
+ match_and_replace.each do |m,r|
+ if t =~m
+ p m.to_s + ' -> ' + r
+ puts "in: #{t}"
+ t.gsub!(m,r) if m and r
+ puts "out: #{t}"
+ end
+ end
+ end
+ if t=~/^\s*$/; @empty1=true
+ else @empty1=false
+ end
+ @file.puts t unless (@empty1==true and @empty2==true)
+ if t=~/^\s*$/; @empty2=true
+ else @empty2=false
+ end
+ end
+ @file.close
+ end
+ end
+ end
+ def report_modules_and_classes
+ @f=nil
+ @structure={}
+ @arr={mod: [], cl: []}
+ @files.each do |f|
+ @new,@matched,@empty1,@empty2=true,false,false,false
+ file=File.open(f,'r')
+ cont=file.readlines
+ file.close
+ cont.each do |t|
+ if f != @f
+ @f=f
+ @mod=nil
+ #puts "---\n#{@f}"
+ @structure[@f]={}
+ end
+ if t =~/^\s*module\s+\S+/
+ @mod=t.match(/^\s*module\s+(\S+)/)[1]
+ #puts ' ' + @mod
+ @arr[:mod] << @mod
+ @structure[@f].store(@mod,[])
+ #@structure[@f] = {@mod => []}
+ end
+ if t =~/^\s*class\s+\S+/
+ cl=t.match(/^\s*class\s+(\S+)/)[1]
+ #puts ' ' + cl
+ @arr[:cl] << cl
+ @structure[@f][@mod] << cl
+ end
+ end
+ end
+ @structure.sort.each do |fl,modules|
+ puts "---\n" + fl
+ modules.sort.each do |mod,classes|
+ puts ' ' + mod
+ classes.sort.each do |cl|
+ puts ' ' + cl
+ end
+ end
+ end
+ puts '---'
+ puts 'number of modules: ' + @arr[:mod].length.to_s + ', unique: ' + @arr[:mod].uniq.length.to_s
+ puts 'number of classes: ' + @arr[:cl].length.to_s + ', unique: ' + @arr[:cl].uniq.length.to_s
+ end
+ def build_search_and_replace_method_for_modules_and_classes
+ @f=nil
+ @structure={}
+ @arr={mod: [], cl: []}
+ @files.each do |f|
+ @new,@matched,@empty1,@empty2=true,false,false,false
+ file=File.open(f,'r')
+ cont=file.readlines
+ file.close
+ cont.each do |t|
+ if f != @f
+ @f=f
+ @mod=nil
+ #puts "---\n#{@f}"
+ @structure[@f]={}
+ end
+ if t =~/^\s*module\s+\S+/
+ @mod=t.match(/^\s*module\s+(\S+)/)[1]
+ #puts ' ' + @mod
+ @arr[:mod] << @mod
+ @structure[@f].store(@mod,[])
+ #@structure[@f] = {@mod => []}
+ end
+ if t =~/^\s*class\s+\S+/
+ cl=t.match(/^\s*class\s+(\S+)/)[1]
+ #puts ' ' + cl
+ @arr[:cl] << cl
+ @structure[@f][@mod] << cl
+ end
+ end
+ end
+ puts 'number of modules: ' + @arr[:mod].length.to_s + ', unique: ' + @arr[:mod].uniq.length.to_s
+ puts 'number of classes: ' + @arr[:cl].length.to_s + ', unique: ' + @arr[:cl].uniq.length.to_s
+ method_modules_and_classes=[]
+ method_modules_and_classes <<<<-WOK
+#module SiSU_MC
+ class Extracted
+ def modify
+ WOK
+ #% modules_and_classes
+ method_modules_and_classes <<<<-WOK
+ def modules_and_classes
+ [
+ WOK
+ @structure.sort.each do |fl,modules|
+ method_modules_and_classes << ' '*8 + "##% -- " + fl
+ modules.sort.each do |mod,classes|
+ method_modules_and_classes << ' '*8 + '# ' + "[/#{mod}/," + ' '*(67 - mod.length) + "'#{mod}'],"
+ classes.uniq.sort.each do |cl|
+ method_modules_and_classes << ' '*8 + '# ' + "[/#{cl}/," + ' '*(65 - cl.length) + "'#{cl}'],"
+ end
+ end
+ end
+ method_modules_and_classes <<<<-WOK
+ ]
+ end
+ WOK
+ #% modules
+ method_modules_and_classes <<<<-WOK
+ def modules
+ [
+ WOK
+ method_modules_and_classes << ' '*8 + '# ' + 'number of modules: ' + @arr[:mod].length.to_s +
+ ', unique: ' + @arr[:mod].uniq.length.to_s
+ @arr[:mod].uniq.sort.each do |mod|
+ method_modules_and_classes << ' '*8 + '# ' + "[/#{mod}/," + ' '*(67 - mod.length) + "'#{mod}'],"
+ end
+ method_modules_and_classes <<<<-WOK
+ ]
+ end
+ WOK
+ #% classes
+ method_modules_and_classes <<<<-WOK
+ def classes
+ [
+ WOK
+ method_modules_and_classes << ' '*8 + '# ' + 'number of classes: ' + @arr[:cl].length.to_s +
+ ', unique: ' + @arr[:cl].uniq.length.to_s
+ @arr[:cl].uniq.sort.each do |cl|
+ method_modules_and_classes << ' '*8 + '# ' + "[/#{cl}/," + ' '*(67 - cl.length) + "'#{cl}'],"
+ end
+ method_modules_and_classes <<<<-WOK
+ ]
+ end
+ WOK
+ method_modules_and_classes <<<<-WOK
+ self
+ end
+ end
+#end
+ WOK
+ #method_modules_and_classes.each{|x| puts x}
+ if FileTest.file?(@modify_instructions_script) ==true
+ message("WARNING << #{@mod_inst} >> exists (and may have been edited). The existing << #{@mod_inst} >> will be overwritten if you proceed.")
+ end
+ instructs=File.new(@modify_instructions_script,'w')
+ method_modules_and_classes.each do |x|
+ puts x
+ instructs.puts x
+ end
+ instructs.close
+ end
+ def action
+ if @files and @files.length > 0
+ p @files
+ mr=nil
+ #%% changes to make m match, r replace -------------------------->
+ if @cf =~/--help/; help
+ else
+ case @cf
+ when /--convert/; convert
+ when /--report/; report_modules_and_classes
+ when /--build-gsub/; build_search_and_replace_method_for_modules_and_classes
+ else help
+ end
+ #act
+ end
+ else puts "this routine makes permanent changes to the contents of the files matched, as instructed within [no matches]"
+ end
+ end
+ end
+end
+#% files to match for this conversion set ------------------------->
+f=$* #; p $*
+cf=f[0].to_s
+f.shift
+match_and_replace=Array.new
+unless f.length > 0
+ f=if cf == '--report' \
+ or cf == '--build-gsub'
+ Dir.glob("[a-zA-Z]*.rb") #restrict to ruby files
+ else
+ Dir.glob("[a-zA-Z]*")
+ end
+ f=f.sort.delete_if { |x| x == __FILE__ or x == 'modify_instructions.rb' }
+end
+SiSU_Modify::Operations.new(cf,f).action
+__END__
+#f=Dir.glob("{bin,conf,data,lib}/**/*.rb") #sisu development
+#f=Dir.glob("[^_]/**/*") #all files subdirectories beneath pwd except those starting with _
diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb
index 7d4fa309..4cf46d99 100644
--- a/lib/sisu/v3/odf.rb
+++ b/lib/sisu/v3/odf.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb
index 5ffe458e..bf44613b 100644
--- a/lib/sisu/v3/odf_format.rb
+++ b/lib/sisu/v3/odf_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb
index b9d54123..c594aac4 100644
--- a/lib/sisu/v3/options.rb
+++ b/lib/sisu/v3/options.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 045fd767..91f77410 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/param_identify_markup.rb b/lib/sisu/v3/param_identify_markup.rb
index 3dcda84c..e0245098 100644
--- a/lib/sisu/v3/param_identify_markup.rb
+++ b/lib/sisu/v3/param_identify_markup.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/particulars.rb b/lib/sisu/v3/particulars.rb
index 1c03d304..a0006dc6 100644
--- a/lib/sisu/v3/particulars.rb
+++ b/lib/sisu/v3/particulars.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb
index 9a426acb..533e35df 100644
--- a/lib/sisu/v3/plaintext.rb
+++ b/lib/sisu/v3/plaintext.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/plaintext_format.rb b/lib/sisu/v3/plaintext_format.rb
index 61e43db1..5e64c03a 100644
--- a/lib/sisu/v3/plaintext_format.rb
+++ b/lib/sisu/v3/plaintext_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb
index 64db20c3..0a5886ff 100644
--- a/lib/sisu/v3/po4a.rb
+++ b/lib/sisu/v3/po4a.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/po4a_set.rb b/lib/sisu/v3/po4a_set.rb
index 88369e81..1e0f90c4 100644
--- a/lib/sisu/v3/po4a_set.rb
+++ b/lib/sisu/v3/po4a_set.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/prog_text_translation.rb b/lib/sisu/v3/prog_text_translation.rb
index 61fed18f..015077d2 100644
--- a/lib/sisu/v3/prog_text_translation.rb
+++ b/lib/sisu/v3/prog_text_translation.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/qrcode.rb b/lib/sisu/v3/qrcode.rb
index 1b741a48..2dd621e7 100644
--- a/lib/sisu/v3/qrcode.rb
+++ b/lib/sisu/v3/qrcode.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/relaxng.rb b/lib/sisu/v3/relaxng.rb
index b26fd6f5..92f06c82 100644
--- a/lib/sisu/v3/relaxng.rb
+++ b/lib/sisu/v3/relaxng.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -70,13 +70,13 @@ module SiSU_relaxng
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011 Ralph Amissah All Rights Reserved.
+ * Copyright: (C) 1997 - 2012 Ralph Amissah All Rights Reserved.
* License: GPL 3 or later:
SiSU, a framework for document structuring, publishing and search
- Copyright: (C) 1997 - 2011 Ralph Amissah
+ Copyright: (C) 1997 - 2012 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
diff --git a/lib/sisu/v3/remote.rb b/lib/sisu/v3/remote.rb
index 2e055707..8da87e42 100644
--- a/lib/sisu/v3/remote.rb
+++ b/lib/sisu/v3/remote.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/response.rb b/lib/sisu/v3/response.rb
index e398d22d..5df13755 100644
--- a/lib/sisu/v3/response.rb
+++ b/lib/sisu/v3/response.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/rexml.rb b/lib/sisu/v3/rexml.rb
index fd15865f..01f9a1fd 100644
--- a/lib/sisu/v3/rexml.rb
+++ b/lib/sisu/v3/rexml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/screen_text_color.rb b/lib/sisu/v3/screen_text_color.rb
index 3ad5b09d..8fc356ac 100644
--- a/lib/sisu/v3/screen_text_color.rb
+++ b/lib/sisu/v3/screen_text_color.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/share_src.rb b/lib/sisu/v3/share_src.rb
index 5595c88e..82fffca0 100644
--- a/lib/sisu/v3/share_src.rb
+++ b/lib/sisu/v3/share_src.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/share_src_kdissert.rb b/lib/sisu/v3/share_src_kdissert.rb
index 45f68b9f..3cd7bb1e 100644
--- a/lib/sisu/v3/share_src_kdissert.rb
+++ b/lib/sisu/v3/share_src_kdissert.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_html.rb b/lib/sisu/v3/shared_html.rb
index 4d8816c8..ec0f1c8f 100644
--- a/lib/sisu/v3/shared_html.rb
+++ b/lib/sisu/v3/shared_html.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_html_lite.rb b/lib/sisu/v3/shared_html_lite.rb
index 33052cd2..85b1b40e 100644
--- a/lib/sisu/v3/shared_html_lite.rb
+++ b/lib/sisu/v3/shared_html_lite.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_markup_alt.rb b/lib/sisu/v3/shared_markup_alt.rb
index 5bd49342..12cb8393 100644
--- a/lib/sisu/v3/shared_markup_alt.rb
+++ b/lib/sisu/v3/shared_markup_alt.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_metadata.rb b/lib/sisu/v3/shared_metadata.rb
index c40bf68d..06d382c3 100644
--- a/lib/sisu/v3/shared_metadata.rb
+++ b/lib/sisu/v3/shared_metadata.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_sem.rb b/lib/sisu/v3/shared_sem.rb
index ca14a9e4..c61ccd3e 100644
--- a/lib/sisu/v3/shared_sem.rb
+++ b/lib/sisu/v3/shared_sem.rb
@@ -8,7 +8,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_txt.rb b/lib/sisu/v3/shared_txt.rb
index c81e1c37..fbb8e1ac 100644
--- a/lib/sisu/v3/shared_txt.rb
+++ b/lib/sisu/v3/shared_txt.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_xhtml.rb b/lib/sisu/v3/shared_xhtml.rb
index f357e9af..16cb9b14 100644
--- a/lib/sisu/v3/shared_xhtml.rb
+++ b/lib/sisu/v3/shared_xhtml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/shared_xml.rb b/lib/sisu/v3/shared_xml.rb
index f4fa395c..40ee2550 100644
--- a/lib/sisu/v3/shared_xml.rb
+++ b/lib/sisu/v3/shared_xml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb
index e4423641..7a3b4727 100644
--- a/lib/sisu/v3/sisupod_make.rb
+++ b/lib/sisu/v3/sisupod_make.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sitemaps.rb b/lib/sisu/v3/sitemaps.rb
index b92ec05d..7f81b6be 100644
--- a/lib/sisu/v3/sitemaps.rb
+++ b/lib/sisu/v3/sitemaps.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/spell.rb b/lib/sisu/v3/spell.rb
index 4b8b892a..20e443c4 100644
--- a/lib/sisu/v3/spell.rb
+++ b/lib/sisu/v3/spell.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sst_convert_markup.rb b/lib/sisu/v3/sst_convert_markup.rb
index fe520d32..10eabcb5 100644
--- a/lib/sisu/v3/sst_convert_markup.rb
+++ b/lib/sisu/v3/sst_convert_markup.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sst_do_inline_footnotes.rb b/lib/sisu/v3/sst_do_inline_footnotes.rb
index 14d60ea0..c5af68de 100644
--- a/lib/sisu/v3/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v3/sst_do_inline_footnotes.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -56,7 +56,6 @@
** Description: preprocessing, convert bi-footnotemarker-footnote to inline
footnotes, invoked using: sisu --to-footnotes filename.sst
-
=end
module SiSU_Convert_footnotes
require_relative 'defaults' # defaults.rb
diff --git a/lib/sisu/v3/sst_from_xml.rb b/lib/sisu/v3/sst_from_xml.rb
index a948357a..ff29cc77 100644
--- a/lib/sisu/v3/sst_from_xml.rb
+++ b/lib/sisu/v3/sst_from_xml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sst_identify_markup.rb b/lib/sisu/v3/sst_identify_markup.rb
index 6f6cf865..2089a9a8 100644
--- a/lib/sisu/v3/sst_identify_markup.rb
+++ b/lib/sisu/v3/sst_identify_markup.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sst_to_s_xml_sax.rb b/lib/sisu/v3/sst_to_s_xml_sax.rb
index c9cdd241..9a16a437 100644
--- a/lib/sisu/v3/sst_to_s_xml_sax.rb
+++ b/lib/sisu/v3/sst_to_s_xml_sax.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index 436e1d7f..16dabd36 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -88,7 +88,7 @@ module SiSU_Env
@t.month
end
def year_static
- '2011'
+ '2012'
end
end
class Info_system
diff --git a/lib/sisu/v3/termsheet.rb b/lib/sisu/v3/termsheet.rb
index 455772c4..aca9e00e 100644
--- a/lib/sisu/v3/termsheet.rb
+++ b/lib/sisu/v3/termsheet.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/texinfo.rb b/lib/sisu/v3/texinfo.rb
index 2004b435..90810120 100644
--- a/lib/sisu/v3/texinfo.rb
+++ b/lib/sisu/v3/texinfo.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/texinfo_format.rb b/lib/sisu/v3/texinfo_format.rb
index 959cbf64..df9d2800 100644
--- a/lib/sisu/v3/texinfo_format.rb
+++ b/lib/sisu/v3/texinfo_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb
index 2b9e1087..47005d16 100644
--- a/lib/sisu/v3/texpdf.rb
+++ b/lib/sisu/v3/texpdf.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb
index 2e69e3e3..43008c3d 100644
--- a/lib/sisu/v3/texpdf_format.rb
+++ b/lib/sisu/v3/texpdf_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/update.rb b/lib/sisu/v3/update.rb
index 473d3045..e46743ec 100644
--- a/lib/sisu/v3/update.rb
+++ b/lib/sisu/v3/update.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb
index d0193da4..b188187a 100644
--- a/lib/sisu/v3/urls.rb
+++ b/lib/sisu/v3/urls.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/webrick.rb b/lib/sisu/v3/webrick.rb
index 9d827c17..88fb67ef 100644
--- a/lib/sisu/v3/webrick.rb
+++ b/lib/sisu/v3/webrick.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/wikispeak.rb b/lib/sisu/v3/wikispeak.rb
index 5b34372a..a524981b 100644
--- a/lib/sisu/v3/wikispeak.rb
+++ b/lib/sisu/v3/wikispeak.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb
index a9d860e1..7f910e47 100644
--- a/lib/sisu/v3/xhtml.rb
+++ b/lib/sisu/v3/xhtml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xhtml_table.rb b/lib/sisu/v3/xhtml_table.rb
index 8aa0f753..189e5a1d 100644
--- a/lib/sisu/v3/xhtml_table.rb
+++ b/lib/sisu/v3/xhtml_table.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb
index 2328d767..9ed3e871 100644
--- a/lib/sisu/v3/xml.rb
+++ b/lib/sisu/v3/xml.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb
index 913de9a0..53c60bf8 100644
--- a/lib/sisu/v3/xml_dom.rb
+++ b/lib/sisu/v3/xml_dom.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml_fictionbook.rb b/lib/sisu/v3/xml_fictionbook.rb
index 277d4adc..1425dc74 100644
--- a/lib/sisu/v3/xml_fictionbook.rb
+++ b/lib/sisu/v3/xml_fictionbook.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml_format.rb b/lib/sisu/v3/xml_format.rb
index 58b3f880..39e5d7b8 100644
--- a/lib/sisu/v3/xml_format.rb
+++ b/lib/sisu/v3/xml_format.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml_md_oai_pmh_dc.rb b/lib/sisu/v3/xml_md_oai_pmh_dc.rb
index 392be4fd..4837b8e1 100644
--- a/lib/sisu/v3/xml_md_oai_pmh_dc.rb
+++ b/lib/sisu/v3/xml_md_oai_pmh_dc.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml_scaffold.rb b/lib/sisu/v3/xml_scaffold.rb
index fdd3e5b3..5b0056c7 100644
--- a/lib/sisu/v3/xml_scaffold.rb
+++ b/lib/sisu/v3/xml_scaffold.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/xml_tables.rb b/lib/sisu/v3/xml_tables.rb
index c762a282..1f154bda 100644
--- a/lib/sisu/v3/xml_tables.rb
+++ b/lib/sisu/v3/xml_tables.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
diff --git a/lib/sisu/v3/zap.rb b/lib/sisu/v3/zap.rb
index 1cb176d0..3e967e32 100644
--- a/lib/sisu/v3/zap.rb
+++ b/lib/sisu/v3/zap.rb
@@ -7,7 +7,7 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
--
cgit v1.2.3
From 75e3bf86382edf99275a25895b362647158e25c1 Mon Sep 17 00:00:00 2001
From: Ralph Amissah
Date: Tue, 10 Jan 2012 22:37:26 -0500
Subject: v3dv, add dev branch (use to make some changes to module & class
names & test)
* (intended as) short term branch, merge back into v3 once tested
* sisu --dev (to invoke)
---
lib/sisu/v3/modify.rb | 376 --
lib/sisu/v3dv/air.rb | 82 +
lib/sisu/v3dv/author_format.rb | 113 +
lib/sisu/v3dv/cgi.rb | 83 +
lib/sisu/v3dv/cgi_pgsql.rb | 230 +
lib/sisu/v3dv/cgi_sql_common.rb | 1075 +++++
lib/sisu/v3dv/cgi_sqlite.rb | 217 +
lib/sisu/v3dv/character_encoding.rb | 379 ++
lib/sisu/v3dv/composite.rb | 275 ++
lib/sisu/v3dv/concordance.rb | 356 ++
lib/sisu/v3dv/conf.rb | 247 +
lib/sisu/v3dv/constants.rb | 285 ++
lib/sisu/v3dv/css.rb | 3332 +++++++++++++
lib/sisu/v3dv/dal.rb | 506 ++
lib/sisu/v3dv/dal_character_check.rb | 103 +
lib/sisu/v3dv/dal_doc_objects.rb | 446 ++
lib/sisu/v3dv/dal_doc_str.rb | 1252 +++++
lib/sisu/v3dv/dal_endnotes.rb | 125 +
lib/sisu/v3dv/dal_expand_insertions.rb | 379 ++
lib/sisu/v3dv/dal_hash_digest.rb | 155 +
lib/sisu/v3dv/dal_idx.rb | 357 ++
lib/sisu/v3dv/dal_images.rb | 156 +
lib/sisu/v3dv/dal_metadata.rb | 79 +
lib/sisu/v3dv/dal_numbering.rb | 465 ++
lib/sisu/v3dv/dal_substitutions_and_insertions.rb | 154 +
lib/sisu/v3dv/dal_syntax.rb | 538 +++
lib/sisu/v3dv/db_columns.rb | 2108 ++++++++
lib/sisu/v3dv/db_create.rb | 614 +++
lib/sisu/v3dv/db_dbi.rb | 93 +
lib/sisu/v3dv/db_drop.rb | 187 +
lib/sisu/v3dv/db_import.rb | 666 +++
lib/sisu/v3dv/db_indexes.rb | 114 +
lib/sisu/v3dv/db_load_tuple.rb | 333 ++
lib/sisu/v3dv/db_remove.rb | 119 +
lib/sisu/v3dv/db_select.rb | 215 +
lib/sisu/v3dv/db_sqltxt.rb | 132 +
lib/sisu/v3dv/db_tests.rb | 117 +
lib/sisu/v3dv/dbi.rb | 143 +
lib/sisu/v3dv/defaults.rb | 2267 +++++++++
lib/sisu/v3dv/digests.rb | 388 ++
lib/sisu/v3dv/embedded.rb | 142 +
lib/sisu/v3dv/epub.rb | 706 +++
lib/sisu/v3dv/epub_concordance.rb | 312 ++
lib/sisu/v3dv/epub_format.rb | 2608 ++++++++++
lib/sisu/v3dv/epub_segments.rb | 551 +++
lib/sisu/v3dv/epub_tune.rb | 413 ++
lib/sisu/v3dv/errors.rb | 81 +
lib/sisu/v3dv/git.rb | 281 ++
lib/sisu/v3dv/harvest.rb | 108 +
lib/sisu/v3dv/harvest_authors.rb | 378 ++
lib/sisu/v3dv/harvest_topics.rb | 650 +++
lib/sisu/v3dv/help.rb | 1923 ++++++++
lib/sisu/v3dv/html.rb | 663 +++
lib/sisu/v3dv/html_format.rb | 1480 ++++++
lib/sisu/v3dv/html_minitoc.rb | 198 +
lib/sisu/v3dv/html_promo.rb | 434 ++
lib/sisu/v3dv/html_scroll.rb | 209 +
lib/sisu/v3dv/html_segments.rb | 558 +++
lib/sisu/v3dv/html_table.rb | 65 +
lib/sisu/v3dv/html_tune.rb | 383 ++
lib/sisu/v3dv/hub.rb | 674 +++
lib/sisu/v3dv/i18n.rb | 698 +++
lib/sisu/v3dv/manifest.rb | 863 ++++
lib/sisu/v3dv/manpage.rb | 430 ++
lib/sisu/v3dv/manpage_format.rb | 108 +
lib/sisu/v3dv/modify.rb | 376 ++
lib/sisu/v3dv/odf.rb | 779 +++
lib/sisu/v3dv/odf_format.rb | 607 +++
lib/sisu/v3dv/options.rb | 649 +++
lib/sisu/v3dv/param.rb | 1536 ++++++
lib/sisu/v3dv/param_identify_markup.rb | 168 +
lib/sisu/v3dv/particulars.rb | 210 +
lib/sisu/v3dv/plaintext.rb | 430 ++
lib/sisu/v3dv/plaintext_format.rb | 113 +
lib/sisu/v3dv/po4a.rb | 982 ++++
lib/sisu/v3dv/po4a_set.rb | 300 ++
lib/sisu/v3dv/prog_text_translation.rb | 1704 +++++++
lib/sisu/v3dv/qrcode.rb | 738 +++
lib/sisu/v3dv/relaxng.rb | 1161 +++++
lib/sisu/v3dv/remote.rb | 212 +
lib/sisu/v3dv/response.rb | 75 +
lib/sisu/v3dv/rexml.rb | 121 +
lib/sisu/v3dv/screen_text_color.rb | 487 ++
lib/sisu/v3dv/share_src.rb | 95 +
lib/sisu/v3dv/share_src_kdissert.rb | 88 +
lib/sisu/v3dv/shared_html.rb | 65 +
lib/sisu/v3dv/shared_html_lite.rb | 321 ++
lib/sisu/v3dv/shared_markup_alt.rb | 318 ++
lib/sisu/v3dv/shared_metadata.rb | 1361 ++++++
lib/sisu/v3dv/shared_sem.rb | 156 +
lib/sisu/v3dv/shared_txt.rb | 232 +
lib/sisu/v3dv/shared_xhtml.rb | 65 +
lib/sisu/v3dv/shared_xml.rb | 713 +++
lib/sisu/v3dv/sisupod_make.rb | 369 ++
lib/sisu/v3dv/sitemaps.rb | 215 +
lib/sisu/v3dv/spell.rb | 101 +
lib/sisu/v3dv/sst_convert_markup.rb | 312 ++
lib/sisu/v3dv/sst_do_inline_footnotes.rb | 472 ++
lib/sisu/v3dv/sst_from_xml.rb | 169 +
lib/sisu/v3dv/sst_identify_markup.rb | 474 ++
lib/sisu/v3dv/sst_to_s_xml_sax.rb | 453 ++
lib/sisu/v3dv/sysenv.rb | 5291 +++++++++++++++++++++
lib/sisu/v3dv/termsheet.rb | 166 +
lib/sisu/v3dv/texinfo.rb | 398 ++
lib/sisu/v3dv/texinfo_format.rb | 587 +++
lib/sisu/v3dv/texpdf.rb | 960 ++++
lib/sisu/v3dv/texpdf_format.rb | 1620 +++++++
lib/sisu/v3dv/update.rb | 130 +
lib/sisu/v3dv/urls.rb | 427 ++
lib/sisu/v3dv/webrick.rb | 174 +
lib/sisu/v3dv/wikispeak.rb | 373 ++
lib/sisu/v3dv/xhtml.rb | 431 ++
lib/sisu/v3dv/xhtml_table.rb | 99 +
lib/sisu/v3dv/xml.rb | 467 ++
lib/sisu/v3dv/xml_dom.rb | 542 +++
lib/sisu/v3dv/xml_fictionbook.rb | 300 ++
lib/sisu/v3dv/xml_format.rb | 1644 +++++++
lib/sisu/v3dv/xml_md_oai_pmh_dc.rb | 230 +
lib/sisu/v3dv/xml_scaffold.rb | 199 +
lib/sisu/v3dv/xml_tables.rb | 203 +
lib/sisu/v3dv/zap.rb | 83 +
121 files changed, 64752 insertions(+), 376 deletions(-)
delete mode 100644 lib/sisu/v3/modify.rb
create mode 100644 lib/sisu/v3dv/air.rb
create mode 100644 lib/sisu/v3dv/author_format.rb
create mode 100644 lib/sisu/v3dv/cgi.rb
create mode 100644 lib/sisu/v3dv/cgi_pgsql.rb
create mode 100644 lib/sisu/v3dv/cgi_sql_common.rb
create mode 100644 lib/sisu/v3dv/cgi_sqlite.rb
create mode 100644 lib/sisu/v3dv/character_encoding.rb
create mode 100644 lib/sisu/v3dv/composite.rb
create mode 100644 lib/sisu/v3dv/concordance.rb
create mode 100644 lib/sisu/v3dv/conf.rb
create mode 100644 lib/sisu/v3dv/constants.rb
create mode 100644 lib/sisu/v3dv/css.rb
create mode 100644 lib/sisu/v3dv/dal.rb
create mode 100644 lib/sisu/v3dv/dal_character_check.rb
create mode 100644 lib/sisu/v3dv/dal_doc_objects.rb
create mode 100644 lib/sisu/v3dv/dal_doc_str.rb
create mode 100644 lib/sisu/v3dv/dal_endnotes.rb
create mode 100644 lib/sisu/v3dv/dal_expand_insertions.rb
create mode 100644 lib/sisu/v3dv/dal_hash_digest.rb
create mode 100644 lib/sisu/v3dv/dal_idx.rb
create mode 100644 lib/sisu/v3dv/dal_images.rb
create mode 100644 lib/sisu/v3dv/dal_metadata.rb
create mode 100644 lib/sisu/v3dv/dal_numbering.rb
create mode 100644 lib/sisu/v3dv/dal_substitutions_and_insertions.rb
create mode 100644 lib/sisu/v3dv/dal_syntax.rb
create mode 100644 lib/sisu/v3dv/db_columns.rb
create mode 100644 lib/sisu/v3dv/db_create.rb
create mode 100644 lib/sisu/v3dv/db_dbi.rb
create mode 100644 lib/sisu/v3dv/db_drop.rb
create mode 100644 lib/sisu/v3dv/db_import.rb
create mode 100644 lib/sisu/v3dv/db_indexes.rb
create mode 100644 lib/sisu/v3dv/db_load_tuple.rb
create mode 100644 lib/sisu/v3dv/db_remove.rb
create mode 100644 lib/sisu/v3dv/db_select.rb
create mode 100644 lib/sisu/v3dv/db_sqltxt.rb
create mode 100644 lib/sisu/v3dv/db_tests.rb
create mode 100644 lib/sisu/v3dv/dbi.rb
create mode 100644 lib/sisu/v3dv/defaults.rb
create mode 100644 lib/sisu/v3dv/digests.rb
create mode 100644 lib/sisu/v3dv/embedded.rb
create mode 100644 lib/sisu/v3dv/epub.rb
create mode 100644 lib/sisu/v3dv/epub_concordance.rb
create mode 100644 lib/sisu/v3dv/epub_format.rb
create mode 100644 lib/sisu/v3dv/epub_segments.rb
create mode 100644 lib/sisu/v3dv/epub_tune.rb
create mode 100644 lib/sisu/v3dv/errors.rb
create mode 100644 lib/sisu/v3dv/git.rb
create mode 100644 lib/sisu/v3dv/harvest.rb
create mode 100644 lib/sisu/v3dv/harvest_authors.rb
create mode 100644 lib/sisu/v3dv/harvest_topics.rb
create mode 100644 lib/sisu/v3dv/help.rb
create mode 100644 lib/sisu/v3dv/html.rb
create mode 100644 lib/sisu/v3dv/html_format.rb
create mode 100644 lib/sisu/v3dv/html_minitoc.rb
create mode 100644 lib/sisu/v3dv/html_promo.rb
create mode 100644 lib/sisu/v3dv/html_scroll.rb
create mode 100644 lib/sisu/v3dv/html_segments.rb
create mode 100644 lib/sisu/v3dv/html_table.rb
create mode 100644 lib/sisu/v3dv/html_tune.rb
create mode 100644 lib/sisu/v3dv/hub.rb
create mode 100644 lib/sisu/v3dv/i18n.rb
create mode 100644 lib/sisu/v3dv/manifest.rb
create mode 100644 lib/sisu/v3dv/manpage.rb
create mode 100644 lib/sisu/v3dv/manpage_format.rb
create mode 100644 lib/sisu/v3dv/modify.rb
create mode 100644 lib/sisu/v3dv/odf.rb
create mode 100644 lib/sisu/v3dv/odf_format.rb
create mode 100644 lib/sisu/v3dv/options.rb
create mode 100644 lib/sisu/v3dv/param.rb
create mode 100644 lib/sisu/v3dv/param_identify_markup.rb
create mode 100644 lib/sisu/v3dv/particulars.rb
create mode 100644 lib/sisu/v3dv/plaintext.rb
create mode 100644 lib/sisu/v3dv/plaintext_format.rb
create mode 100644 lib/sisu/v3dv/po4a.rb
create mode 100644 lib/sisu/v3dv/po4a_set.rb
create mode 100644 lib/sisu/v3dv/prog_text_translation.rb
create mode 100644 lib/sisu/v3dv/qrcode.rb
create mode 100644 lib/sisu/v3dv/relaxng.rb
create mode 100644 lib/sisu/v3dv/remote.rb
create mode 100644 lib/sisu/v3dv/response.rb
create mode 100644 lib/sisu/v3dv/rexml.rb
create mode 100644 lib/sisu/v3dv/screen_text_color.rb
create mode 100644 lib/sisu/v3dv/share_src.rb
create mode 100644 lib/sisu/v3dv/share_src_kdissert.rb
create mode 100644 lib/sisu/v3dv/shared_html.rb
create mode 100644 lib/sisu/v3dv/shared_html_lite.rb
create mode 100644 lib/sisu/v3dv/shared_markup_alt.rb
create mode 100644 lib/sisu/v3dv/shared_metadata.rb
create mode 100644 lib/sisu/v3dv/shared_sem.rb
create mode 100644 lib/sisu/v3dv/shared_txt.rb
create mode 100644 lib/sisu/v3dv/shared_xhtml.rb
create mode 100644 lib/sisu/v3dv/shared_xml.rb
create mode 100644 lib/sisu/v3dv/sisupod_make.rb
create mode 100644 lib/sisu/v3dv/sitemaps.rb
create mode 100644 lib/sisu/v3dv/spell.rb
create mode 100644 lib/sisu/v3dv/sst_convert_markup.rb
create mode 100644 lib/sisu/v3dv/sst_do_inline_footnotes.rb
create mode 100644 lib/sisu/v3dv/sst_from_xml.rb
create mode 100644 lib/sisu/v3dv/sst_identify_markup.rb
create mode 100644 lib/sisu/v3dv/sst_to_s_xml_sax.rb
create mode 100644 lib/sisu/v3dv/sysenv.rb
create mode 100644 lib/sisu/v3dv/termsheet.rb
create mode 100644 lib/sisu/v3dv/texinfo.rb
create mode 100644 lib/sisu/v3dv/texinfo_format.rb
create mode 100644 lib/sisu/v3dv/texpdf.rb
create mode 100644 lib/sisu/v3dv/texpdf_format.rb
create mode 100644 lib/sisu/v3dv/update.rb
create mode 100644 lib/sisu/v3dv/urls.rb
create mode 100644 lib/sisu/v3dv/webrick.rb
create mode 100644 lib/sisu/v3dv/wikispeak.rb
create mode 100644 lib/sisu/v3dv/xhtml.rb
create mode 100644 lib/sisu/v3dv/xhtml_table.rb
create mode 100644 lib/sisu/v3dv/xml.rb
create mode 100644 lib/sisu/v3dv/xml_dom.rb
create mode 100644 lib/sisu/v3dv/xml_fictionbook.rb
create mode 100644 lib/sisu/v3dv/xml_format.rb
create mode 100644 lib/sisu/v3dv/xml_md_oai_pmh_dc.rb
create mode 100644 lib/sisu/v3dv/xml_scaffold.rb
create mode 100644 lib/sisu/v3dv/xml_tables.rb
create mode 100644 lib/sisu/v3dv/zap.rb
(limited to 'lib')
diff --git a/lib/sisu/v3/modify.rb b/lib/sisu/v3/modify.rb
deleted file mode 100644
index 7a1c0441..00000000
--- a/lib/sisu/v3/modify.rb
+++ /dev/null
@@ -1,376 +0,0 @@
-#!/usr/bin/env ruby
-# encoding: utf-8
-=begin
-
- * Name: modify.rb
-
- * Description: A conversion script for canned substitutions,
- a fairly generic simple tool that can be used to store other canned conversions,
- (used here for altering SiSU markup or the SiSU program)
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
-
- * License: GPL 3 or later:
-
- * Packaged with: SiSU a framework for document structuring, publishing & 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:
-
-
-
-
-
-
-
- * Hompages:
-
-
-
- * Download:
-
-
- * Ralph Amissah
-
-
-
-=end
-module SiSU_Modify
- class Operations
- def initialize(cf,files)
- @cf,@files=cf,files
- @description="This is a script that contains canned text conversions for reuse"
- pwd=Dir.pwd
- @mod_inst='modify_instructions.rb'
- @modify_instructions_script="#{pwd}/#{@mod_inst}"
- if FileTest.file?(@modify_instructions_script) ==true
- puts <<-WOK
- autoload script: "#{@modify_instructions_script}"
- used by "ruby #{__FILE__} --convert" if
- "Extracted.new.modify.modules_and_classes" is used
- (see "matches_and_replaces")
- EDIT this file manually
- [to rebuild run: "ruby #{__FILE__} --build-gsub"]
-
- WOK
- else
- puts <<-WOK
- autoload script does not exist: "#{@modify_instructions_script}"
- needed for "ruby #{__FILE__} --convert" if
- "Extracted.new.modify.modules_and_classes" is used
- (see "matches_and_replaces")
- try run: "ruby #{__FILE__} --build-gsub"
-
- WOK
- end
- autoload :Extracted, "./#{@mod_inst}"
- end
- def matches_and_replaces #edit manually
- [
- #Extracted.new.modify.modules_and_classes,
- #Extracted.new.modify.modules,
- #Extracted.new.modify.classes,
- modify.dates,
- #modify.modules,
- #modify.classes,
- #modify.misc,
- ]
- end
- def message(text)
- response=''
- while response !~/yes/
- print %{
- #{text}
- To continue type "yes" [to exit type "no" or "quit"]: }
- response=File.new('/dev/tty').gets.strip
- exit if response =~/^(?:quit|no)$/
- end
- end
- def help
- print < 0
- @files.each do |i|
- @new,@matched,@empty1,@empty2=true,false,false,false
- file=File.open(i,'r')
- cont=file.readlines
- file.close
- @file=File.new(i,'w')
- cont.each do |t|
- matches_and_replaces.each do |match_and_replace|
- match_and_replace.each do |m,r|
- if t =~m
- p m.to_s + ' -> ' + r
- puts "in: #{t}"
- t.gsub!(m,r) if m and r
- puts "out: #{t}"
- end
- end
- end
- if t=~/^\s*$/; @empty1=true
- else @empty1=false
- end
- @file.puts t unless (@empty1==true and @empty2==true)
- if t=~/^\s*$/; @empty2=true
- else @empty2=false
- end
- end
- @file.close
- end
- end
- end
- def report_modules_and_classes
- @f=nil
- @structure={}
- @arr={mod: [], cl: []}
- @files.each do |f|
- @new,@matched,@empty1,@empty2=true,false,false,false
- file=File.open(f,'r')
- cont=file.readlines
- file.close
- cont.each do |t|
- if f != @f
- @f=f
- @mod=nil
- #puts "---\n#{@f}"
- @structure[@f]={}
- end
- if t =~/^\s*module\s+\S+/
- @mod=t.match(/^\s*module\s+(\S+)/)[1]
- #puts ' ' + @mod
- @arr[:mod] << @mod
- @structure[@f].store(@mod,[])
- #@structure[@f] = {@mod => []}
- end
- if t =~/^\s*class\s+\S+/
- cl=t.match(/^\s*class\s+(\S+)/)[1]
- #puts ' ' + cl
- @arr[:cl] << cl
- @structure[@f][@mod] << cl
- end
- end
- end
- @structure.sort.each do |fl,modules|
- puts "---\n" + fl
- modules.sort.each do |mod,classes|
- puts ' ' + mod
- classes.sort.each do |cl|
- puts ' ' + cl
- end
- end
- end
- puts '---'
- puts 'number of modules: ' + @arr[:mod].length.to_s + ', unique: ' + @arr[:mod].uniq.length.to_s
- puts 'number of classes: ' + @arr[:cl].length.to_s + ', unique: ' + @arr[:cl].uniq.length.to_s
- end
- def build_search_and_replace_method_for_modules_and_classes
- @f=nil
- @structure={}
- @arr={mod: [], cl: []}
- @files.each do |f|
- @new,@matched,@empty1,@empty2=true,false,false,false
- file=File.open(f,'r')
- cont=file.readlines
- file.close
- cont.each do |t|
- if f != @f
- @f=f
- @mod=nil
- #puts "---\n#{@f}"
- @structure[@f]={}
- end
- if t =~/^\s*module\s+\S+/
- @mod=t.match(/^\s*module\s+(\S+)/)[1]
- #puts ' ' + @mod
- @arr[:mod] << @mod
- @structure[@f].store(@mod,[])
- #@structure[@f] = {@mod => []}
- end
- if t =~/^\s*class\s+\S+/
- cl=t.match(/^\s*class\s+(\S+)/)[1]
- #puts ' ' + cl
- @arr[:cl] << cl
- @structure[@f][@mod] << cl
- end
- end
- end
- puts 'number of modules: ' + @arr[:mod].length.to_s + ', unique: ' + @arr[:mod].uniq.length.to_s
- puts 'number of classes: ' + @arr[:cl].length.to_s + ', unique: ' + @arr[:cl].uniq.length.to_s
- method_modules_and_classes=[]
- method_modules_and_classes <<<<-WOK
-#module SiSU_MC
- class Extracted
- def modify
- WOK
- #% modules_and_classes
- method_modules_and_classes <<<<-WOK
- def modules_and_classes
- [
- WOK
- @structure.sort.each do |fl,modules|
- method_modules_and_classes << ' '*8 + "##% -- " + fl
- modules.sort.each do |mod,classes|
- method_modules_and_classes << ' '*8 + '# ' + "[/#{mod}/," + ' '*(67 - mod.length) + "'#{mod}'],"
- classes.uniq.sort.each do |cl|
- method_modules_and_classes << ' '*8 + '# ' + "[/#{cl}/," + ' '*(65 - cl.length) + "'#{cl}'],"
- end
- end
- end
- method_modules_and_classes <<<<-WOK
- ]
- end
- WOK
- #% modules
- method_modules_and_classes <<<<-WOK
- def modules
- [
- WOK
- method_modules_and_classes << ' '*8 + '# ' + 'number of modules: ' + @arr[:mod].length.to_s +
- ', unique: ' + @arr[:mod].uniq.length.to_s
- @arr[:mod].uniq.sort.each do |mod|
- method_modules_and_classes << ' '*8 + '# ' + "[/#{mod}/," + ' '*(67 - mod.length) + "'#{mod}'],"
- end
- method_modules_and_classes <<<<-WOK
- ]
- end
- WOK
- #% classes
- method_modules_and_classes <<<<-WOK
- def classes
- [
- WOK
- method_modules_and_classes << ' '*8 + '# ' + 'number of classes: ' + @arr[:cl].length.to_s +
- ', unique: ' + @arr[:cl].uniq.length.to_s
- @arr[:cl].uniq.sort.each do |cl|
- method_modules_and_classes << ' '*8 + '# ' + "[/#{cl}/," + ' '*(67 - cl.length) + "'#{cl}'],"
- end
- method_modules_and_classes <<<<-WOK
- ]
- end
- WOK
- method_modules_and_classes <<<<-WOK
- self
- end
- end
-#end
- WOK
- #method_modules_and_classes.each{|x| puts x}
- if FileTest.file?(@modify_instructions_script) ==true
- message("WARNING << #{@mod_inst} >> exists (and may have been edited). The existing << #{@mod_inst} >> will be overwritten if you proceed.")
- end
- instructs=File.new(@modify_instructions_script,'w')
- method_modules_and_classes.each do |x|
- puts x
- instructs.puts x
- end
- instructs.close
- end
- def action
- if @files and @files.length > 0
- p @files
- mr=nil
- #%% changes to make m match, r replace -------------------------->
- if @cf =~/--help/; help
- else
- case @cf
- when /--convert/; convert
- when /--report/; report_modules_and_classes
- when /--build-gsub/; build_search_and_replace_method_for_modules_and_classes
- else help
- end
- #act
- end
- else puts "this routine makes permanent changes to the contents of the files matched, as instructed within [no matches]"
- end
- end
- end
-end
-#% files to match for this conversion set ------------------------->
-f=$* #; p $*
-cf=f[0].to_s
-f.shift
-match_and_replace=Array.new
-unless f.length > 0
- f=if cf == '--report' \
- or cf == '--build-gsub'
- Dir.glob("[a-zA-Z]*.rb") #restrict to ruby files
- else
- Dir.glob("[a-zA-Z]*")
- end
- f=f.sort.delete_if { |x| x == __FILE__ or x == 'modify_instructions.rb' }
-end
-SiSU_Modify::Operations.new(cf,f).action
-__END__
-#f=Dir.glob("{bin,conf,data,lib}/**/*.rb") #sisu development
-#f=Dir.glob("[^_]/**/*") #all files subdirectories beneath pwd except those starting with _
diff --git a/lib/sisu/v3dv/air.rb b/lib/sisu/v3dv/air.rb
new file mode 100644
index 00000000..f5bf3286
--- /dev/null
+++ b/lib/sisu/v3dv/air.rb
@@ -0,0 +1,82 @@
+# encoding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2012, 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_relative 'particulars' # particulars.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/v3dv/author_format.rb b/lib/sisu/v3dv/author_format.rb
new file mode 100644
index 00000000..481674d0
--- /dev/null
+++ b/lib/sisu/v3dv/author_format.rb
@@ -0,0 +1,113 @@
+# encoding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2012, 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/v3dv/cgi.rb b/lib/sisu/v3dv/cgi.rb
new file mode 100644
index 00000000..779ee35a
--- /dev/null
+++ b/lib/sisu/v3dv/cgi.rb
@@ -0,0 +1,83 @@
+# encoding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2012, 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_relative 'sysenv' # sysenv.rb
+ require_relative 'cgi_pgsql' # cgi_pgsql.rb
+ require_relative 'cgi_sqlite' # cgi_sqlite.rb
+ class SiSU_search
+ def initialize(opt)
+ @opt=opt
+ @webserv=@opt.files[0].to_s.strip
+ end
+ def search_info
+ a=%{
+ For help on sisu search, type:
+ sisu --help search
+ }
+ SiSU_Screen::Ansi.new(@opt.cmd,a).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/v3dv/cgi_pgsql.rb b/lib/sisu/v3dv/cgi_pgsql.rb
new file mode 100644
index 00000000..6fb35714
--- /dev/null
+++ b/lib/sisu/v3dv/cgi_pgsql.rb
@@ -0,0 +1,230 @@
+# encoding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2012, 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_relative 'sysenv' # sysenv.rb
+ require_relative '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,@image_src,@env)
+ @db=SiSU_Env::Info_db.new
+ @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by}_pgsql.cgi"
+ 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(@cgi_file_name,'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 << @common.dir_structure << @common.main3
+ a=%{ generated sisu_pgsql.cgi,
+ BASED ON ALREADY EXISTING directories that could potentially be used to populate postgresql db, (-D)
+ }
+ SiSU_Screen::Ansi.new(@opt.cmd,a).print_grey
+ c=case @webserv
+ when /pwd/; ''
+ else "if necessary make the directory /usr/lib/cgi-bin :
+ sudo cp -vi #{Dir.pwd}/#{@cgi_file_name} /usr/lib/cgi-bin/.
+ sudo chmod -v 755 /usr/lib/cgi-bin/#{@cgi_file_name}
+ sudo ln -s /usr/lib/cgi-bin/#{@cgi_file_name} /usr/lib/cgi-bin/sisu_pgsql.cgi
+ (copy #{@cgi_file_name} to your cgi directory) set file permissions to 755, and make symbolic link to sisu_pgsql.cgi"
+ end
+ a=%{#{c}
+ #{@env.webserv_base_cgi}/cgi-bin/sisu_pgsql.cgi
+ }
+ SiSU_Screen::Ansi.new(@opt.cmd,a).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']"
+ SiSU_Screen::Ansi.new(@opt.cmd,a,b).txt_cyan
+ else puts 'failed in attempt to write #{@cgi_file_name} 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].flatten.each {|x| @search_text << "#{x} AND " }
+ @search_text=@search_text.gsub!(/AND\s+$/m,'') #watch
+ @search_text.gsub!(/(doc_objects\.clean~[*]?\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+doc_objects\.clean~[*]?\(\s*'[^']+'\s*\))+)/,'(\1)')
+ search[:endnotes].flatten.each {|x| @search_endnotes << "#{x} AND " }
+ @search_endnotes=@search_endnotes.gsub!(/AND\s+$/m,'') #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_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.language_document_char, metadata_and_text.notes_suffix, doc_objects.body, doc_objects.seg, doc_objects.ocn, metadata_and_text.tid FROM doc_objects, metadata_and_text WHERE (#{@search_text}) AND doc_objects.metadata_tid = metadata_and_text.tid ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_filename, doc_objects.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_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.language_document_char, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata_and_text, endnotes WHERE (#{@search_endnotes}) AND metadata_and_text.tid = endnotes.metadata_tid ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_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/v3dv/cgi_sql_common.rb b/lib/sisu/v3dv/cgi_sql_common.rb
new file mode 100644
index 00000000..9f4dd457
--- /dev/null
+++ b/lib/sisu/v3dv/cgi_sql_common.rb
@@ -0,0 +1,1075 @@
+# encoding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997 - 2012, 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,opt,image_src,dir)
+ @webserv,@opt,@image_src,@env=webserv,opt,image_src,dir
+ @cmd=opt.cmd
+ 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 - 2012, 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
+ @@offset=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,result_type,checked_sql_limit,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,@result_type,@checked_sql_limit,@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,result_type,checked_sql_limit,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:__; fulltxt:__; keywords:__; title:__; author:__; topic_register:__; subject:__; description:__; publisher:__; editor:__; 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,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,: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=@fulltext=@keywords=@title=@author=@topic_register=@subject=@description=@publisher=@editor=@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:')
+ @fulltext=text_to_match('fulltxt:')
+ @topic_register=text_to_match('topic_register:')
+ @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
+ @editor=text_to_match('editor:')
+ @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
+ @keywords=text_to_match('key(?:words?)?:')
+ @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 @fulltext or @comment or @abstract or @rights or @subject or @publisher or @date or @filename or @topic_register
+ else
+ @text1=q['s1'] if q['s1']=~/\S/
+ @fulltext=q['ft'] if q['ft']=~/\S/
+ @keywords=q['key'] if q['key']=~/\S/
+ @title=q['ti'] if q['ti']=~/\S/
+ @author=q['au'] if q['au']=~/\S/
+ @topic_register=q['tr'] if q['tr']=~/\S/
+ @subject=q['sj'] if q['sj']=~/\S/
+ @description=q['dsc'] if q['dsc']=~/\S/
+ @publisher=q['pb'] if q['pb']=~/\S/
+ @editor=q['cntr'] if q['cntr']=~/\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']
+ 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=(c =~/\S/) ? true : false
+ st=Dbi_search_string.new('doc_objects.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_and_text.fulltext',search_for.fulltext,q['ft'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata_and_text.classify_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_and_text.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_and_text.creator_author',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_and_text.classify_topic_register',search_for.topic_register,q['tr'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata_and_text.classify_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_and_text.notes_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_and_text.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_and_text.creator_editor',search_for.editor,q['cntr'],cse).string
+ if st[:flag]
+ search[:text] << st[:search]
+ search[:endnotes] << st[:search]
+ end
+ st=Dbi_search_string.new('metadata_and_text.creator_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_and_text.date_published',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_and_text.classify_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_and_text.classify_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_and_text.original_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_and_text.language_document_char',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_and_text.classify_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_and_text.classify_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_and_text.rights_all',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_and_text.notes_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_and_text.notes_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_and_text.src_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_match_limit
+ @@limit
+ end
+ def sql_canned_search
+ @offset_next=sql_offset.to_i + sql_match_limit.to_i
+ @offset_previous=sql_offset.to_i - sql_match_limit.to_i
+ def current
+ @@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + sql_offset.to_s
+ end
+ def next
+ @@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + @offset_next.to_s
+ end
+ def previous
+ @offset_previous >= 0 \
+ ? (@@canned_search_url.to_s + '<d=' + sql_match_limit.to_s + '&off=' + @offset_previous.to_s)
+ : ''
+ end
+ def start
+ @@canned_search_url.to_s + '<d=' + sql_match_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_match_limit.to_i)/sql_match_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='','','','','','','','',''
+ result_type=(cgi['view']=~/text/) \
+ ? result_type={ :index => '', :text => 'checked'}
+ : result_type={ :index => 'checked', :text => ''}
+ @@limit=if cgi['sql_match_limit'].to_s=~/2500/
+ checked_sql_limit={ :l1000 => '', :l2500 => 'checked'}
+ '2500'
+ else
+ checked_sql_limit={ :l1000 => 'checked', :l2500 => ''}
+ '1000'
+ 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.fulltext=~/\S+/ or @search_for.author=~/\S+/ or @search_for.topic_register=~/\S+/ #and search_field =~/\S/
+ s1='s1=' + CGI.escape(@search_for.text1) if @search_for.text1=~/\S/
+ ft='&ft=' + CGI.escape(@search_for.fulltext) if @search_for.fulltext=~/\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/
+ tr='&tr=' + CGI.escape(@search_for.topic_register) if @search_for.topic_register=~/\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/
+ edt='&edt=' + CGI.escape(@search_for.editor) if @search_for.editor=~/\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=(checked_all =~/checked/) \
+ ? "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{sj}#{dsc}#{pb}#{edt}#{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"
+ : "#{@base}?#{s1}#{ft}#{key}#{ti}#{au}#{tr}#{sj}#{dsc}#{pb}#{edt}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}"
+ mod=ft=~/\S+/ ? (ft.gsub(/ft/,'s1')) : s1
+ @canned_base_url="#{@base}?#{mod}&db=#{cgi['db']}"
+ if checked_case=~/\S/
+ @search[:text][1]=%{doc_objects.clean~'#{@search_for.text1}'} #s1
+ @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1
+ else
+ @search[:text][1]=%{doc_objects.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|ft|au|ti|fns|tr)=[^&]+/)
+ af=canned_search.join('; ')
+ af.gsub!(/s1=/,'text: ')
+ af.gsub!(/ft=/,'fulltxt: ')
+ af.gsub!(/au=/,'author: ')
+ af.gsub!(/ti=/,'title: ')
+ af.gsub!(/fns=/,'filename: ')
+ af.gsub!(/tr=/,'topic_register: ')
+ 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_fulltext=p_keywords=p_title=p_author=p_topic_register=p_subject=p_description=p_publisher=p_editor=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=''
+ p_filename=%{filename: #{green}#{@search_for.filename} } if @search_for.filename =~/\S+/
+ p_text=%{text: #{green}#{@search_for.text1} } if @search_for.text1 =~/\S+/
+ p_fulltext=%{fulltxt: #{green}#{@search_for.fulltext} } if @search_for.fulltext =~/\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_editor=%{editor: #{green}#{@search_for.editor} } if @search_for.editor=~/\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_rights=%{rights: #{green}#{@search_for.rights} } if @search_for.rights =~/\S+/
+ p_topic_register=%{topic_register: #{green}#{@search_for.topic_register} } if @search_for.topic_register =~/\S+/
+ p_subject=%{subject: #{green}#{@search_for.subject} } if @search_for.subject =~/\S+/
+ p_keywords=%{keywords: #{green}#{@search_for.keywords} } if @search_for.keywords =~/\S+/
+ p_identifier=%{identifier: #{green}#{@search_for.identifier} } if @search_for.identifier =~/\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_relation=%{relation: #{green}#{@search_for.relation} } if @search_for.relation =~/\S+/
+ p_coverage=%{coverage: #{green}#{@search_for.coverage} } if @search_for.coverage =~/\S+/
+ p_description=%{description: #{green}#{@search_for.description} } if @search_for.description =~/\S+/
+ p_abstract=%{abstract: #{green}#{@search_for.abstract} } if @search_for.abstract =~/\S+/
+ p_comment=%{comment: #{green}#{@search_for.comment} } if @search_for.comment =~/\S+/
+ p_publisher=%{publisher: #{green}#{@search_for.publisher} } if @search_for.publisher =~/\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+/
+ search_note=<<-WOK
+
+ database: #{green}#{@db}; selected view: #{green}#{cgi['view']}
+ search string: "#{green}#{analyze_format}"
+ #{p_text} #{p_fulltext} #{p_keywords} #{p_title} #{p_author} #{p_topic_register} #{p_subject} #{p_description} #{p_publisher} #{p_editor} #{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,result_type,checked_sql_limit,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=(@search_for.text1 =~/\S/) \
+ ? @search_for.text1
+ : 'Unavailable'
+ if checked_case=~/\S/
+ @search[:text]<<%{doc_objects.clean~'#{CGI.unescape(s1)}'}
+ @search[:endnotes]<<%{endnotes.clean~'#{CGI.unescape(s1)}'}
+ else
+ @search[:text]<<%{doc_objects.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
+ @hostpath="#{@hosturl_files}/#{@stub}"
+ @ln='en'
+ WOK_SQL
+ end
+ def dir_structure
+ case @opt.dir_structure_by
+ when /language/
+ <<-'WOK_SQL'
+ def path_manifest(fn,ln=nil)
+ "#{@hostpath}/#{ln}/manifest/#{fn}.html"
+ end
+ def path_html_seg(fn,ln=nil)
+ "#{@hostpath}/#{ln}/html/#{fn}"
+ end
+ def path_toc(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/toc.html"
+ end
+ def path_filename(fn,seg,ln=nil)
+ "#{path_html_seg(fn,ln)}/#{seg}.html"
+ end
+ def path_endnotes(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/endnotes.html"
+ end
+ def path_html_doc(fn,ln=nil)
+ "#{@hostpath}/#{ln}/html/#{fn}.html"
+ end
+ WOK_SQL
+ when /filetype/
+ <<-'WOK_SQL'
+ def path_manifest(fn,ln=nil)
+ "#{@hostpath}/manifest/#{fn}.#{ln}.html"
+ end
+ def path_html_seg(fn,ln=nil)
+ "#{@hostpath}/html/#{fn}"
+ end
+ def path_toc(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/toc.#{ln}.html"
+ end
+ def path_filename(fn,seg,ln=nil)
+ "#{path_html_seg(fn,ln)}/#{seg}.#{ln}.html"
+ end
+ def path_endnotes(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/endnotes.#{ln}.html"
+ end
+ def path_html_doc(fn,ln=nil)
+ "#{@hostpath}/html/#{fn}.#{ln}.html"
+ end
+ WOK_SQL
+ else
+ <<-'WOK_SQL'
+ def path_manifest(fn,ln=nil)
+ "#{@hostpath}/#{fn}/sisu_manifest.#{ln}.html"
+ end
+ def path_html_seg(fn,ln=nil)
+ "#{@hostpath}/#{fn}"
+ end
+ def path_toc(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/toc.#{ln}.html"
+ end
+ def path_filename(fn,seg,ln=nil)
+ "#{path_html_seg(fn,ln)}/#{seg}.#{ln}.html"
+ end
+ def path_endnotes(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/endnotes.#{ln}.html"
+ end
+ def path_html_doc(fn,ln=nil)
+ "#{path_html_seg(fn,ln)}/scroll.#{ln}.html"
+ end
+ WOK_SQL
+ end
+ end
+ def main3
+ <<-'WOK_SQL'
+ #% text_objects_body
+ s_contents.each do |c| #% text body
+ location=c['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
+ file_suffix=c['src_filename'][/.+?\.(_?sst|ssm)$/,1]
+ 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=c['title']
+ can_txt_srch=(cgi['view']=~/index/) \
+ ? %{ }
+ : %{ }
+ title=%{ #{ti} [#{c['language_document_char']}] by #{c['creator_author']} #{can_txt_srch} } if file_suffix=~/s/ #hmm watch file_suffix
+ title=@text_search_flag \
+ ? ' '+title
+ : ' '+title
+ @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|
+ (g.to_s =~/(AND|OR)/) \
+ ? (search_regex << '|')
+ : (search_regex << %{#{g.to_s}})
+ 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=(@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) \
+ ? (c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{\\1}))
+ : c['body']
+ %{
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
}
+ 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