From 0e6fc15ada3c5d9a86b227163f35a54993b32529 Mon Sep 17 00:00:00 2001
From: Ralph Amissah
Date: Tue, 2 Dec 2008 23:54:23 -0500
Subject: sisu harvest, introduce module along with header syntax addition &
modification
* sisu markup, additional header and new format rule:
* @creator: / @author: header field, introduced author name format rules
for more usable metadata harvesting: surname comma other names, additional
authors separated by semi-colon
* param added meta-tag, @topic_register: formatting topic levels are
separated from sub-levels by a colon, a semi-colon separates main topics
if there are multiple topics at lowest sub-level, a pipe can be used to
create multiple headings
* harvest module, harvests metadata from document set currently extracts: (i)
authors and their writings from document set; (ii) topics and associated
writings from document set (topics use topic_register header). harvest
(when run against documents common to a directory of a site) extracts
metadata and organises the documents on a site by author and topic
information provided (there is a new "topic_register" header, with
formatting rules similar to those of the book index), results are placed in
[output_path]/sisu_site_metadata.
sisu --harvest *.sst
* by author (see change in param @creator: / @author: header field)
* by topic / subject index (see addition in param of @topic_register:
header field)
initially there should be an example samples here:
http://www.jus.uio.no/sisu/sisu_site_metadata/harvest_authors.html
http://www.jus.uio.no/sisu/sisu_site_metadata/harvest_topics.html
together with update markup source files
The authors and their writings list will be made to take on a more
biblographical form, with the use of additional fields as required.
(concept example, suitable for medium sized sites [to remove size
constraint: implement SQL equivalent]) make feature more robust
* css, for harvest output added
* remote placement of sisu_site_metadata (output produced by metadata harvest)
* sisu markup, update document samples accordingly
* tidy copyright marks in program headers, remove repetition of dates
[version bump because formatting rule introduced to author / creator header -
where new site metadata harvest feature is used, (at present changes changes
should not be noticed except when using metadata harvest)]
---
CHANGELOG | 49 ++
bin/sisu | 3 +-
bin/sisu_termsheet | 3 +-
bin/sisu_webrick | 3 +-
conf/sisu/version.yml | 6 +-
data/doc/sisu/CHANGELOG | 55 ++-
.../sisu/sisu_markup_samples/sisu_manual/sisu.ssm | 2 +-
.../sisu_manual/sisu_examples.ssi | 56 ---
.../sisu_manual/sisu_examples.sst | 6 +-
.../sisu_manual/sisu_markup.sst | 10 +-
.../sisu/conf/editor-syntax-etc/emacs/sisu-mode.el | 1 +
lib/sisu/v0/author_format.rb | 124 +++++
lib/sisu/v0/cgi.rb | 3 +-
lib/sisu/v0/cgi_pgsql.rb | 3 +-
lib/sisu/v0/cgi_sql_common.rb | 3 +-
lib/sisu/v0/cgi_sqlite.rb | 3 +-
lib/sisu/v0/character_encoding.rb | 3 +-
lib/sisu/v0/composite.rb | 3 +-
lib/sisu/v0/concordance.rb | 3 +-
lib/sisu/v0/conf.rb | 3 +-
lib/sisu/v0/constants.rb | 6 +-
lib/sisu/v0/css.rb | 133 ++++-
lib/sisu/v0/dal.rb | 3 +-
lib/sisu/v0/dal_character_check.rb | 3 +-
lib/sisu/v0/dal_doc_str.rb | 3 +-
lib/sisu/v0/dal_doc_str_code.rb | 3 +-
lib/sisu/v0/dal_doc_str_tables.rb | 3 +-
lib/sisu/v0/dal_endnotes.rb | 3 +-
lib/sisu/v0/dal_expand_insertions.rb | 3 +-
lib/sisu/v0/dal_hash_digest.rb | 3 +-
lib/sisu/v0/dal_idx.rb | 38 +-
lib/sisu/v0/dal_images.rb | 3 +-
lib/sisu/v0/dal_metadata.rb | 3 +-
lib/sisu/v0/dal_numbering.rb | 3 +-
lib/sisu/v0/dal_substitutions_and_insertions.rb | 3 +-
lib/sisu/v0/dal_syntax.rb | 3 +-
lib/sisu/v0/db_columns.rb | 3 +-
lib/sisu/v0/db_create.rb | 3 +-
lib/sisu/v0/db_dbi.rb | 3 +-
lib/sisu/v0/db_drop.rb | 3 +-
lib/sisu/v0/db_import.rb | 3 +-
lib/sisu/v0/db_indexes.rb | 3 +-
lib/sisu/v0/db_load_tuple.rb | 3 +-
lib/sisu/v0/db_remove.rb | 3 +-
lib/sisu/v0/db_select.rb | 3 +-
lib/sisu/v0/db_tests.rb | 3 +-
lib/sisu/v0/dbi.rb | 3 +-
lib/sisu/v0/defaults.rb | 3 +-
lib/sisu/v0/digests.rb | 3 +-
lib/sisu/v0/embedded.rb | 3 +-
lib/sisu/v0/errors.rb | 3 +-
lib/sisu/v0/harvest.rb | 102 ++++
lib/sisu/v0/harvest_authors.rb | 288 +++++++++++
lib/sisu/v0/harvest_topics.rb | 539 +++++++++++++++++++++
lib/sisu/v0/help.rb | 3 +-
lib/sisu/v0/html.rb | 3 +-
lib/sisu/v0/html_format.rb | 3 +-
lib/sisu/v0/html_minitoc.rb | 3 +-
lib/sisu/v0/html_promo.rb | 3 +-
lib/sisu/v0/html_scroll.rb | 3 +-
lib/sisu/v0/html_segments.rb | 3 +-
lib/sisu/v0/html_table.rb | 3 +-
lib/sisu/v0/html_tune.rb | 3 +-
lib/sisu/v0/hub.rb | 48 +-
lib/sisu/v0/i18n.rb | 3 +-
lib/sisu/v0/manifest.rb | 3 +-
lib/sisu/v0/manpage.rb | 3 +-
lib/sisu/v0/manpage_format.rb | 3 +-
lib/sisu/v0/odf.rb | 3 +-
lib/sisu/v0/options.rb | 3 +-
lib/sisu/v0/param.rb | 45 +-
lib/sisu/v0/param_identify_markup.rb | 3 +-
lib/sisu/v0/particulars.rb | 6 +-
lib/sisu/v0/plaintext.rb | 3 +-
lib/sisu/v0/plaintext_format.rb | 3 +-
lib/sisu/v0/relaxng.rb | 3 +-
lib/sisu/v0/remote.rb | 84 +++-
lib/sisu/v0/response.rb | 3 +-
lib/sisu/v0/rexml.rb | 3 +-
lib/sisu/v0/screen_text_color.rb | 3 +-
lib/sisu/v0/share_src.rb | 3 +-
lib/sisu/v0/share_src_kdissert.rb | 3 +-
lib/sisu/v0/shared_html.rb | 3 +-
lib/sisu/v0/shared_html_lite.rb | 3 +-
lib/sisu/v0/shared_sem.rb | 6 +-
lib/sisu/v0/shared_structure.rb | 3 +-
lib/sisu/v0/shared_txt.rb | 3 +-
lib/sisu/v0/shared_xml.rb | 3 +-
lib/sisu/v0/sisupod_make.rb | 3 +-
lib/sisu/v0/sitemaps.rb | 3 +-
lib/sisu/v0/spell.rb | 3 +-
lib/sisu/v0/sst_convert_markup.rb | 3 +-
lib/sisu/v0/sst_do_inline_footnotes.rb | 3 +-
lib/sisu/v0/sst_from_kdissert.rb | 3 +-
lib/sisu/v0/sst_from_xml.rb | 3 +-
lib/sisu/v0/sst_identify_markup.rb | 5 +-
lib/sisu/v0/sst_to_s_xml_dom.rb | 3 +-
lib/sisu/v0/sst_to_s_xml_node.rb | 3 +-
lib/sisu/v0/sst_to_s_xml_sax.rb | 3 +-
lib/sisu/v0/sysenv.rb | 42 +-
lib/sisu/v0/termsheet.rb | 3 +-
lib/sisu/v0/texinfo.rb | 3 +-
lib/sisu/v0/texinfo_format.rb | 3 +-
lib/sisu/v0/texpdf.rb | 3 +-
lib/sisu/v0/texpdf_format.rb | 3 +-
lib/sisu/v0/update.rb | 3 +-
lib/sisu/v0/urls.rb | 3 +-
lib/sisu/v0/webrick.rb | 3 +-
lib/sisu/v0/wikispeak.rb | 3 +-
lib/sisu/v0/xhtml.rb | 3 +-
lib/sisu/v0/xml.rb | 3 +-
lib/sisu/v0/xml_dom.rb | 3 +-
lib/sisu/v0/xml_fictionbook.rb | 3 +-
lib/sisu/v0/xml_format.rb | 3 +-
lib/sisu/v0/xml_md_oai_pmh_dc.rb | 3 +-
lib/sisu/v0/xml_scaffold.rb | 3 +-
lib/sisu/v0/xml_tables.rb | 3 +-
lib/sisu/v0/zap.rb | 3 +-
118 files changed, 1598 insertions(+), 341 deletions(-)
delete mode 100644 data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.ssi
create mode 100644 lib/sisu/v0/author_format.rb
create mode 100644 lib/sisu/v0/harvest.rb
create mode 100644 lib/sisu/v0/harvest_authors.rb
create mode 100644 lib/sisu/v0/harvest_topics.rb
diff --git a/CHANGELOG b/CHANGELOG
index 5f887356..b98af0b1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,55 @@ Reverse Chronological:
%% STABLE MANIFEST
+%% sisu_0.70.0.orig.tar.gz (2008-12-02:48/2)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.70.0.orig.tar.gz
+ sisu_0.70.0.orig.tar.gz
+ sisu_0.70.0-1.dsc
+ sisu_0.70.0-1.diff.gz
+
+ [version bump because formatting rule introduced to author / creator header -
+ where new site metadata harvest feature is used, (at present changes changes
+ should not be noticed except when using metadata harvest)]
+
+ * sisu markup, additional header and new format rule:
+ * @creator: / @author: header field, introduced author name format rules
+ for more usable metadata harvesting: surname comma other names, additional
+ authors separated by semi-colon
+ * param added meta-tag, @topic_register: formatting topic levels are
+ separated from sub-levels by a colon, a semi-colon separates main topics
+ if there are multiple topics at lowest sub-level, a pipe can be used to
+ create multiple headings
+
+ * harvest module, harvests metadata from document set currently extracts: (i)
+ authors and their writings from document set; (ii) topics and associated
+ writings from document set (topics use topic_register header). harvest
+ (when run against documents common to a directory of a site) extracts
+ metadata and organises the documents on a site by author and topic
+ information provided (there is a new "topic_register" header, with
+ formatting rules similar to those of the book index), results are placed in
+ [output_path]/sisu_site_metadata.
+ sisu --harvest *.sst
+ * by author (see change in param @creator: / @author: header field)
+ * by topic / subject index (see addition in param of @topic_register:
+ header field)
+ initially there should be an example samples here:
+ http://www.jus.uio.no/sisu/sisu_site_metadata/harvest_authors.html
+ http://www.jus.uio.no/sisu/sisu_site_metadata/harvest_topics.html
+ together with update markup source files
+
+ The authors and their writings list will be made to take on a more
+ biblographical form, with the use of additional fields as required.
+ (concept example, suitable for medium sized sites [to remove size
+ constraint: implement SQL equivalent]) make feature more robust
+
+ * css, for harvest output added
+
+ * remote placement of sisu_site_metadata (output produced by metadata harvest)
+
+ * sisu markup, update document samples accordingly
+
+ * tidy copyright marks in program headers, remove repetition of dates
+
%% sisu_0.69.4.orig.tar.gz (2008-11-02:43/7)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.69.4.orig.tar.gz
06ba062400396d234334beb72bf171e580a6bd78d8200e316606456529930165 1532819 sisu_0.69.4.orig.tar.gz
diff --git a/bin/sisu b/bin/sisu
index 671a06cd..26124efd 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -23,8 +23,7 @@ __END__
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/bin/sisu_termsheet b/bin/sisu_termsheet
index 7cc9f122..94b67f02 100755
--- a/bin/sisu_termsheet
+++ b/bin/sisu_termsheet
@@ -22,8 +22,7 @@ __END__
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/bin/sisu_webrick b/bin/sisu_webrick
index 1dafb419..88ef71e4 100755
--- a/bin/sisu_webrick
+++ b/bin/sisu_webrick
@@ -22,8 +22,7 @@ __END__
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/conf/sisu/version.yml b/conf/sisu/version.yml
index fca39870..9f875d95 100644
--- a/conf/sisu/version.yml
+++ b/conf/sisu/version.yml
@@ -1,5 +1,5 @@
---
-:version: 0.69.4
-:date_stamp: 2008w44/1
-:date: "2008-11-03"
+:version: 0.70.0
+:date_stamp: 2008w48/2
+:date: "2008-12-02"
:project: SiSU
diff --git a/data/doc/sisu/CHANGELOG b/data/doc/sisu/CHANGELOG
index 351701d0..b98af0b1 100644
--- a/data/doc/sisu/CHANGELOG
+++ b/data/doc/sisu/CHANGELOG
@@ -9,11 +9,60 @@ Reverse Chronological:
%% STABLE MANIFEST
+%% sisu_0.70.0.orig.tar.gz (2008-12-02:48/2)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.70.0.orig.tar.gz
+ sisu_0.70.0.orig.tar.gz
+ sisu_0.70.0-1.dsc
+ sisu_0.70.0-1.diff.gz
+
+ [version bump because formatting rule introduced to author / creator header -
+ where new site metadata harvest feature is used, (at present changes changes
+ should not be noticed except when using metadata harvest)]
+
+ * sisu markup, additional header and new format rule:
+ * @creator: / @author: header field, introduced author name format rules
+ for more usable metadata harvesting: surname comma other names, additional
+ authors separated by semi-colon
+ * param added meta-tag, @topic_register: formatting topic levels are
+ separated from sub-levels by a colon, a semi-colon separates main topics
+ if there are multiple topics at lowest sub-level, a pipe can be used to
+ create multiple headings
+
+ * harvest module, harvests metadata from document set currently extracts: (i)
+ authors and their writings from document set; (ii) topics and associated
+ writings from document set (topics use topic_register header). harvest
+ (when run against documents common to a directory of a site) extracts
+ metadata and organises the documents on a site by author and topic
+ information provided (there is a new "topic_register" header, with
+ formatting rules similar to those of the book index), results are placed in
+ [output_path]/sisu_site_metadata.
+ sisu --harvest *.sst
+ * by author (see change in param @creator: / @author: header field)
+ * by topic / subject index (see addition in param of @topic_register:
+ header field)
+ initially there should be an example samples here:
+ http://www.jus.uio.no/sisu/sisu_site_metadata/harvest_authors.html
+ http://www.jus.uio.no/sisu/sisu_site_metadata/harvest_topics.html
+ together with update markup source files
+
+ The authors and their writings list will be made to take on a more
+ biblographical form, with the use of additional fields as required.
+ (concept example, suitable for medium sized sites [to remove size
+ constraint: implement SQL equivalent]) make feature more robust
+
+ * css, for harvest output added
+
+ * remote placement of sisu_site_metadata (output produced by metadata harvest)
+
+ * sisu markup, update document samples accordingly
+
+ * tidy copyright marks in program headers, remove repetition of dates
+
%% sisu_0.69.4.orig.tar.gz (2008-11-02:43/7)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.69.4.orig.tar.gz
- sisu_0.69.4.orig.tar.gz
- sisu_0.69.4-1.dsc
- sisu_0.69.4-1.diff.gz
+ 06ba062400396d234334beb72bf171e580a6bd78d8200e316606456529930165 1532819 sisu_0.69.4.orig.tar.gz
+ 8fa64cbcb28d80d2c0c81885eaa9f71dbd45964a7546c94b085e2d359868d1bc 1159 sisu_0.69.4-1.dsc
+ a81b6bccdd085f197f3a26f8014ddcc5155cb173 146961 sisu_0.69.4-1.diff.gz
* sisu-mode.el emacs syntax highlighting file contributed by Ambrose Kofi Laing
data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm
index 2fe9ed3a..676e23d7 100644
--- a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm
+++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm
@@ -76,7 +76,7 @@ sisu [-CcFLSVvW]
% :B~? SiSU Output and Markup Examples
-<< sisu_examples.ssi
+<< sisu_examples.sst
<< sisu_search_intro.ssi
diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.ssi b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.ssi
deleted file mode 100644
index 5a7a2eb3..00000000
--- a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.ssi
+++ /dev/null
@@ -1,56 +0,0 @@
-% SiSU 0.57
-
-@title: SiSU
-
-@subtitle: Markup Samples, Output Examples
-
-@creator: Ralph Amissah
-
-@rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3
-
-@type: information
-
-@subject: ebook, epublishing, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, search
-
-@date.created: 2002-11-12
-
-@date.issued: 2002-11-12
-
-@date.available: 2002-11-12
-
-@date.modified: 2007-09-16
-
-@date: 2007-09-16
-
-@level: new=C; break=1; num_top=1
-
-@skin: skin_sisu_manual
-
-@bold: /Gnu|Debian|Ruby|SiSU/
-
-@links: { SiSU Manual }http://www.jus.uio.no/sisu/sisu_manual/
-{ Book Samples and Markup Examples }http://www.jus.uio.no/sisu/SiSU/examples.html
-{ SiSU @ Wikipedia }http://en.wikipedia.org/wiki/SiSU
-{ SiSU @ Freshmeat }http://freshmeat.net/projects/sisu/
-{ SiSU @ Ruby Application Archive }http://raa.ruby-lang.org/project/sisu/
-{ SiSU @ Debian }http://packages.qa.debian.org/s/sisu.html
-{ SiSU Download }http://www.jus.uio.no/sisu/SiSU/download.html
-{ SiSU Changelog }http://www.jus.uio.no/sisu/SiSU/changelog.html
-{ SiSU help }http://www.jus.uio.no/sisu/sisu_manual/sisu_help/
-{ SiSU help sources }http://www.jus.uio.no/sisu/sisu_manual/sisu_help_sources/
-
-% @rcs:+ $Id$
-
-:A~? @title @creator
-
-:B~? SiSU Markup and Output Examples
-
-1~examples Markup and Output Examples
-
-2~ Markup examples *~markup
-
-Current markup examples and document output samples are provided at http://www.jus.uio.no/sisu/SiSU/examples.html
-
-Some markup with syntax highlighting may be found under http://www.jus.uio.no/sisu/sample/syntax but is not as up to date.
-
-For some documents hardly any markup at all is required at all, other than a header, and an indication that the levels to be taken into account by the program in generating its output are.
diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.sst b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.sst
index dd566091..307b7107 100644
--- a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.sst
+++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_examples.sst
@@ -39,8 +39,6 @@
{ SiSU help }http://www.jus.uio.no/sisu/sisu_manual/sisu_help/
{ SiSU help sources }http://www.jus.uio.no/sisu/sisu_manual/sisu_help_sources/
-@rcs:+ $Id: sisu_examples.sst,v 1.25 2007/09/08 17:12:47 ralph Exp $
-
:A~? @title @creator
:B~? SiSU Markup and Output Examples
@@ -63,6 +61,10 @@ For some documents hardly any markup at all is required at all, other than a hea
{ "The Wealth of Networks", Yochai Benkler [3sS]}the_wealth_of_networks.yochai_benkler.sst
+3~two_bits- /{"Two Bits"}/, Christopher Kelty
+
+{ "Two Bits", Christopher Kelty [3sS]}two_bits.christopher_kelty.sst
+
3~freeculture- /{"Free Culture"}/, Lawrence Lessig
{ "Free Culture", Lawrence Lessig [3sS]}free_culture.lawrence_lessig.sst
diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_markup.sst b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_markup.sst
index 09a8f427..292bfe13 100644
--- a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_markup.sst
+++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_markup.sst
@@ -103,7 +103,7 @@ With SiSU installed sample skins may be found in: /usr/share/doc/sisu/sisu_marku
1~headers Markup of Headers
-Headers consist of semantic meta-data about a document, which can be used by any output module of the program; and may in addition include extra processing instructions.
+Headers contain either: semantic meta-data about a document, which can be used by any output module of the program, or; processing instructions.
Note: the first line of a document may include information on the markup version used in the form of a comment. Comments are a percentage mark at the start of a paragraph (and as the first character in a line of text) followed by a space and the comment:
@@ -125,7 +125,9 @@ code{
@subtitle: Markup
-@creator: Ralph Amissah
+@creator: Amissah, Ralph
+
+% note formatting on author / creator field, surname comma then other names, if more than one author separate by semi-colon
@rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3
@@ -133,6 +135,10 @@ code{
@subject: ebook, epublishing, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, search
+@topic_register: text markup language; application:text processing;output:html|xml|latex|pdf|sql
+
+% note formatting for topic_register topic levels are separated by a colon, a semi-colon separates main topics
+
@date.created: 2002-08-28
@date.issued: 2002-08-28
diff --git a/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
index d8febd78..d0027798 100644
--- a/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
+++ b/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
@@ -305,6 +305,7 @@
"contributor\\|"
"publisher\\|"
"subject\\|"
+ "topic_register\\|"
"description\\|"
"type\\|"
"format\\|"
diff --git a/lib/sisu/v0/author_format.rb b/lib/sisu/v0/author_format.rb
new file mode 100644
index 00000000..7d04ae86
--- /dev/null
+++ b/lib/sisu/v0/author_format.rb
@@ -0,0 +1,124 @@
+# coding: utf-8
+=begin
+
+ * 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 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
+ #author_format += 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}
+ #{:authors_array => authors, :authors_hash => @authors, :authors_string => authors_string, :authors_param => @author_param}
+ #{:authors_array => authors, :authors_hash => @authors, :authors_string => authors_string, :authors_format => author_format, :authors_param => @author_param}
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v0/cgi.rb b/lib/sisu/v0/cgi.rb
index 2318be69..570d0f31 100644
--- a/lib/sisu/v0/cgi.rb
+++ b/lib/sisu/v0/cgi.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/cgi_pgsql.rb b/lib/sisu/v0/cgi_pgsql.rb
index 148905f4..311f1854 100644
--- a/lib/sisu/v0/cgi_pgsql.rb
+++ b/lib/sisu/v0/cgi_pgsql.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/cgi_sql_common.rb b/lib/sisu/v0/cgi_sql_common.rb
index d0b18317..9442ddcf 100644
--- a/lib/sisu/v0/cgi_sql_common.rb
+++ b/lib/sisu/v0/cgi_sql_common.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/cgi_sqlite.rb b/lib/sisu/v0/cgi_sqlite.rb
index 35d0fbc6..08897f54 100644
--- a/lib/sisu/v0/cgi_sqlite.rb
+++ b/lib/sisu/v0/cgi_sqlite.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/character_encoding.rb b/lib/sisu/v0/character_encoding.rb
index aa856cdd..4083d1ea 100644
--- a/lib/sisu/v0/character_encoding.rb
+++ b/lib/sisu/v0/character_encoding.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/composite.rb b/lib/sisu/v0/composite.rb
index 12facd1b..7c5efa36 100644
--- a/lib/sisu/v0/composite.rb
+++ b/lib/sisu/v0/composite.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb
index 676aa3a7..87b86930 100644
--- a/lib/sisu/v0/concordance.rb
+++ b/lib/sisu/v0/concordance.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/conf.rb b/lib/sisu/v0/conf.rb
index 5fc9343c..cdc49d6b 100644
--- a/lib/sisu/v0/conf.rb
+++ b/lib/sisu/v0/conf.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/constants.rb b/lib/sisu/v0/constants.rb
index 9339f143..25071cbb 100644
--- a/lib/sisu/v0/constants.rb
+++ b/lib/sisu/v0/constants.rb
@@ -9,15 +9,13 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007,
- 2008 Ralph Amissah All Rights Reserved.
+ 2007, 2008 Ralph Amissah All Rights Reserved.
* License: GPL 3 or later:
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb
index ec71c4f3..d5a15971 100644
--- a/lib/sisu/v0/css.rb
+++ b/lib/sisu/v0/css.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
@@ -99,6 +98,136 @@ module SiSU_Style
color: #{@vz.color_blue_ink};
text-decoration: underline;
}
+WOK
+ end
+ def harvest
+ < idx[:ocn], :range => "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", :seg => idx[:seg] }
+ @the_idx[use]['term_node_lev1'] << { :ocn => idx[:ocn], :range => "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", :seg => idx[:seg] }
"#{i} #{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}"
else
- @the_idx[use]['a1'] << { :ocn => idx[:ocn], :seg => idx[:seg] }
+ @the_idx[use]['term_node_lev1'] << { :ocn => idx[:ocn], :seg => idx[:seg] }
"#{i} #{idx[:ocn]}"
end
else
- @the_idx[use]['b1']={} unless @the_idx[use]['b1'] and defined? @the_idx[use]['b1']
- @the_idx[use]['b1'][i]=[] unless @the_idx[use]['b1'][i] and defined? @the_idx[use]['b1'][i]
+ @the_idx[use]['term_node_lev2']={} unless @the_idx[use]['term_node_lev2'] and defined? @the_idx[use]['term_node_lev2']
+ @the_idx[use]['term_node_lev2'][i]=[] unless @the_idx[use]['term_node_lev2'][i] and defined? @the_idx[use]['term_node_lev2'][i]
x=if r
- @the_idx[use]['b1'][i] << { :ocn => idx[:ocn], :range => "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", :seg => idx[:seg] }
+ @the_idx[use]['term_node_lev2'][i] << { :ocn => idx[:ocn], :range => "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", :seg => idx[:seg] }
"#{idx_lst[0]}:#{i} #{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}"
else
- @the_idx[use]['b1'][i] << { :ocn => idx[:ocn], :seg => idx[:seg] }
+ @the_idx[use]['term_node_lev2'][i] << { :ocn => idx[:ocn], :seg => idx[:seg] }
"#{idx_lst[0]}:#{i} #{idx[:ocn]}"
end
end
@@ -203,8 +201,8 @@ module SiSU_book_index
p 'array error? -->'
print x
elsif x.class == Hash
- if x['a1'].class == Array
- x['a1'].each do |a|
+ if x['term_node_lev1'].class == Array
+ x['term_node_lev1'].each do |a|
if a[:range]
@idx[:sst][@o]=@idx[:sst][@o] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{@env.url.root}/#{@md.fnb}/#{a[:seg]}.html##{a[:ocn]}, }
@idx[:html][@q]=@idx[:html][@q] + %{#{a[:range]}, }
@@ -218,11 +216,11 @@ module SiSU_book_index
end
@idx[:html][@q]=@idx[:html][@q] + '
'
end
- if x['b1']
- m=x['b1']
+ if x['term_node_lev2']
+ m=x['term_node_lev2']
m=m.sort
m.each do |k,y|
- if k !~/a1/
+ if k !~/term_node_lev1/
@idx[:sst][@o]=@idx[:sst][@o] + %{#{k}, }
@idx[:html][@q]=@idx[:html][@q] + %{\n
#{k}, }
print "\n\t" + k + ', ' if @md.cmd =~/V/
@@ -259,8 +257,8 @@ module SiSU_book_index
p 'array error? -->'
print x
elsif x.class == Hash
- if x['a1'].class == Array
- x['a1'].each do |a|
+ if x['term_node_lev1'].class == Array
+ x['term_node_lev1'].each do |a|
if a[:range]
print a[:range] + ', '
elsif a[:ocn]
@@ -269,11 +267,11 @@ module SiSU_book_index
end
end
end
- if x['b1']
- m=x['b1']
+ if x['term_node_lev2']
+ m=x['term_node_lev2']
m=m.sort
m.each do |k,y|
- if k !~/a1/
+ if k !~/term_node_lev1/
print "\n\t" + k + ', '
#p y
y.each do |z|
diff --git a/lib/sisu/v0/dal_images.rb b/lib/sisu/v0/dal_images.rb
index 75fa333c..22d60d5e 100644
--- a/lib/sisu/v0/dal_images.rb
+++ b/lib/sisu/v0/dal_images.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/dal_metadata.rb b/lib/sisu/v0/dal_metadata.rb
index 900c5495..b46c0ce6 100644
--- a/lib/sisu/v0/dal_metadata.rb
+++ b/lib/sisu/v0/dal_metadata.rb
@@ -15,8 +15,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/dal_numbering.rb b/lib/sisu/v0/dal_numbering.rb
index fd873da2..c29164da 100644
--- a/lib/sisu/v0/dal_numbering.rb
+++ b/lib/sisu/v0/dal_numbering.rb
@@ -15,8 +15,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/dal_substitutions_and_insertions.rb b/lib/sisu/v0/dal_substitutions_and_insertions.rb
index 74a06138..b3fc0ef4 100644
--- a/lib/sisu/v0/dal_substitutions_and_insertions.rb
+++ b/lib/sisu/v0/dal_substitutions_and_insertions.rb
@@ -15,8 +15,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb
index 84ddef92..4120497a 100644
--- a/lib/sisu/v0/dal_syntax.rb
+++ b/lib/sisu/v0/dal_syntax.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_columns.rb b/lib/sisu/v0/db_columns.rb
index 87e14b01..6c9778ab 100644
--- a/lib/sisu/v0/db_columns.rb
+++ b/lib/sisu/v0/db_columns.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_create.rb b/lib/sisu/v0/db_create.rb
index 95803324..189b7acf 100644
--- a/lib/sisu/v0/db_create.rb
+++ b/lib/sisu/v0/db_create.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_dbi.rb b/lib/sisu/v0/db_dbi.rb
index 2ecf2816..3a54fd46 100644
--- a/lib/sisu/v0/db_dbi.rb
+++ b/lib/sisu/v0/db_dbi.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_drop.rb b/lib/sisu/v0/db_drop.rb
index bd5e647f..f41325b2 100644
--- a/lib/sisu/v0/db_drop.rb
+++ b/lib/sisu/v0/db_drop.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb
index f02ccd3f..e30776c7 100644
--- a/lib/sisu/v0/db_import.rb
+++ b/lib/sisu/v0/db_import.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_indexes.rb b/lib/sisu/v0/db_indexes.rb
index faf2b720..98a849a2 100644
--- a/lib/sisu/v0/db_indexes.rb
+++ b/lib/sisu/v0/db_indexes.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_load_tuple.rb b/lib/sisu/v0/db_load_tuple.rb
index cb0278fb..aefa10c4 100644
--- a/lib/sisu/v0/db_load_tuple.rb
+++ b/lib/sisu/v0/db_load_tuple.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_remove.rb b/lib/sisu/v0/db_remove.rb
index bb88af58..93680f2c 100644
--- a/lib/sisu/v0/db_remove.rb
+++ b/lib/sisu/v0/db_remove.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_select.rb b/lib/sisu/v0/db_select.rb
index 002f0039..a596d4e3 100644
--- a/lib/sisu/v0/db_select.rb
+++ b/lib/sisu/v0/db_select.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/db_tests.rb b/lib/sisu/v0/db_tests.rb
index 72282b59..4a18f694 100644
--- a/lib/sisu/v0/db_tests.rb
+++ b/lib/sisu/v0/db_tests.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/dbi.rb b/lib/sisu/v0/dbi.rb
index 48137287..1f161724 100644
--- a/lib/sisu/v0/dbi.rb
+++ b/lib/sisu/v0/dbi.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb
index 1d1baef6..07958e9b 100644
--- a/lib/sisu/v0/defaults.rb
+++ b/lib/sisu/v0/defaults.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/digests.rb b/lib/sisu/v0/digests.rb
index 42fa6962..fed761d6 100644
--- a/lib/sisu/v0/digests.rb
+++ b/lib/sisu/v0/digests.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/embedded.rb b/lib/sisu/v0/embedded.rb
index 92853fa6..d4fbacdd 100644
--- a/lib/sisu/v0/embedded.rb
+++ b/lib/sisu/v0/embedded.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/errors.rb b/lib/sisu/v0/errors.rb
index 2351613c..02317bdc 100644
--- a/lib/sisu/v0/errors.rb
+++ b/lib/sisu/v0/errors.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/harvest.rb b/lib/sisu/v0/harvest.rb
new file mode 100644
index 00000000..e8609a93
--- /dev/null
+++ b/lib/sisu/v0/harvest.rb
@@ -0,0 +1,102 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+ harvest metadata from document corpus (suitable for medium sized sites)
+ (concept example, [to remove size constraint: implement SQL equivalent])
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008 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
+def help
+ puts <.
+
+ 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: simple xml representation (sax style)
+
+=end
+module HARVEST_authors
+ require "#{SiSU_lib}/author_format"
+ @@the_idx_authors=[]
+ class Songsheet
+ def initialize(opt)
+ @opt=opt
+ @file_list=opt.files
+ @env=SiSU_Env::Info_env.new
+ end
+ def songsheet
+ files,idx_array=[],[]
+ @file_list.each do |f|
+ if f =~/.+?\.ss[tm]$/
+ files << f[/(.+?\.ss[tm])$/,1]
+ else
+ print "not .sst or .ssm ? << #{f} >> "
+ end
+ end
+ files.each do |filename|
+ file_array=[]
+ File.open(filename,'r') do |file|
+ file.each_line("\n\n") do |line|
+ if line =~/^@\S+?: /
+ file_array << line
+ elsif line =~/^(?:\s*\n|%+ )/
+ else break
+ end
+ end
+ end
+ idx_array=HARVEST_authors::Harvest.new(file_array,filename,idx_array).extract_harvest
+ end
+ the_idx=HARVEST_authors::Index.new(idx_array,@@the_idx_authors).construct_book_author_index
+ #HARVEST_authors::Output_index.new(the_idx).screen_print.cycle
+ HARVEST_authors::Output_index.new(@opt,the_idx).html_print.html_songsheet
+ puts "file://#{@env.path.output_md_harvest}/harvest_authors.html"
+ puts "file://#{@env.path.pwd}/harvest_authors.html" if @opt.cmd.inspect =~/-M/
+ end
+ end
+ class Harvest
+ def initialize(data,filename,idx_array)
+ @data,@filename,@idx_array=data,filename,idx_array
+ end
+ def extract_harvest
+ data,filename,idx_array=@data,@filename,@idx_array
+ @publication_details,@title,@subtitle,@fulltitle,@author,@author_format=nil,nil,nil,nil,nil,nil
+ @authors=[]
+ rgx={}
+ rgx[:author]=/^@(?:author|creator):\s+(.+)/
+ rgx[:title]=/^@title:\s+(.+)/
+ rgx[:subtitle]=/^@subtitle:\s+(.+)/
+ rgx[:publication_details]=/^@original_publication_details:\s+(.+)/
+ data.each do |para|
+ if para=~ rgx[:publication_details]
+ @publication_details=rgx[:publication_details].match(para)[1]
+ end
+ if para=~ rgx[:title]
+ @title=rgx[:title].match(para)[1]
+ end
+ if para=~ rgx[:subtitle]
+ @subtitle=rgx[:subtitle].match(para)[1]
+ end
+ if para=~ rgx[:author]
+ @author_format=rgx[:author].match(para)[1]
+ end
+ break if @title and @subtitle and @author and @publication_details
+ end
+ @fulltitle=if @subtitle
+ @title + ' - ' + @subtitle
+ else @title
+ end
+ if @title and @author_format #and @publication_details
+ creator=FORMAT::Author.new(@author_format.strip).author_details
+ @authors,@authorship=creator[:authors],creator[:authorship]
+ file=filename.sub(/\.ss[mt]$/,'')
+ idx_array <<= { :filename => filename, :file => file, :publication_details => @publication_details, :title => @fulltitle, :author => creator }
+ else
+ #p "missing author field: #@filename title: #@title; author: #@author_format; idx: #@publication_details"
+ end
+ idx_array.flatten!
+ idx_array
+ end
+ end
+ class Index
+ def initialize(idx_array,the_idx)
+ @idx_array,@the_idx=idx_array,the_idx
+ @@the_idx_authors=@the_idx
+ end
+ def capital(txt)
+ txt[0].chr.capitalize + txt[1,txt.length]
+ end
+ def construct_book_author_index
+ idx_array=@idx_array
+ idx_array.each do |idx|
+ idx[:author][:last_first_format_a].each do |author|
+ author.strip!
+ if @@the_idx_authors[author].class==NilClass
+ @@the_idx_authors[author]={:md => []}
+ end
+ @@the_idx_authors[author][:md] << { :filename => idx[:filename], :file => idx[:file], :author => idx[:author], :title => idx[:title] }
+ end
+ end
+ @the_idx=@@the_idx_authors
+ end
+ end
+ class Output_index
+ def initialize(opt,the_idx)
+ @opt,@the_idx=opt,the_idx
+ @env=SiSU_Env::Info_env.new
+ @rc=Get_init.instance.yamlrc
+ @page='sisu_manifest.html'
+ @output={}
+ @output[:html]=File.new("#{@env.path.output_md_harvest}/harvest_authors.html",'w')
+ @output[:html_mnt]= if @opt.cmd.inspect =~/-M/
+ File.new("#{@env.path.pwd}/harvest_authors.html",'w')
+ else nil
+ end
+ @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
+ @letter=@alph.shift
+ end
+ def html_print
+ def html_songsheet
+ html_head
+ html_alph
+ html_body
+ html_tail
+ end
+ def html_head_adjust(type='')
+ css_path=if type !~/maintenance/
+ '../_sisu/css/harvest.css'
+ else 'harvest.css'
+ end
+ <
+
+
+SiSU Metadata Harvest - Authors
+
+
+
+
+
+WOK
+ end
+ def html_head
+ @output[:html_mnt] << html_head_adjust('maintenance') if @opt.cmd.inspect =~/-M/
+ @output[:html] << html_head_adjust
+ end
+ def html_alph
+ a=[]
+ a << '
'
+ @alph.each do |x|
+ a << if x =~/[0-9]/; ''
+ else
+ %{#{x}, }
+ end
+ end
+ @output[:html_mnt] << a.join if @output[:html_mnt].class == File
+ @output[:html] << a.join
+ end
+ def html_tail
+ a=[]
+ a <<<
+
+WOK
+ @output[:html_mnt] << a if @output[:html_mnt].class == File
+ @output[:html] << a
+ end
+ def do_html(html)
+ @output[:html_mnt] << html if @output[:html_mnt].class == File
+ @output[:html] << html
+ end
+ def do_string(attrib,string)
+ html=%{
#{string}
}
+ do_html(html)
+ end
+ def do_string_name(attrib,string)
+ f=/^(\S)/.match(string[0])[1]
+ if @letter < f
+ while @letter < f
+ if @alph.length > 0
+ @letter=@alph.shift
+ if @output[:html_mnt].class == File
+ @output[:html_mnt] << %{\n
}
+ else break
+ end
+ end
+ end
+ end
+ def html_body
+ the_idx=@the_idx
+ the_idx.sort.each do |a|
+ do_string_name('',a)
+ name=a[0].sub(/(.+?)(?:,.+|$)/,'\1').gsub(/\s+/,'_')
+ x = %{
}
+ if @output[:html_mnt].class == File
+ @output[:html_mnt] << x
+ end
+ @output[:html] << x
+ a[1][:md].each do |x|
+ if @output[:html_mnt].class == File
+ @output[:html_mnt] << %{
}
+ end
+ end
+ end
+ self
+ end
+ def screen_print
+ def cycle
+ the_idx=@the_idx
+ the_idx.sort.each do |a|
+ puts a[0]
+ a[1][:md].each do |x|
+ puts "\t" + x[:file]
+ end
+ end
+ end
+ self
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v0/harvest_topics.rb b/lib/sisu/v0/harvest_topics.rb
new file mode 100644
index 00000000..bda82629
--- /dev/null
+++ b/lib/sisu/v0/harvest_topics.rb
@@ -0,0 +1,539 @@
+# coding: utf-8
+=begin
+
+ * Name: SiSU
+
+ * Description: a framework for document structuring, publishing and search
+ metadata harvest, extract topics and associated writings from document set
+ (topics use topic_register header)
+
+ * Author: Ralph Amissah
+
+ * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008 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: simple xml representation (sax style)
+
+=end
+module HARVEST_topics
+ require "#{SiSU_lib}/author_format"
+ class Songsheet
+ def initialize(opt)
+ @opt=opt
+ @file_list=opt.files
+ @env=SiSU_Env::Info_env.new
+ end
+ def songsheet
+ files,idx_array=[],[]
+ @file_list.each do |f|
+ if f =~/.+?\.ss[tm]$/
+ files << f[/(.+?\.ss[tm])$/,1]
+ else
+ print "not .sst or .ssm ? << #{f} >> "
+ end
+ end
+ files.each do |filename|
+ file_array=[]
+ File.open(filename,'r') do |file|
+ file.each_line("\n\n") do |line|
+ if line =~/^@\S+?: /
+ #line=line.gsub(/\n/,' ')
+ file_array << line
+ elsif line =~/^(?:\s*\n|%+ )/
+ else break
+ end
+ end
+ end
+ #file_array=IO.readlines("#{filename}","\n\r")
+ idx_array=HARVEST_topics::Harvest.new(file_array,filename,idx_array).extract_harvest
+ end
+ the_idx=HARVEST_topics::Index.new(idx_array,@@the_idx_topics).construct_book_topic_index
+ #HARVEST_topics::Output_index.new(the_idx).screen_print.cycle
+ HARVEST_topics::Output_index.new(@opt,the_idx).html_print.html_songsheet
+ puts "file://#{@env.path.output_md_harvest}/harvest_topics.html"
+ puts "file://#{@env.path.pwd}/harvest_topics.html" if @opt.cmd.inspect =~/-M/
+ end
+ end
+ class Harvest
+ def initialize(data,filename,idx_array)
+ @data,@filename,@idx_array=data,filename,idx_array
+ end
+ def extract_harvest
+ data,filename,idx_array=@data,@filename,@idx_array
+ @idx_lst,@title,@subtitle,@fulltitle,@author,@author_format=nil,nil,nil,nil,nil,nil
+ rgx={}
+ rgx[:author]=/^@(?:author|creator):\s+(.+)/
+ rgx[:title]=/^@title:\s+(.+)/
+ rgx[:subtitle]=/^@subtitle:\s+(.+)/
+ rgx[:idx]=/^@topic_register:\s+(.+)/
+ data.each do |para|
+ if para=~ rgx[:idx]
+ @idx_list=rgx[:idx].match(para)[1]
+ end
+ if para=~ rgx[:title]
+ @title=rgx[:title].match(para)[1]
+ end
+ if para=~ rgx[:subtitle]
+ @subtitle=rgx[:subtitle].match(para)[1]
+ end
+ if para=~ rgx[:author]
+ @author_format=rgx[:author].match(para)[1]
+ end
+ break if @title and @subtitle and @author and @idx_lst
+ end
+ @fulltitle=if @subtitle
+ @title + ' - ' + @subtitle
+ else @title
+ end
+ if @title and @author_format and @idx_list
+ creator=FORMAT::Author.new(@author_format.strip).author_details
+ @authors,@authorship=creator[:authors],creator[:authorship]
+ file=filename.sub(/\.ss[mt]$/,'')
+ idx_array <<=if @idx_list =~/;/
+ g=@idx_list.scan(/[^;]+/)
+ idxl=[]
+ g.each do |i|
+ i.strip!
+ idxl << { :filename => filename, :file => file, :rough_idx => i, :title => @fulltitle, :author => creator }
+ end
+ idxl
+ else { :filename => filename, :file => file, :rough_idx => @idx_list, :title => @fulltitle, :author => creator }
+ end
+ else
+ p "missing author field: #@filename title: #@title; author: #@author_format; idx: #@idx_list"
+ end
+ idx_array.flatten!
+ idx_array
+ end
+ end
+ class Index
+ def initialize(idx_array,the_idx)
+ @idx_array,@the_idx=idx_array,the_idx
+ @@the_idx_topics=@the_idx
+ end
+ def capital(txt)
+ txt[0].chr.capitalize + txt[1,txt.length]
+ end
+ def contents(hash,idx)
+ names=''
+ idx[:author][:last_first_format_a].each do |n|
+ s=n.sub(/(.+?)(?:,.+|$)/,'\1').gsub(/\s+/,'_')
+ names += %{#{n}, }
+ end
+ hash << { :filename => idx[:filename], :file => idx[:file], :author => names, :title => idx[:title] }
+ end
+ def construct_book_topic_index
+ idx_array=@idx_array
+ idx_array.each do |idx|
+ @lv0,@lv1,@lv2,@lv3,@lv4={},{},{},{},{}
+ if idx[:rough_idx]
+ idx_lst=idx[:rough_idx].scan(/[^:]+/)
+ else
+ puts "no topic register in: << #{idx[:filename]} >>"
+ next
+ end
+ idx_lst_alt=[]
+ idx_lst.each {|lev| idx_lst_alt << lev.scan(/[^|]+/)}
+ depth = idx_lst_alt.length - 1
+ range = 0..depth
+ range.each do |t|
+ if idx_lst_alt[t]
+ case t
+ when 0
+ lev0=idx_lst_alt[t]
+ lev0.each do |lv0|
+ lv0=capital(lv0)
+ if @@the_idx_topics[lv0].class==NilClass
+ @@the_idx_topics[lv0]={:md => []}
+ end
+ @lv0=lv0 if lev0.length == 1
+ j=@@the_idx_topics[lv0][:md]
+ contents(j,idx) if idx_lst_alt.length - 1 == t
+ end
+ when 1
+ lev1=idx_lst_alt[t]
+ lev1.each do |lv1|
+ lv1=capital(lv1)
+ if @@the_idx_topics[@lv0][lv1].class==NilClass
+ @@the_idx_topics[@lv0][lv1]={:md => []}
+ end
+ @lv1=lv1 if lev1.length == 1
+ j=@@the_idx_topics[@lv0][lv1][:md]
+ contents(j,idx) if idx_lst_alt.length - 1 == t
+ end
+ when 2
+ lev2=idx_lst_alt[t]
+ lev2.each do |lv2|
+ lv2=capital(lv2)
+ if @@the_idx_topics[@lv0][@lv1][lv2].class==NilClass
+ @@the_idx_topics[@lv0][@lv1][lv2]={:md => []}
+ end
+ @lv2=lv2 if lev2.length == 1
+ j=@@the_idx_topics[@lv0][@lv1][lv2][:md]
+ contents(j,idx) if idx_lst_alt.length - 1 == t
+ end
+ when 3
+ lev3=idx_lst_alt[t]
+ lev3.each do |lv3|
+ lv3=capital(lv3)
+ if @@the_idx_topics[@lv0][@lv1][@lv2][lv3].class==NilClass
+ @@the_idx_topics[@lv0][@lv1][@lv2][lv3]={:md => []}
+ end
+ @lv3=lv3 if lev3.length == 1
+ j=@@the_idx_topics[@lv0][@lv1][@lv2][lv3][:md]
+ contents(j,idx) if idx_lst_alt.length - 1 == t
+ end
+ when 4
+ lev4=idx_lst_alt[t]
+ lev4.each do |lv4|
+ lv4=capital(lv4)
+ if @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4].class==NilClass
+ @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4]={:md => []}
+ end
+ @lv4=lv4 if lev4.length == 1
+ j=@@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4][:md]
+ contents(j,idx) if idx_lst_alt.length - 1 == t
+ end
+ end
+ end
+ end
+ end
+ @the_idx
+ end
+ end
+ class Output_index
+ def initialize(opt,the_idx)
+ @opt,@the_idx=opt,the_idx
+ @env=SiSU_Env::Info_env.new
+ @rc=Get_init.instance.yamlrc
+ @page='sisu_manifest.html'
+ @output={}
+ @output[:html]=File.new("#{@env.path.output_md_harvest}/harvest_topics.html",'w')
+ if @opt.cmd.inspect =~/-M/
+ @output[:html_mnt]=File.new("#{@env.path.pwd}/harvest_topics.html",'w')
+ end
+ @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
+ @letter=@alph.shift
+ end
+ def html_print
+ def html_songsheet
+ html_head
+ html_alph
+ html_body
+ html_tail
+ end
+ def html_head_adjust(type='')
+ css_path=if type !~/maintenance/
+ '../_sisu/css/harvest.css'
+ else 'harvest.css'
+ end
+ <
+
+
+SiSU Metadata Harvest - Topics
+
+
+
+
+
+WOK
+ end
+ def html_head
+ @output[:html_mnt] << html_head_adjust('maintenance') if @opt.cmd.inspect =~/-M/
+ @output[:html] << html_head_adjust
+ end
+ def html_alph
+ a=[]
+ a << '
'
+ @alph.each do |x|
+ a << if x =~/[0-9]/; ''
+ else
+ %{#{x}, }
+ end
+ end
+ @output[:html_mnt] << a if @opt.cmd.inspect =~/-M/
+ @output[:html] << a.join
+ end
+ def html_tail
+ a=[]
+ a <<<
+
+WOK
+ @output[:html_mnt] << a if @output[:html_mnt].class == File
+ @output[:html] << a
+ end
+ def do_html(html)
+ @output[:html] << html
+ end
+ def do_html_maintenance(html)
+ @output[:html_mnt] << html if @output[:html_mnt].class == File
+ end
+ def do_string(attrib,string)
+ html=%{
#{string}
}
+ do_html(html)
+ do_html_maintenance(html) if @output[:html_mnt].class == File
+ end
+ def do_string_default(attrib,string)
+ html=%{
#{string}
}
+ do_html(html)
+ end
+ def do_string_maintenance(attrib,string)
+ html=%{
#{string}
}
+ do_html_maintenance(html) if @output[:html_mnt].class == File
+ end
+ def do_string_name(attrib,string)
+ f=/^(\S)/.match(string)[1]
+ if @letter < f
+ while @letter < f
+ if @alph.length > 0
+ @letter=@alph.shift
+ if @output[:html_mnt].class == File
+ @output[:html_mnt] << %{\n
}
+ do_html(html)
+ do_html_maintenance(html) if @output[:html_mnt].class == File
+ end
+ def do_array(lv,array)
+ lv+=1
+ array.each do |b|
+ do_case(lv,b)
+ end
+ end
+ def do_hash_md(attrib,hash)
+ html=%{#{hash[:title]} - #{hash[:author]}}
+ do_string_default(attrib,html)
+ end
+ def do_hash_md_maintenance(attrib,hash)
+ if @output[:html_mnt].class == File #should not be run for presentation output
+ html=%{[src] #{hash[:title]} - #{hash[:author]}}
+ do_string_maintenance(attrib,html)
+ end
+ end
+ def do_hash(lv,hash)
+ lv+=1
+ key=[]
+ hash.each_key do |m|
+ if m == :md
+ do_case(lv,hash[m])
+ elsif m != :title and m != :author and m != :filename and m != :file and m != :rough_idx
+ key << m
+ elsif m == :title
+ do_hash_md('work',hash)
+ do_hash_md_maintenance('work',hash)
+ end
+ end
+ if key.length > 0
+ key.sort.each do |m|
+ attrib="lev#{lv}"
+ if lv == 0
+ do_string_name(attrib,m)
+ else do_string(attrib,m)
+ end
+ do_case(lv,hash[m])
+ end
+ end
+ end
+ def do_case(lv,a)
+ y = a.class
+ case
+ when y == String
+ attrib="lev#{lv}"
+ if lv == 0
+ do_string_name(attrib,a)
+ else do_string(attrib,a)
+ end
+ #do_string_name(attrib,a)
+ when y == Array
+ do_array(lv,a)
+ when y == Hash
+ do_hash(lv,a)
+ end
+ end
+ def html_body
+ the_idx=@the_idx
+ the_idx.sort.each do |a|
+ do_case(-1,a)
+ end
+ end
+ self
+ end
+ def screen_print
+ def do_string(lv,string)
+ s=' '*4
+ puts s*lv + string
+ end
+ def do_array(lv,array)
+ lv+=1
+ array.each do |b|
+ do_case(lv,b)
+ end
+ end
+ def do_hash_md(lv,hash)
+ string=hash[:title] + ' - ' + hash[:author]
+ do_string(lv,string)
+ end
+ def do_hash(lv,hash)
+ lv+=1
+ key=[]
+ hash.each_key do |m|
+ if m == :md
+ do_case(lv,hash[m])
+ elsif m != :title and m != :author and m != :filename and m != :file and m != :rough_idx
+ key << m
+ elsif m == :title
+ do_hash_md(lv,hash)
+ end
+ end
+ if key.length > 0
+ key.sort.each do |m|
+ do_string(lv,m)
+ do_case(lv,hash[m])
+ end
+ end
+ end
+ def do_case(lv,a)
+ s=' '*4
+ y = a.class
+ case
+ when y == String
+ do_string(lv,a)
+ when y == Array
+ do_array(lv,a)
+ when y == Hash
+ do_hash(lv,a)
+ end
+ end
+ def cycle
+ the_idx=@the_idx
+ the_idx.each do |a|
+ do_case(-1,a)
+ end
+ end
+ self
+ end
+ def screen_print_unsorted
+ def do_string(lv,string)
+ s=' '*4
+ puts s*lv + string
+ end
+ def do_array(lv,array)
+ lv+=1
+ array.each do |b|
+ do_case(lv,b)
+ end
+ end
+ def do_hash_md(lv,hash)
+ string=hash[:title] + ' - ' + hash[:author]
+ do_string(lv,string)
+ end
+ def do_hash(lv,hash)
+ lv+=1
+ hash.each_key do |m|
+ if m == :md
+ do_case(lv,hash[m])
+ else
+ if m != :title and m != :author and m != :filename and m != :file and m != :rough_idx
+ do_string(lv,m)
+ do_case(lv,hash[m])
+ elsif m == :title
+ do_hash_md(lv,hash)
+ else
+ end
+ end
+ end
+ end
+ def do_case(lv,a)
+ s=' '*4
+ y = a.class
+ case
+ when y == String
+ do_string(lv,a)
+ when y == Array
+ do_array(lv,a)
+ when y == Hash
+ do_hash(lv,a)
+ end
+ end
+ def cycle
+ the_idx=@the_idx
+ the_idx.each do |a|
+ do_case(-1,a)
+ end
+ end
+ self
+ end
+ end
+end
+__END__
+terms -|_ t{tl1} -|_ {fa}[fa]{filenames and other details}
+ | |_ {tl2} -|_ {fa}[fa]{filenames and other details}
+ | | |_{tl3} -|_ {fa}[fa]{filenames and other details}
+ | | | |_{tl4} - {fa}[fa]{filenames and other details}
+ | | | |
+ | | | |_{tl4a} - {fa}[fa]{filenames and other details}
+ | | | |
+ | | | |_{tl4b} - {fa}[fa]{filenames and other details}
+ | | | |
+ | | | |_ ...
+ | | |
+ | | |_{tl3a} - {fa}[fa]{filenames and other details}
+ | |
+ | |_{tl2a} - {fa}[fa]{filenames and other details}
+ |
+ |_ t{tl1a} -|_ {fa}[fa]{filenames and other details}
+ |_ ...
diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb
index 22736aac..6b819f95 100644
--- a/lib/sisu/v0/help.rb
+++ b/lib/sisu/v0/help.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb
index a368ff3d..5f2a1954 100644
--- a/lib/sisu/v0/html.rb
+++ b/lib/sisu/v0/html.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb
index a73f3533..4010209c 100644
--- a/lib/sisu/v0/html_format.rb
+++ b/lib/sisu/v0/html_format.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_minitoc.rb b/lib/sisu/v0/html_minitoc.rb
index 44ed57d2..db1dce97 100644
--- a/lib/sisu/v0/html_minitoc.rb
+++ b/lib/sisu/v0/html_minitoc.rb
@@ -15,8 +15,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_promo.rb b/lib/sisu/v0/html_promo.rb
index e769cf1e..68fc2fbc 100644
--- a/lib/sisu/v0/html_promo.rb
+++ b/lib/sisu/v0/html_promo.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb
index 3e72f855..fb04f2f9 100644
--- a/lib/sisu/v0/html_scroll.rb
+++ b/lib/sisu/v0/html_scroll.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb
index a67b11b3..a3199903 100644
--- a/lib/sisu/v0/html_segments.rb
+++ b/lib/sisu/v0/html_segments.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_table.rb b/lib/sisu/v0/html_table.rb
index 24721835..7f28ed93 100644
--- a/lib/sisu/v0/html_table.rb
+++ b/lib/sisu/v0/html_table.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/html_tune.rb b/lib/sisu/v0/html_tune.rb
index f910da66..3926e0a5 100644
--- a/lib/sisu/v0/html_tune.rb
+++ b/lib/sisu/v0/html_tune.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb
index 58ea4c4f..93766140 100644
--- a/lib/sisu/v0/hub.rb
+++ b/lib/sisu/v0/hub.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
@@ -133,7 +132,7 @@ module SiSU
when /^xml_scaffold$/; SiSU_XML_scaffold::Source.new(@opt).read # -T
#when /^air$/; SiSU_Air::Source.new(@opt).read # -A
when /^plaintext$/; SiSU_Plaintext::Source.new(@opt).read # -a
- when /^wikispeak$/; SiSU_Wikispeak::Source.new(@opt).read # -g
+ #when /^git$/; SiSU_Git::Source.new(@opt).read # -g
#when /^wikispeak$/; SiSU_Wikispeak::Source.new(@opt).read # -g
when /^odf$/; SiSU_ODF::Source.new(@opt).read # -o
when /^xml_md_oai_pmh_dc$/; SiSU_XML_metadata::OAI_PMH.new(@opt).read # -O
@@ -164,22 +163,25 @@ module SiSU
Operations.new(@opt).not_found unless @req =~/^conf$/
end
elsif FileTest.file?(put)
- case @req
- when /^urls$/; SiSU_urls::Source.new(@opt).read # -u -v -V -M
- when /^remote$/
- case @message
- when /scp/; SiSU_Remote::Put.new(@opt).scp # -r
- when /rsync/; SiSU_Remote::Put.new(@opt).rsync # -R
- else #SiSU_Remote::Put.new(put,@opt.cmd).scp
+ if @opt.mod.inspect !~/harvest/ #decide whether should permit harvest in single operation
+ case @req
+ when /^urls$/; SiSU_urls::Source.new(@opt).read # -u -v -V -M
+ when /^remote$/
+ case @message
+ when /scp/; SiSU_Remote::Put.new(@opt).scp # -r
+ when /rsync/; SiSU_Remote::Put.new(@opt).rsync # -R
+ else #SiSU_Remote::Put.new(put,@opt.cmd).scp
+ end
end
+ @n_do=@n_do+1
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed")
+ tell.files_processed unless @opt.cmd =~/q/
end
- @n_do=@n_do+1
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed")
- tell.files_processed unless @opt.cmd =~/q/
else Operations.new(@opt).not_found
end
end
end
+ SiSU_Remote::Put.new(@opt).rsync_harvest if @opt.cmd.inspect =~/R/ and @opt.mod.inspect =~/harvest/
elsif @req =~/^dbi$/; SiSU_DBI::SiSU_SQL.new(@opt).connect # -D -d
elsif @req=~/^sisupod_make$/; SiSU_Doc::Source.new(@opt).read # -S
end
@@ -276,6 +278,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
Op.new(@opt,req,msg).select if req and msg
end
def actions
+ if @opt.mod.inspect =~/--harvest/
+ require "#{SiSU_lib}/harvest"
+ end
if @opt.mod.inspect =~/--convert|--to|--from/
require "#{SiSU_lib}/sst_convert_markup"
end
@@ -424,8 +429,8 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
#end
if @opt.cmd =~/a/; op('plaintext','plaintext') #% -a #-A -f -e -E plaintext -a creates ms-dos type; -A creates unix type, plaintext file
end
- if @opt.cmd =~/g/; op('wikispeak','wikispeak') #% -g wiki
- end
+ #if @opt.cmd =~/g/; op('git','git') #% -g git
+ #end
#if @opt.cmd =~/g/; op('wikispeak','wikispeak') #% -g wiki
#end
if @opt.cmd =~/o/; op('odf','OpenDocument') #% -o opendocument
@@ -484,9 +489,14 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
end
if @opt.cmd =~/Y/; op('sitemaps','Sitemap') #% -Y sitemap
end
- if @opt.cmd =~/r/; op('remote','scp') #% -r copy to remote server
- end
- if @opt.cmd =~/R/; op('remote','rsync') #% -R copy to remote server
+ if @opt.mod.inspect !~/--harvest/
+ if @opt.cmd =~/r/; op('remote','scp') #% -r copy to remote server
+ end
+ if @opt.cmd =~/R/; op('remote','rsync') #% -R copy to remote server
+ end
+ else
+ if @opt.cmd =~/R/; op('remote','rsync_harvest') #% -R copy to remote server
+ end
end
if @opt.cmd =~/[QuUvVM]/; op('urls','urls') #% -Q -u -v -V -M urls
end
@@ -518,7 +528,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
SiSU_Remote::Put.new(@opt).rsync_sitemaps
end
else #% help instructions
- unless @opt.mod.inspect =~/--convert|--to|--from/
+ unless @opt.mod.inspect =~/--convert|--to|--from|--harvest/
if @opt.mod.inspect =~/--help/ \
and not @opt.what.empty?
SiSU_Help::Help.new(@opt.what).help_request
diff --git a/lib/sisu/v0/i18n.rb b/lib/sisu/v0/i18n.rb
index 286ba65d..673ab08d 100644
--- a/lib/sisu/v0/i18n.rb
+++ b/lib/sisu/v0/i18n.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb
index 307d9ced..0b7c7bfc 100644
--- a/lib/sisu/v0/manifest.rb
+++ b/lib/sisu/v0/manifest.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb
index ef9f6bab..d4b315f4 100644
--- a/lib/sisu/v0/manpage.rb
+++ b/lib/sisu/v0/manpage.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/manpage_format.rb b/lib/sisu/v0/manpage_format.rb
index 28756455..b7d0ea34 100644
--- a/lib/sisu/v0/manpage_format.rb
+++ b/lib/sisu/v0/manpage_format.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb
index 05a6272c..ca7a4196 100644
--- a/lib/sisu/v0/odf.rb
+++ b/lib/sisu/v0/odf.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/options.rb b/lib/sisu/v0/options.rb
index e433c304..e7cf57ac 100644
--- a/lib/sisu/v0/options.rb
+++ b/lib/sisu/v0/options.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/param.rb b/lib/sisu/v0/param.rb
index 6ab30e86..2829abe1 100644
--- a/lib/sisu/v0/param.rb
+++ b/lib/sisu/v0/param.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
@@ -119,19 +118,20 @@ module SiSU_Param
@doc={ :lv=>[] }
@doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','',''
@@publisher='SiSU scribe'
- attr_accessor :cmd,:mod,:env,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:sfx,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:dc_title,:html_title,:subtitle,:subtitle_tex,:creator_home,:dc_creator,:translator,:illustrator,:prepared_by,:digitized_by,:dc_subject,:dc_description,:dc_publisher,:dc_contributor,:dc_date,:dc_date_created,:dc_date_issued,:dc_date_available,:dc_date_valid,:dc_date_modified,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:dc_type,:dc_format,:dc_identifier,:dc_source,:dc_language,:language_original,:dc_relation,:dc_coverage,:dc_rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:flag_auto_heading_num,:markup,:markup_instruction,:markup_version,:markup_declared,:make_bold,:make_italic,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:file_size,:user,:home,:hostname,:pwd,:firstseg,:programs,:creator_copymark,:lang,:en,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:man_section,:man_name,:man_synopsis,:ec,:opt,:sem_tag,:book_idx,:doc_cont_idx
+ attr_accessor :cmd,:mod,:env,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:sfx,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:dc_title,:html_title,:subtitle,:subtitle_tex,:creator_home,:dc_creator,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:dc_subject,:dc_description,:dc_publisher,:dc_contributor,:dc_date,:dc_date_created,:dc_date_issued,:dc_date_available,:dc_date_valid,:dc_date_modified,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:dc_type,:dc_format,:dc_identifier,:dc_source,:dc_language,:language_original,:dc_relation,:dc_coverage,:dc_rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:flag_auto_heading_num,:markup,:markup_instruction,:markup_version,:markup_declared,:make_bold,:make_italic,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:file_size,:user,:home,:hostname,:pwd,:firstseg,:programs,:creator_copymark,:lang,:en,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:man_section,:man_name,:man_synopsis,:ec,:opt,:sem_tag,:book_idx,:topic_register,:original_publication_details
def initialize(fns_array,opt)
- @env=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@sfx=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@dc_title=@html_title=@subtitle=@subtitle_tex=@creator_home=@dc_creator=@translator=@illustrator=@prepared_by=@digitized_by=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_date_created=@dc_date_issued=@dc_date_available=@dc_date_valid=@dc_date_modified=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@language_original=@dc_relation=@dc_coverage=@dc_rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_auto_heading_num=@make_bold=@make_italic=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@file_size=@firstseg=@programs=@creator_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@man_synopsis=@doc_cont_idx=nil
+ @env=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@sfx=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@dc_title=@html_title=@subtitle=@subtitle_tex=@creator_home=@dc_creator=@translator=@illustrator=@prepared_by=@digitized_by=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_date_created=@dc_date_issued=@dc_date_available=@dc_date_valid=@dc_date_modified=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@language_original=@dc_relation=@dc_coverage=@dc_rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_auto_heading_num=@make_bold=@make_italic=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@file_size=@firstseg=@programs=@creator_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@man_synopsis=@topic_register=@original_publication_details=nil
@man_section=1
@man_name='man page "name/whatis" information not provided, set in header @man: name=[whatis information]'
@data,@fns,@cmd,@mod,@opt=fns_array,opt.fns,opt.cmd,opt.mod,opt #@data used as data
@flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=false,false,false,false,false,false,false
@seg_autoname_safe=true
@sem_tag=false
- @markup_instruction,@markup_declared,@image='','','' #check which other values should be set to empty rather than nil
+ @authorship,@markup_instruction,@markup_declared,@image='','','','' #check which other values should be set to empty rather than nil
@markup=@markup_instruction #use @markup_instruction
@doc,@fn,@make_italic,@make_bold,@tag_hash,@ec={},{},{},{},{},{},{}
@flv,@lang,@seg_names,@tags,@tag_array,@tag_a,@ec[:image],@ec[:audio],@ec[:multimedia]=Array.new(9){[]}
+ @authors=[]
@papersize_array=[]
@rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
@rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/
@@ -291,6 +291,38 @@ module SiSU_Param
else @dc_creator=/(?:0~|@)(?:creator|author)-?:?\s+(.+?)$/m.match(para)[1]
end
@dc_creator.strip!
+ authors=@dc_creator.scan(/[^;]+/)
+ authors.each do |a|
+ if a =~/"(.+?)"/
+ @authors << { :the => $1 }
+ else #if a =~/,/
+ x=a.scan(/[^,]+/)
+ if x.length == 1
+ @authors << { :the => x[0].strip }
+ elsif x.length == 2
+ @authors << { :the => x[0].strip, :others => x[1].strip }
+ else #p x.length
+ end
+ end
+ end
+ l = @authors.length
+ authorship=''
+ @authors.each_with_index do |a,i|
+ authorship += if a[:others]
+ if (l - i) > 1
+ "#{a[:others].strip} #{a[:the].strip}, "
+ else
+ "#{a[:others].strip} #{a[:the].strip}"
+ end
+ else
+ if (l - i) > 2
+ "#{a[:the].strip}, "
+ else
+ "#{a[:the].strip}"
+ end
+ end
+ end
+ @authorship=@dc_creator=authorship
when /^(?:0~(?:translator|translated_by)|@(?:translator|translated_by):)\s+(.+?)$/m #% metainfo
@translator=$1
when /^(?:0~(?:illustrator|illustrated_by)|@(?:illustrator|illustrated_by):)\s+(.+?)$/m #% metainfo
@@ -517,8 +549,9 @@ module SiSU_Param
end
when /^(?:0~suffix|@suffix:)\s+(.+?)$/m; @suffix=$1 #% metainfo
when /^(?:0~information|@information:)\s+(.+?)$/m; @information=$1 #% metainfo
- when /^(?:0~doc_cont(?:ent)?_in?de?x|@doc_cont(?:ent)?_in?de?x:)\s+(.+?)$/m; @doc_cont_idx=$1 #% metainfo, similar syntax to book index, leave out the ={} i.e. use equivalent of ={(.+?)}
+ when /^(?:0~topic_register|@topic_register:)\s+(.+?)$/m; @topic_register=$1 #% metainfo, similar syntax to book index, leave out the ={} i.e. use equivalent of ={(.+?)}
when /^(?:0~contact|@contact:)\s+(.+?)$/m; @contact=$1 #% metainfo
+ when /^(?:0~original_publication|@original_publication:)\s+(.+?)$/m; @original_publication=$1 #% details of original publication
when /^(?:0~icon|@icon:)\s+(.+?)$/m; @icon=$1 #% processing
when /^(?:0~promo|@promo:)\s+(.+?)$/m
@flag_promo=true
diff --git a/lib/sisu/v0/param_identify_markup.rb b/lib/sisu/v0/param_identify_markup.rb
index e86e51cd..f2d9e508 100644
--- a/lib/sisu/v0/param_identify_markup.rb
+++ b/lib/sisu/v0/param_identify_markup.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/particulars.rb b/lib/sisu/v0/particulars.rb
index 59b8956b..3fa4d4ab 100644
--- a/lib/sisu/v0/particulars.rb
+++ b/lib/sisu/v0/particulars.rb
@@ -9,15 +9,13 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007,
- 2008 Ralph Amissah All Rights Reserved.
+ 2007, 2008 Ralph Amissah All Rights Reserved.
* License: GPL 3 or later:
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb
index 754e366d..f7603d63 100644
--- a/lib/sisu/v0/plaintext.rb
+++ b/lib/sisu/v0/plaintext.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/plaintext_format.rb b/lib/sisu/v0/plaintext_format.rb
index cada3425..cd27b171 100644
--- a/lib/sisu/v0/plaintext_format.rb
+++ b/lib/sisu/v0/plaintext_format.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/relaxng.rb b/lib/sisu/v0/relaxng.rb
index 1b78651b..8aa9e1ad 100644
--- a/lib/sisu/v0/relaxng.rb
+++ b/lib/sisu/v0/relaxng.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/remote.rb b/lib/sisu/v0/remote.rb
index 4cfa9347..ea50f3bb 100644
--- a/lib/sisu/v0/remote.rb
+++ b/lib/sisu/v0/remote.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
@@ -71,26 +70,11 @@ module SiSU_Remote
end
@remote=SiSU_Env::Info_remote.new(@opt)
end
- def scp
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
- @remote.scp
- end
def rsync
tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
tell.dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync
end
- def scp_base
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement of base site ->','excluding images')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
- @remote.scp_base
- end
- def scp_base_all
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','complete')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
- @remote.scp_base_all
- end
def rsync_base
tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync')
tell.dark_grey_title_hi unless @opt.cmd =~/q/
@@ -106,6 +90,72 @@ module SiSU_Remote
tell.dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync_sitemaps
end
+ def rsync_harvest
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement metadata harvest ->','rsync_harvest')
+ tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ @remote.rsync_harvest
+ end
+ def scp
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
+ tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ @remote.scp
+ end
+ def scp_base
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement of base site ->','excluding images')
+ tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ @remote.scp_base
+ end
+ def scp_base_all
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','complete')
+ tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ @remote.scp_base_all
+ end
+ #def rsync
+ # def do #rsync
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.rsync
+ # end
+ # def base
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync')
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.rsync_base
+ # end
+ # def base_sync
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync and sync')
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.rsync_base_sync
+ # end
+ # def sitemaps
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement sitemaps ->','rsync')
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.rsync_sitemaps
+ # end
+ # def harvest
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement metadata harvest ->','rsync')
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.rsync_harvest
+ # end
+ # self
+ #end
+ #def scp
+ # def do #scp
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.scp
+ # end
+ # def scp_base
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement of base site ->','excluding images')
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.scp_base
+ # end
+ # def scp_base_all
+ # tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','complete')
+ # tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ # @remote.scp_base_all
+ # end
+ # self
+ #end
end
class Get
def initialize(opt,get_s)
diff --git a/lib/sisu/v0/response.rb b/lib/sisu/v0/response.rb
index cce90d49..f60cf1ba 100644
--- a/lib/sisu/v0/response.rb
+++ b/lib/sisu/v0/response.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/rexml.rb b/lib/sisu/v0/rexml.rb
index 4620c3ab..22fa4cb1 100644
--- a/lib/sisu/v0/rexml.rb
+++ b/lib/sisu/v0/rexml.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/screen_text_color.rb b/lib/sisu/v0/screen_text_color.rb
index 0a2fb713..77cc4ed9 100644
--- a/lib/sisu/v0/screen_text_color.rb
+++ b/lib/sisu/v0/screen_text_color.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/share_src.rb b/lib/sisu/v0/share_src.rb
index 87569cfa..c26b5765 100644
--- a/lib/sisu/v0/share_src.rb
+++ b/lib/sisu/v0/share_src.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/share_src_kdissert.rb b/lib/sisu/v0/share_src_kdissert.rb
index 3f9cdebb..bcb6c1da 100644
--- a/lib/sisu/v0/share_src_kdissert.rb
+++ b/lib/sisu/v0/share_src_kdissert.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/shared_html.rb b/lib/sisu/v0/shared_html.rb
index bb570347..eaa99aff 100644
--- a/lib/sisu/v0/shared_html.rb
+++ b/lib/sisu/v0/shared_html.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb
index 08d6997d..481f9436 100644
--- a/lib/sisu/v0/shared_html_lite.rb
+++ b/lib/sisu/v0/shared_html_lite.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/shared_sem.rb b/lib/sisu/v0/shared_sem.rb
index 0fd5b46c..8c5f613f 100644
--- a/lib/sisu/v0/shared_sem.rb
+++ b/lib/sisu/v0/shared_sem.rb
@@ -9,15 +9,13 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007,
- 2008 Ralph Amissah All Rights Reserved.
+ 2007, 2008 Ralph Amissah All Rights Reserved.
* License: GPL 3 or later:
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/shared_structure.rb b/lib/sisu/v0/shared_structure.rb
index 47b8ff0d..e323edf5 100644
--- a/lib/sisu/v0/shared_structure.rb
+++ b/lib/sisu/v0/shared_structure.rb
@@ -15,8 +15,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/shared_txt.rb b/lib/sisu/v0/shared_txt.rb
index 198b8ce8..91389538 100644
--- a/lib/sisu/v0/shared_txt.rb
+++ b/lib/sisu/v0/shared_txt.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb
index 41e8c393..aad7c17e 100644
--- a/lib/sisu/v0/shared_xml.rb
+++ b/lib/sisu/v0/shared_xml.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sisupod_make.rb b/lib/sisu/v0/sisupod_make.rb
index cb627bcf..79989726 100644
--- a/lib/sisu/v0/sisupod_make.rb
+++ b/lib/sisu/v0/sisupod_make.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sitemaps.rb b/lib/sisu/v0/sitemaps.rb
index 2805d0a6..c08a0789 100644
--- a/lib/sisu/v0/sitemaps.rb
+++ b/lib/sisu/v0/sitemaps.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/spell.rb b/lib/sisu/v0/spell.rb
index 8f89c470..5d9712af 100644
--- a/lib/sisu/v0/spell.rb
+++ b/lib/sisu/v0/spell.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_convert_markup.rb b/lib/sisu/v0/sst_convert_markup.rb
index dfad95d9..9405ba3e 100644
--- a/lib/sisu/v0/sst_convert_markup.rb
+++ b/lib/sisu/v0/sst_convert_markup.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_do_inline_footnotes.rb b/lib/sisu/v0/sst_do_inline_footnotes.rb
index 514eb2c8..6b566a0b 100644
--- a/lib/sisu/v0/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v0/sst_do_inline_footnotes.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_from_kdissert.rb b/lib/sisu/v0/sst_from_kdissert.rb
index 04e71b49..c77b39db 100644
--- a/lib/sisu/v0/sst_from_kdissert.rb
+++ b/lib/sisu/v0/sst_from_kdissert.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_from_xml.rb b/lib/sisu/v0/sst_from_xml.rb
index af43e611..3ec27c5a 100644
--- a/lib/sisu/v0/sst_from_xml.rb
+++ b/lib/sisu/v0/sst_from_xml.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_identify_markup.rb b/lib/sisu/v0/sst_identify_markup.rb
index 3fbac3f3..6b5a824b 100644
--- a/lib/sisu/v0/sst_identify_markup.rb
+++ b/lib/sisu/v0/sst_identify_markup.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
@@ -257,7 +256,7 @@ WOK
SiSU 0.69 same as previous, adds book index tags
/^=\{.+?\}$/
e.g. appended to a paragraph, on a new-line (without a blank line in between)
- logical structure produced assuming this is the first text "object"
+ logical structure produced assuming this is the first text "object"
={GNU/Linux community distribution:Debian+2|Fedora|Gentoo;Free Software Foundation+5}
Free Software Foundation, 1-6
diff --git a/lib/sisu/v0/sst_to_s_xml_dom.rb b/lib/sisu/v0/sst_to_s_xml_dom.rb
index 30dc370a..858a12d6 100644
--- a/lib/sisu/v0/sst_to_s_xml_dom.rb
+++ b/lib/sisu/v0/sst_to_s_xml_dom.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_to_s_xml_node.rb b/lib/sisu/v0/sst_to_s_xml_node.rb
index d9451149..b5b6e58b 100644
--- a/lib/sisu/v0/sst_to_s_xml_node.rb
+++ b/lib/sisu/v0/sst_to_s_xml_node.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sst_to_s_xml_sax.rb b/lib/sisu/v0/sst_to_s_xml_sax.rb
index e6864405..706ea643 100644
--- a/lib/sisu/v0/sst_to_s_xml_sax.rb
+++ b/lib/sisu/v0/sst_to_s_xml_sax.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index 2481cbdc..57695904 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -14,8 +14,7 @@
SiSU, a framework for document structuring, publishing and search
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Ralph Amissah
+ 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
@@ -846,6 +845,7 @@ module SiSU_Env
@stub_pwd=@@pwd[m,1]
@stub_src=@stub_pwd + '/src'
@stub_pod=@stub_pwd + '/pod'
+ @stub_md=@stub_pwd + '/sisu_site_metadata'
end
def user
@sys.user
@@ -879,6 +879,9 @@ module SiSU_Env
def stub_pwd #200412
@stub_pwd
end
+ def stub_md_harvest
+ @stub_md
+ end
def stub_src
@stub_src
end
@@ -1263,6 +1266,9 @@ WOK
def stub_pod
@stub_pod
end
+ def stub_md_harvest
+ @stub_md
+ end
def etc
defaults[:sisu_etc] #live/dynamic
# @sys.sisu_etc #broken: live/dynamic
@@ -1359,9 +1365,15 @@ WOK
def output_src #web/webserv output directory... subdirectory into which further subdirectories are made based on file names
"#{path.output}/src"
end
+ def output_md_harvest
+ "#{path.output}/sisu_site_metadata"
+ end
def output_pod
"#{path.output}/pod"
end
+ def output_harvest
+ "#{path.output}/sisu_site_metadata"
+ end
def manpage
"#{path.output}/man"
end
@@ -2269,6 +2281,11 @@ WOK
"#{@env.path.output}/pod"
else @env.path.output_pod
end
+ @source_path_harvest=if @fnb \
+ and not @fnb.empty?
+ "#{@env.path.output}/sisu_site_metadata"
+ else @env.path.output_harvest
+ end
@local_sisu_source=if @filetypes =~/\S/; "#@source_path/#@filetypes"
else @source_path
end
@@ -2486,7 +2503,7 @@ WOK
if FileTest.file?("#{local_pod}/#{src_pod}")
System_call.new("#{local_pod}/#{src_pod}",remote_pod,@opt.cmd).rsync
end
- elsif @opt.cmd =~/U/
+ elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "#{local_gen} -> #{remote_gen}"
if FileTest.file?("#{local_src}/#{src_doc}") \
@@ -2603,6 +2620,20 @@ WOK
end
end
end
+ def rsync_harvest
+ self.remote_host_base.each do |remote_conn|
+ local=@source_path_harvest
+ remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/."
+ if @@flag_remote
+ delete_extra_files='--delete' # '--delete-after'
+ System_call.new(local,remote).rsync(delete_extra_files)
+ elsif @opt.cmd =~/U/
+ puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
+ puts "rsync_sitemaps: #{local} -> #{remote}"
+ else puts "permission not granted #{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
+ end
+ end
+ end
end
class Info_version