diff options
44 files changed, 1384 insertions, 1035 deletions
| @@ -9,11 +9,50 @@ Reverse Chronological:  %% STABLE MANIFEST -%% sisu_0.70.0.orig.tar.gz (2008-12-02:48/2) +%% sisu_0.70.1.orig.tar.gz (2008-12-14:49/7) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.70.1.orig.tar.gz +  sisu_0.70.1.orig.tar.gz +  sisu_0.70.1-1.dsc +  sisu_0.70.1-1.diff.gz + +  * harvest +    * improved integration with sisu +    * close output files before remote posting +    * ensure html output is read by browser as utf-8 +    * add publication date to author works summary +    [integration not quite complete as not added to sql, reason, each addition +    of a field requires users recreating database, and there are other metadata +    header additions under consideration, though unavoidable reduce the number +    by grouping] + +  * manifest, show topic register metadata for each document + +  * css main html modified, run: sisu -CC +    * left margin changed, affects html generally +    * table th and td elements text top aligned +    * additions for manifest display of topic_register + +  * html tables +    * html structure, fix +    * column width, fix + +  * latex/pdf bullet mark (bug in texlive, missing (at this instant) provide +    workaround) + +  * param, additional metadata fields + +  * sql (postgresql), add proposed metadata fields for though not yet populated +    [if changes correctly anticipated, will enable future use of database +    structure built with current version, without need to re-create, will not +    affect existing sisu databases] + +  * emacs syntax highlighter update (metadata fields) + +%% sisu_0.70.0.orig.tar.gz (2008-12-03:48/3)  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 +  51e4d5c2ac3c490332d8468de2400abcf454b55ac1e21ec625680a346fb41e4a 1540091 sisu_0.70.0.orig.tar.gz +  19639ff718204575e66da774fa90a18644c964535c4a94ddc9d76651cac36539 1159 sisu_0.70.0-1.dsc +  8b489270ea44f006c4406182d3d24f6ec5480f3f7379d4e6ce53d65bba8474aa 147054 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 @@ -58,6 +97,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.70.0.orig.tar.gz    * tidy copyright marks in program headers, remove repetition of dates +  [date changed, built just after midnight] +  %% 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/data/doc/sisu/html/sisu.1.html b/data/doc/sisu/html/sisu.1.html index 1848611b..25b6e7e4 100644 --- a/data/doc/sisu/html/sisu.1.html +++ b/data/doc/sisu/html/sisu.1.html @@ -723,13 +723,13 @@ up files are available as html with syntax highlighting for viewing: <<a href  <p>/usr/share/doc/sisu/sisu_markup_samples/non-free   <p> 8. MARKUP OF HEADERS    <p> - 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.  -<p>  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:  + Headers contain either: semantic meta-data about a document, which can +be used by any output module of the program, or; processing instructions. + +<p>  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:   <p>   <p> <br>  <pre>  % this would be a comment @@ -742,18 +742,25 @@ one (without the comments):  <pre>  % SiSU 0.57    @title: SiSU    @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 using semi-colon    @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 +  @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: 2007-09-16 +  % original publication date unless the substantive text is updated/modified, +then date of update    @date.created: 2002-08-28    @date.issued: 2002-08-28    @date.available: 2002-08-28    @date.modified: 2007-09-16 -  @date: 2007-09-16    @level: new=C; break=1; num_top=1    % comment: in this @level header num_top=1 starts automatic heading numbering  at heading level 1 (numbering continues 3 levels down); the new and break @@ -1147,17 +1154,17 @@ is used there is neither decoration nor hyperlinking, code blocks are discussed  <p>  <b>markup example:</b>   <p>   <p> <br> -<pre>      [ tux.png ] +<pre>  { tux.png 64x80 }image    % various url linked images -      [ tux.png ] -      [ GnuDebianLinuxRubyBetterWay.png ] +  {tux.png 64x80 +  {GnuDebianLinuxRubyBetterWay.png 100x101    {~^ ruby_logo.png  </pre>  <p>  <b>resulting output:</b>   <p>  [ tux.png ]   <p>  tux.png 64x80   <p>  [  ruby_logo  (png  missing) - ]  [^14]  + ] [^14]   <p>  GnuDebianLinuxRubyBetterWay.png 100x101 and Ruby   <p>  <b>linked url footnote @@ -3378,15 +3385,15 @@ of this document: </dt>  </dt>  <dd></dd> -<dt>* Generated by: SiSU 0.68.0 of 2008w29/1 (2008-07-21) </dt> +<dt>* Generated by: SiSU 0.70.0 of 2008w48/3 (2008-12-03) </dt>  <dd></dd>  <dt>* Ruby version: ruby -1.8.7 (2008-06-20 patchlevel 22) [i486-linux] </dt> +1.8.7 (2008-08-11 patchlevel 72) [i486-linux] </dt>  <dd></dd> -<dt>* Last Generated on: Mon Jul 21 -02:54:35 -0400 2008 </dt> +<dt>* Last Generated on: Tue Dec 09 +12:24:07 -0500 2008 </dt>  <dd></dd>  <dt>* SiSU <a href='http://www.jus.uio.no/sisu'>http://www.jus.uio.no/sisu</a> diff --git a/data/doc/sisu/sisu_markup_samples/dfsg/free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst b/data/doc/sisu/sisu_markup_samples/dfsg/free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst index 503e6a6d..74b90a4f 100644 --- a/data/doc/sisu/sisu_markup_samples/dfsg/free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst +++ b/data/doc/sisu/sisu_markup_samples/dfsg/free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst @@ -4,10 +4,14 @@  @subtitle: Richard Stallman's Crusade for Free Software -@author: Sam Williams +@author: Williams, Sam  @rights: Copyright (C) Sam Williams 2002, published under the GNU Free Documentation License. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Document License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being no invariant sections, with the Front-Cover Texts being no invariant sections, and with the Back-Cover Texts being no invariant sections. A copy of the license is included in Appendix C, GNU Free Documentation License. All images are to be included verbatim when the document is copied, distributed, or modified under the terms of the GFDL. +@topic_register: SiSU:markup sample:book;copyright;GNU/Linux:GPL|copyleft|free software;free software;Software:Software Libré;GPL;Linux:GNU|Software Libré;book:biography + +@date: 2002 +  @language: US  @notes: March 2002 diff --git a/data/doc/sisu/sisu_markup_samples/dfsg/gpl2.fsf.sst b/data/doc/sisu/sisu_markup_samples/dfsg/gpl2.fsf.sst index dfabc14e..b091616b 100644 --- a/data/doc/sisu/sisu_markup_samples/dfsg/gpl2.fsf.sst +++ b/data/doc/sisu/sisu_markup_samples/dfsg/gpl2.fsf.sst @@ -6,6 +6,10 @@  @rights: Copyright Copyright 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +@date: 1991 + +@topic_register: GPL;Software:license;GNU/Linux:License:GPL +  @links: {Free Software Foundation}http://www.fsf.org  {GPL @ SiSU}http://www.jus.uio.no/sisu/gpl2.fsf  {Markup}http://www.jus.uio.no/sisu/sample/markup/gpl2.fsf.sst diff --git a/data/doc/sisu/sisu_markup_samples/dfsg/gpl3.fsf.sst b/data/doc/sisu/sisu_markup_samples/dfsg/gpl3.fsf.sst index 358accce..10889acf 100644 --- a/data/doc/sisu/sisu_markup_samples/dfsg/gpl3.fsf.sst +++ b/data/doc/sisu/sisu_markup_samples/dfsg/gpl3.fsf.sst @@ -6,6 +6,8 @@ SiSU 0.52  @rights: Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +@topic_register: GPL;Software:license +  @date: 2007-06-29  @date.available: 2007-06-29 @@ -242,7 +244,7 @@ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY C  If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. -END OF TERMS AND CONDITIONS +!_ END OF TERMS AND CONDITIONS  1~ How to Apply These Terms to Your New Programs 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 676e23d7..9e891fcb 100644 --- a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm +++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm @@ -18,9 +18,9 @@  @date.available: 2002-08-28 -@date.modified: 2008-05-22 +@date.modified: 2008-12-14 -@date: 2008-05-22 +@date: 2008-12-14  @level: new=C; break=1; num_top=1 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 292bfe13..dd620872 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 @@ -10,17 +10,19 @@  @type: information +@topic_register: SiSU:manual:sisu markup +  @subject: ebook, epublishing, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, search +@date: 2008-12-14 +  @date.created: 2002-08-28  @date.issued: 2002-08-28  @date.available: 2002-08-28 -@date.modified: 2008-05-22 - -@date: 2008-05-22 +@date.modified: 2008-12-14  @level: new=C; break=1; num_top=1 @@ -127,7 +129,7 @@ code{  @creator: Amissah, Ralph -% note formatting on author / creator field, surname comma then other names, if more than one author separate by semi-colon +% note formatting rules on author / creator field, "Surname, Other names", if more than one author separate by semi-colon (if name is of an institution just write name or the name contains a comma enclose in quotation marks)  @rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3 @@ -139,6 +141,10 @@ code{  % note formatting for topic_register topic levels are separated by a colon, a semi-colon separates main topics +@date: 2007-09-16 + +% original publication date unless the substantive text is updated/modified, then date of update +  @date.created: 2002-08-28  @date.issued: 2002-08-28 @@ -147,8 +153,6 @@ code{  @date.modified: 2007-09-16 -@date: 2007-09-16 -  @level: new=C; break=1; num_top=1  % comment: in this @level header num_top=1 starts automatic heading numbering at heading level 1 (numbering continues 3 levels down); the new and break instructions are used by the LaTeX/pdf and odf output to determine where to put page breaks (that are not used by html output or say sql database population). 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 d0027798..ba2633d3 100644 --- a/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el +++ b/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el @@ -1,7 +1,7 @@  ;;; sisu-mode.el --- a major-mode for highlighting a hierarchy structured text.  ;; @Author: Ambrose Kofi Laing (& Ralph Amissah)  ;; @Keywords: text, processes, tools -;; @Version: 0.69.4 2008-11-02 +;; @Version: 0.70.1 2008-12-14  ;; @License: GPLv3  ;; @Home URL: SiSU:   http://www.jus.uio.no/sisu  ;; originally looked at (based on) doc-mode, with kind permission of the author @@ -297,16 +297,19 @@  	    "^\\(\\@\\("  	    "title\\|"  	    "subtitle\\|" -	    "creator\\|author\\|" +	    "author.title\\|" +	    "author.nationality\\|" +	    "author\\|creator\\|"  	    "translator\\|translated_by\\|"  	    "illustrator\\|illustrated_by\\|"  	    "prepared_by\\|"  	    "digitized_by\\|"  	    "contributor\\|"  	    "publisher\\|" -	    "subject\\|"  	    "topic_register\\|" +	    "subject\\|"  	    "description\\|" +	    "comment\\|"  	    "type\\|"  	    "format\\|"  	    "source\\|" @@ -321,14 +324,22 @@  	    "papersize\\|"  	    "tags\\|"  	    "catalogue\\|" -	    "classify_loc\\|" -	    "classify_dewey\\|" -	    "classify_isbn\\|"  	    "date.created\\|"  	    "date.issued\\|"  	    "date.available\\|"  	    "date.modified\\|" +	    "date.valid\\|" +	    "date.added_to_site\\|"  	    "date\\|" +	    "original_publication.date\\|" +	    "original_publication.nationality\\|" +	    "original_publication.institution\\|" +	    "original_publication\\|" +	    "writing_focus.nationality\\|" +	    "classify_loc\\|" +	    "classify_dewey\\|" +	    "classify_isbn\\|" +	    "classify_pg\\|"  	    "prefix\\|"  	    "suffix\\|"  	    "contact\\|" diff --git a/lib/sisu/v0/concordance.rb b/lib/sisu/v0/concordance.rb index 87b86930..aea5e556 100644 --- a/lib/sisu/v0/concordance.rb +++ b/lib/sisu/v0/concordance.rb @@ -111,11 +111,10 @@ module SiSU_Concordance          @vz=SiSU_Env::Get_init.instance.skin          txt_path=%{#{@md.dir_out}}          SiSU_Env::Info_skin.new(@md).select -        @md_title=@md.title          @fnb=@md.fnb          @lex_button=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="../_sisu/image/sisu.png" alt="SiSU home -->"></a>}          @doc_details =<<WOK -<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right"> </td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.dc_title}</b></a></h1><p class="bold">#{@md.dc_creator}</p></td></tr></table> +<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right"> </td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.full_title}</b></a></h1><p class="bold">#{@md.author}</p></td></tr></table>  WOK        end        def create @@ -127,11 +126,11 @@ WOK  <html>  <head>    <title> -    SiSU created WordIndex for: #{@md.dc_title} +    SiSU created WordIndex for: #{@md.full_title}    </title>    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />    <meta name="Description" content=" SiSU created"> -  <meta name="keywords" content="word index for #{@md.dc_title}"> +  <meta name="keywords" content="word index for #{@md.full_title}">    <meta name="generator" content="SiSU (Linux & Ruby!)">    <link rel="generator" href="http://www.jus.uio.no/sisu" />    <link rel="shortcut icon" href="../_sisu/image/rb7.ico" /> diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb index d5a15971..927a253f 100644 --- a/lib/sisu/v0/css.rb +++ b/lib/sisu/v0/css.rb @@ -248,6 +248,7 @@ WOK      }      th, td {        display: inline; +      vertical-align: top;      }  */    a:link { @@ -301,7 +302,7 @@ WOK      position: absolute;      top: 80px;      left: 0; -    margin-left: 0; +    margin-left: 1%;      width: 20%;    }    #column_center { @@ -334,7 +335,7 @@ WOK    .norm, .bold {      line-height: 150%; -    margin-left: 1em; +    margin-left: 0em;      margin-right: 2em;      margin-top: 10px;      margin-bottom: 0px; @@ -347,22 +348,83 @@ WOK      font-weight: normal;      line-height: 150%;      text-align: justify; -    margin-left: 1em; +    margin-left: 0em;      margin-right: 2em;      text-indent: 0mm;      margin-top: 3px;      margin-bottom: 3px;    }    p.norm { } -  p.i1 {margin-left: 2em;} -  p.i2 {margin-left: 3em;} -  p.i3 {margin-left: 4em;} -  p.i4 {margin-left: 5em;} -  p.i5 {margin-left: 6em;} -  p.i6 {margin-left: 7em;} -  p.i7 {margin-left: 8em;} -  p.i8 {margin-left: 9em;} -  p.i9 {margin-left: 10em;} +  p.i1 {margin-left: 1em;} +  p.i2 {margin-left: 2em;} +  p.i3 {margin-left: 3em;} +  p.i4 {margin-left: 4em;} +  p.i5 {margin-left: 5em;} +  p.i6 {margin-left: 6em;} +  p.i7 {margin-left: 7em;} +  p.i8 {margin-left: 8em;} +  p.i9 {margin-left: 9em;} + +  p.it0 { +    margin-left: 0em; +    margin-top: 6px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it1 { +    margin-left: 1em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it2 { +    margin-left: 2em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it3 { +    margin-left: 3em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it4 { +    margin-left: 4em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it5 { +    margin-left: 5em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it6 { +    margin-left: 6em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it7 { +    margin-left: 7em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it8 { +    margin-left: 8em; +    margin-top: 0px; +    margin-bottom: 0px; +    line-height: 100%; +  } +  p.it9 { +    margin-left: 9em; +    margin-bottom: 0px; +    margin-top: 0px; +    line-height: 100%; +  }    p.code {      font-family: inconsolata, andale mono, courier new, courier, monospace; @@ -396,6 +458,10 @@ WOK    p.bold {      font-weight: bold;    } +  p.bold_left { +    font-weight: bold; +    text-align: left; +  }    p.centerbold {      text-align: center;      font-weight: bold; @@ -534,7 +600,7 @@ WOK    table { }    tr { } -  th, td { } +  th, td { vertical-align: top; }    p.left, th.left, td.left {      text-align: left; diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb index fbc5de7b..10fb192a 100644 --- a/lib/sisu/v0/dal.rb +++ b/lib/sisu/v0/dal.rb @@ -149,8 +149,8 @@ module SiSU_DAL          end        end        meta=file_array.dup -	    meta=meta.join.split("\n\n") #check whether can be eliminated, some of these are large objects to have twice -	    @md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract +      meta=meta.join.split("\n\n") #check whether can be eliminated, some of these are large objects to have twice +      @md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract        meta=nil        dal=SiSU_DAL::Make.new(@md,file_array).song        SiSU_Screen::Ansi.new(@md.cmd,@md.fns,"~meta/#{@md.fns}.meta").output if @md.cmd =~/v/ diff --git a/lib/sisu/v0/dal_metadata.rb b/lib/sisu/v0/dal_metadata.rb index b46c0ce6..cf81616e 100644 --- a/lib/sisu/v0/dal_metadata.rb +++ b/lib/sisu/v0/dal_metadata.rb @@ -87,9 +87,9 @@ module SiSU_metadata            ocnm+=1; ocnd+=1            @dc << case para            when /^#{Mx[:meta_o]}title#{Mx[:meta_c]}/ -            "\n#{@tr.dc_title}: #{Mx[:fa_underscore_o]}#{@md.dc_title}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.full_title}: #{Mx[:fa_underscore_o]}#{@md.full_title}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}(?:creator|author)#{Mx[:meta_c]}/ -            "\n#{@tr.creator}: #{Mx[:fa_underscore_o]}#{@md.dc_creator}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.author}: #{Mx[:fa_underscore_o]}#{@md.author}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /#{Mx[:meta_o]}(?:translator|translated_by)#{Mx[:meta_c]}/              "\n#{@tr.translator}: #{Mx[:fa_underscore_o]}#{@md.translator}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}(?:illustrator|illustrated_by)#{Mx[:meta_c]}/ @@ -99,45 +99,45 @@ module SiSU_metadata            when /^#{Mx[:meta_o]}digitized_by#{Mx[:meta_c]}/              "\n#{@tr.digitized_by}: #{Mx[:fa_underscore_o]}#{@md.digitized_by}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}description#{Mx[:meta_c]}/ -            "\n#{@tr.description}: #{Mx[:fa_underscore_o]}#{@md.dc_description}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.description}: #{Mx[:fa_underscore_o]}#{@md.description}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}subject#{Mx[:meta_c]}/ -            "\n#{@tr.subject}: #{Mx[:fa_underscore_o]}#{@md.dc_subject}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.subject}: #{Mx[:fa_underscore_o]}#{@md.subject}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}abstract#{Mx[:meta_c]}/ -            "\n#{@tr.abstract}: #{Mx[:fa_underscore_o]}#{@md.dc_abstract}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.abstract}: #{Mx[:fa_underscore_o]}#{@md.abstract}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}publisher#{Mx[:meta_c]}/ -            "\n#{@tr.publisher}: #{Mx[:fa_underscore_o]}#{@md.dc_publisher}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.publisher}: #{Mx[:fa_underscore_o]}#{@md.publisher}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}contributor#{Mx[:meta_c]}/ -            "\n#{@tr.contributor}: #{Mx[:fa_underscore_o]}#{@md.dc_contributor}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.contributor}: #{Mx[:fa_underscore_o]}#{@md.contributor}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.created#{Mx[:meta_c]}/ -            "\n#{@tr.date_created}: #{Mx[:fa_underscore_o]}#{@md.dc_date_created}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_created}: #{Mx[:fa_underscore_o]}#{@md.date_created}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.issued#{Mx[:meta_c]}/ -            "\n#{@tr.date_issued}: #{Mx[:fa_underscore_o]}#{@md.dc_date_issued}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_issued}: #{Mx[:fa_underscore_o]}#{@md.date_issued}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.available#{Mx[:meta_c]}/ -            "\n#{@tr.date_available}: #{Mx[:fa_underscore_o]}#{@md.dc_date_available}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_available}: #{Mx[:fa_underscore_o]}#{@md.date_available}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.modified#{Mx[:meta_c]}/ -            "\n#{@tr.date_modified}: #{Mx[:fa_underscore_o]}#{@md.dc_date_modified}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_modified}: #{Mx[:fa_underscore_o]}#{@md.date_modified}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date.valid#{Mx[:meta_c]}/ -            "\n#{@tr.date_valid}: #{Mx[:fa_underscore_o]}#{@md.dc_date_valid}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date_valid}: #{Mx[:fa_underscore_o]}#{@md.date_valid}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}date#{Mx[:meta_c]}/ -            "\n#{@tr.date}: #{Mx[:fa_underscore_o]}#{@md.dc_date}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.date}: #{Mx[:fa_underscore_o]}#{@md.date}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}type#{Mx[:meta_c]}/ -            "\n#{@tr.type}: #{Mx[:fa_underscore_o]}#{@md.dc_type}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.type}: #{Mx[:fa_underscore_o]}#{@md.type}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}format#{Mx[:meta_c]}/ -            "\n#{@tr.format}: #{Mx[:fa_underscore_o]}#{@md.dc_format}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.format}: #{Mx[:fa_underscore_o]}#{@md.format}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}rights#{Mx[:meta_c]}/ -            "\n#{@tr.rights}: #{Mx[:fa_underscore_o]}#{@md.dc_rights}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.rights}: #{Mx[:fa_underscore_o]}#{@md.rights}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}identifier#{Mx[:meta_c]}/ -            "\n#{@tr.identifier}: #{Mx[:fa_underscore_o]}#{@md.dc_identifier}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.identifier}: #{Mx[:fa_underscore_o]}#{@md.identifier}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}source#{Mx[:meta_c]}/ -            "\n#{@tr.source}: #{Mx[:fa_underscore_o]}#{@md.dc_source}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.source}: #{Mx[:fa_underscore_o]}#{@md.source}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}language#{Mx[:meta_c]}/ -            "\n#{@tr.language}: #{Mx[:fa_underscore_o]}#{@md.dc_language}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.language}: #{Mx[:fa_underscore_o]}#{@md.language}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}language.original#{Mx[:meta_c]}/              "\n#{@tr.language_original}: #{Mx[:fa_underscore_o]}#{@md.language_original}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}relation#{Mx[:meta_c]}/ -            "\n#{@tr.relation}: #{Mx[:fa_underscore_o]}#{@md.dc_relation}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.relation}: #{Mx[:fa_underscore_o]}#{@md.relation}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}coverage#{Mx[:meta_c]}/ -            "\n#{@tr.coverage}: #{Mx[:fa_underscore_o]}#{@md.dc_coverage}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}" +            "\n#{@tr.coverage}: #{Mx[:fa_underscore_o]}#{@md.coverage}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}keywords#{Mx[:meta_c]}/              "\n#{@tr.keywords}: #{Mx[:fa_underscore_o]}#{@md.keywords}#{Mx[:fa_underscore_c]} #{Mx[:id_o]}~0;m#{ocnm};d#{ocnd}#{Mx[:id_c]}"            when /^#{Mx[:meta_o]}comments#{Mx[:meta_c]}/ diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb index 4120497a..1d6407e2 100644 --- a/lib/sisu/v0/dal_syntax.rb +++ b/lib/sisu/v0/dal_syntax.rb @@ -255,19 +255,19 @@ module SiSU_Syntax          line.gsub!(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c])          if @md.subtitle and not @md.subtitle.empty?            if line =~/(?:by\s+)?(?:@creator|@author)/ -            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title} - #{@md.subtitle},<br />\\2#{@md.dc_creator}") +            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title} - #{@md.subtitle},<br />\\2#{@md.author}")            else              line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}")            end          else            if line =~/(?:by\s+)?(?:@creator|@author)/ -            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title},<br />\\2#{@md.dc_creator}") +            line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title},<br />\\2#{@md.author}")            else              line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s*$/,"\\1 #{@md.title}")            end          end          line.gsub!(/^(1~\??) @title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}")                    # -        line.gsub!(/^(#{Mx[:lv_o]}[23]:\??#{Mx[:lv_c]}) (?:(by\s+)?(?:@creator|@author))\s*$/,"\\1 \\2#{@md.dc_creator}")                    # +        line.gsub!(/^(#{Mx[:lv_o]}[23]:\??#{Mx[:lv_c]}) (?:(by\s+)?(?:@creator|@author))\s*$/,"\\1 \\2#{@md.author}")                    #          line.gsub!(/<((?:https?|file):\/\/\S+?)>/,'< \1 >')                    #catch problem markup          line.gsub!(/\}\.\.\/(\S+)/,"\}#@output_url/\\1")                       #means you are not supporting relative links (only relevant in html), converted to static here          line.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }http://www.jus.uio.no/sisu')                                                    #adjustment 2005w30 diff --git a/lib/sisu/v0/db_columns.rb b/lib/sisu/v0/db_columns.rb index 6c9778ab..1ea16c95 100644 --- a/lib/sisu/v0/db_columns.rb +++ b/lib/sisu/v0/db_columns.rb @@ -66,9 +66,15 @@ module SiSU_DB_columns      def lt_subtitle        600      end -    def lt_creator +    def lt_author        600      end +    def lt_author_title +      100 +    end +    def lt_author_nationality +      100 +    end      def lt_illustrator        600      end @@ -87,21 +93,6 @@ module SiSU_DB_columns      def lt_date        10      end -    def lt_date_created -      10 -    end -    def lt_date_issued -      10 -    end -    def lt_date_available -      10 -    end -    def lt_date_modified -      10 -    end -    def lt_date_valid -      10 -    end      def lt_type        600      end @@ -198,6 +189,24 @@ module SiSU_DB_columns      def lt_subj        64      end +    def lt_orig_pub +      400 +    end +    def lt_orig_pub_date +      400 +    end +    def lt_orig_pub_institution +      200 +    end +    def lt_orig_pub_nationality +      200 +    end +    def lt_writing_focus_nationality +      100 +    end +    def lt_topic_register +      2000 +    end      def document_clean # restriction not necessary #12000 #2712        60000      end diff --git a/lib/sisu/v0/db_create.rb b/lib/sisu/v0/db_create.rb index 189b7acf..df1e91df 100644 --- a/lib/sisu/v0/db_create.rb +++ b/lib/sisu/v0/db_create.rb @@ -100,59 +100,73 @@ module SiSU_DB_create          } unless @opt.cmd =~/q/          @conn.execute(%{            CREATE TABLE metadata ( -            tid               BIGINT PRIMARY KEY, -            title             VARCHAR(#{lt_title}) NULL, -            subtitle          VARCHAR(#{lt_subtitle}) NULL, -            creator           VARCHAR(#{lt_creator}) NULL, -            illustrator       VARCHAR(#{lt_illustrator}) NULL, -            translator        VARCHAR(#{lt_translator}) NULL, -            subject           VARCHAR(#{lt_subject}) NULL, -            date              VARCHAR(#{lt_date}) NULL, -            date_created      VARCHAR(#{lt_date_created}) NULL, -            date_issued       VARCHAR(#{lt_date_issued}) NULL, -            date_available    VARCHAR(#{lt_date_available}) NULL, -            date_valid        VARCHAR(#{lt_date_valid}) NULL, -            date_modified     VARCHAR(#{lt_date_modified}) NULL, -/*          date              DATE, */ -/*          date_created      DATE, */ -/*          date_issued       DATE, */ -/*          date_available    DATE, */ -/*          date_valid        DATE, */ -/*          date_modified     DATE, */ -            type              VARCHAR(#{lt_type}) NULL, -            description       VARCHAR(#{lt_description}) NULL, -            publisher         VARCHAR(#{lt_publisher}) NULL, -            contributor       VARCHAR(#{lt_contributor}) NULL, -            prepared_by       VARCHAR(#{lt_prepared_by}) NULL, -            digitized_by      VARCHAR(#{lt_digitized_by}) NULL, -            format            VARCHAR(#{lt_format}) NULL, -            identifier        VARCHAR(#{lt_identifier}) NULL, -            source            VARCHAR(#{lt_source}) NULL, -            language          VARCHAR(#{lt_language}) NULL, -            language_original VARCHAR(#{lt_language_original}) NULL, -            relation          VARCHAR(#{lt_relation}) NULL, -            coverage          VARCHAR(#{lt_coverage}) NULL, -            rights            VARCHAR(#{lt_rights}) NULL, -            copyright         VARCHAR(#{lt_copyright}) NULL, -            owner             VARCHAR(#{lt_owner}) NULL, -            keywords          VARCHAR(#{lt_keywords}) NULL, -            comment           VARCHAR(#{lt_comment}) NULL, -            loc               VARCHAR(#{lt_loc}) NULL, -            dewey             VARCHAR(#{lt_dewey}) NULL, -            isbn              VARCHAR(#{lt_isbn}) NULL, -            pg                VARCHAR(#{lt_pg}) NULL, -            abstract          VARCHAR(#{lt_abstract}) NULL, -            prefix_a          TEXT NULL, -            prefix_b          TEXT NULL, -            skin              VARCHAR(#{lt_skin}) NULL, -            markup            VARCHAR(#{lt_markup}) NULL, -            links             VARCHAR(#{lt_links}) NULL, -            information       VARCHAR(#{lt_information}) NULL, -            contact           VARCHAR(#{lt_contact}) NULL, -            suffix            VARCHAR(#{lt_suffix}) NULL, -            filename          VARCHAR(#{lt_filename}) NULL UNIQUE, -            types             CHAR(#{lt_types}) NULL, -            subj              VARCHAR(#{lt_subj}) NULL +            tid                  BIGINT PRIMARY KEY, +            title                VARCHAR(#{lt_title}) NULL, +            subtitle             VARCHAR(#{lt_subtitle}) NULL, +            author               VARCHAR(#{lt_author}) NULL, +/* plan to replace creator field, currently used, with author field */ +            creator              VARCHAR(#{lt_author}) NULL, +            author_title         VARCHAR(#{lt_author_title}) NULL, +            author_nationality   VARCHAR(#{lt_author_nationality}) NULL, +            illustrator          VARCHAR(#{lt_illustrator}) NULL, +            translator           VARCHAR(#{lt_translator}) NULL, +            subject              VARCHAR(#{lt_subject}) NULL, +            date                 VARCHAR(#{lt_date}) NULL, +            date_added_to_site   VARCHAR(#{lt_date}) NULL, +            date_created         VARCHAR(#{lt_date}) NULL, +            date_issued          VARCHAR(#{lt_date}) NULL, +            date_available       VARCHAR(#{lt_date}) NULL, +            date_valid           VARCHAR(#{lt_date}) NULL, +            date_modified        VARCHAR(#{lt_date}) NULL, +            date_translated      VARCHAR(#{lt_date}) NULL, +/*          date                 DATE, */ +/*          date_added_to_site   DATE, */ +/*          date_created         DATE, */ +/*          date_issued          DATE, */ +/*          date_available       DATE, */ +/*          date_valid           DATE, */ +/*          date_modified        DATE, */ +/*          date_translated      DATE, */ +            type                 VARCHAR(#{lt_type}) NULL, +            description          VARCHAR(#{lt_description}) NULL, +            publisher            VARCHAR(#{lt_publisher}) NULL, +            contributor          VARCHAR(#{lt_contributor}) NULL, +            prepared_by          VARCHAR(#{lt_prepared_by}) NULL, +            digitized_by         VARCHAR(#{lt_digitized_by}) NULL, +            format               VARCHAR(#{lt_format}) NULL, +            identifier           VARCHAR(#{lt_identifier}) NULL, +            source               VARCHAR(#{lt_source}) NULL, +            language             VARCHAR(#{lt_language}) NULL, +            language_original    VARCHAR(#{lt_language_original}) NULL, +            relation             VARCHAR(#{lt_relation}) NULL, +            coverage             VARCHAR(#{lt_coverage}) NULL, +            rights               VARCHAR(#{lt_rights}) NULL, +            copyright            VARCHAR(#{lt_copyright}) NULL, +            owner                VARCHAR(#{lt_owner}) NULL, +            keywords             VARCHAR(#{lt_keywords}) NULL, +            comment              VARCHAR(#{lt_comment}) NULL, +            loc                  VARCHAR(#{lt_loc}) NULL, +            dewey                VARCHAR(#{lt_dewey}) NULL, +            isbn                 VARCHAR(#{lt_isbn}) NULL, +            pg                   VARCHAR(#{lt_pg}) NULL, +            abstract             VARCHAR(#{lt_abstract}) NULL, +            prefix_a             TEXT NULL, +            prefix_b             TEXT NULL, +            skin                 VARCHAR(#{lt_skin}) NULL, +            markup               VARCHAR(#{lt_markup}) NULL, +            links                VARCHAR(#{lt_links}) NULL, +            information          VARCHAR(#{lt_information}) NULL, +            contact              VARCHAR(#{lt_contact}) NULL, +            suffix               VARCHAR(#{lt_suffix}) NULL, +            filename             VARCHAR(#{lt_filename}) NULL UNIQUE, +            types                CHAR(#{lt_types}) NULL, +            subj                 VARCHAR(#{lt_subj}) NULL, +            original_publication VARCHAR(#{lt_orig_pub}) NULL, +            original_publication_date VARCHAR(#{lt_orig_pub_date}) NULL, +            original_publication_institution VARCHAR(#{lt_orig_pub_institution}) NULL, +            original_publication_nationality VARCHAR(#{lt_orig_pub_nationality}) NULL, +            writing_focus_nationality VARCHAR(#{lt_writing_focus_nationality}) NULL, +            topic_register       VARCHAR(#{lt_topic_register}) NULL            );            #{@comment.metadata}          }) diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb index e30776c7..1e1e25d7 100644 --- a/lib/sisu/v0/db_import.rb +++ b/lib/sisu/v0/db_import.rb @@ -179,7 +179,7 @@ module SiSU_DB_import          @@id_t+=1 #bug related, needs to be performed once at start of file, but consider moving, as, placed here it means program will fail if document header lacks 0~title          puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} unless @opt.cmd =~/q/        end -      if @md.dc_title; @tp[:long_title]=@md.dc_title +      if @md.full_title; @tp[:long_title]=@md.full_title #dc          #sql='SELECT MAX(tid) FROM metadata'          #id_t=@conn.execute( sql ) { |x| x.fetch_all.to_s.to_i }          #@@id_t=id_t if id_t @@ -191,11 +191,11 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:subtitle_f],@tp[:subtitle_i]='subtitle, ',"'#{txt}', "        end -      if @md.dc_creator; txt=@md.dc_creator +      if @md.author; txt=@md.author #dc          special_character_escape(txt)          @tp[:creator_f],@tp[:creator_i]='creator, ',"'#{txt}', "        end -      if @md.dc_contributor; txt=@md.dc_contributor +      if @md.contributor; txt=@md.contributor #dc          special_character_escape(txt)          @tp[:contributor_f],@tp[:contributor_i]='contributor, ',"'#{txt}', "        end @@ -207,7 +207,7 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:illustrator_f],@tp[:illustrator_i]='illustrator, ',"'#{txt}', "        end -      if @md.dc_publisher; txt=@md.dc_publisher +      if @md.publisher; txt=@md.publisher #dc          special_character_escape(txt)          @tp[:publisher_f],@tp[:publisher_i]='publisher, ',"'#{txt}', "        end @@ -219,11 +219,11 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:digitized_by_f],@tp[:digitized_by_i]='digitized_by, ',"'#{txt}', "        end -      if @md.dc_subject; txt=@md.dc_subject +      if @md.subject; txt=@md.subject #dc          special_character_escape(txt)          @tp[:subject_f],@tp[:subject_i]='subject, ',"'#{txt}', "        end -      if @md.dc_description; txt=@md.dc_description +      if @md.description; txt=@md.description #dc          special_character_escape(txt)          @tp[:description_f],@tp[:description_i]='description, ',"'#{txt}', "        end @@ -231,7 +231,7 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:abstract_f],@tp[:abstract_i]='abstract, ',"'#{txt}', "        end -      if @md.dc_type; txt=@md.dc_type +      if @md.type; txt=@md.type #dc          special_character_escape(txt)          @tp[:type_f],@tp[:type_i]='type, ',"'#{txt}', "        end @@ -243,35 +243,35 @@ module SiSU_DB_import        #  special_character_escape(txt)        #  @tp[:copyright_f],@tp[:copyright_i]='copyright, ',"'#{txt}', "        #end -      if @md.dc_rights; txt=@md.dc_rights +      if @md.rights; txt=@md.rights #dc          special_character_escape(txt)          @tp[:rights_f],@tp[:rights_i]='rights, ',"'#{txt}', "        end -      if @md.dc_date; txt=@md.dc_date +      if @md.date; txt=@md.date #dc          special_character_escape(txt)          @tp[:date_f],@tp[:date_i]='date, ',"'#{txt}', "        end -      if @md.dc_date_created; txt=@md.dc_date_created +      if @md.date_created; txt=@md.date_created #dc          special_character_escape(txt)          @tp[:date_created_f],@tp[:date_created_i]='date_created, ',"'#{txt}', "        end -      if @md.dc_date_issued; txt=@md.dc_date_issued +      if @md.date_issued; txt=@md.date_issued #dc          special_character_escape(txt)          @tp[:date_issued_f],@tp[:date_issued_i]='date_issued, ',"'#{txt}', "        end -      if @md.dc_date_available; txt=@md.dc_date_available +      if @md.date_available; txt=@md.date_available #dc          special_character_escape(txt)          @tp[:date_available_f],@tp[:date_available_i]='date_available, ',"'#{txt}', "        end -      if @md.dc_date_modified; txt=@md.dc_date_modified +      if @md.date_modified; txt=@md.date_modified #dc          special_character_escape(txt)          @tp[:date_modified_f],@tp[:date_modified_i]='date_modified, ',"'#{txt}', "        end -      if @md.dc_date_valid; txt=@md.dc_date_valid +      if @md.date_valid; txt=@md.date_valid #dc          special_character_escape(txt)          @tp[:date_valid_f],@tp[:date_valid_i]='date_valid, ',"'#{txt}', "        end -      if @md.dc_language[:name]; txt=@md.dc_language[:name] +      if @md.language[:name]; txt=@md.language[:name] #dc          special_character_escape(txt)          @tp[:language_f],@tp[:language_i]='language, ',"'#{txt}', "        end @@ -279,23 +279,23 @@ module SiSU_DB_import          special_character_escape(txt)          @tp[:language_original_f],@tp[:language_original_i]='language_original, ',"'#{txt}', "        end -      if @md.dc_format; txt=@md.dc_format +      if @md.format; txt=@md.format #dc          special_character_escape(txt)          @tp[:format_f],@tp[:format_i]='format, ',"'#{txt}', "        end -      if @md.dc_identifier; txt=@md.dc_identifier +      if @md.identifier; txt=@md.identifier #dc          special_character_escape(txt)          @tp[:identifier_f],@tp[:identifier_i]='identifier, ',"'#{txt}', "        end -      if @md.dc_source; txt=@md.dc_source +      if @md.source; txt=@md.source #dc          special_character_escape(txt)          @tp[:source_f],@tp[:source_i]='source, ',"'#{txt}', "        end -      if @md.dc_relation; txt=@md.dc_relation +      if @md.relation; txt=@md.relation #dc          special_character_escape(txt)          @tp[:relation_f],@tp[:relation_i]='relation, ',"'#{txt}', "        end -      if @md.dc_coverage; txt=@md.dc_coverage +      if @md.coverage; txt=@md.coverage #dc          special_character_escape(txt)          @tp[:coverage_f],@tp[:coverage_i]='coverage, ',"'#{txt}', "        end diff --git a/lib/sisu/v0/db_tests.rb b/lib/sisu/v0/db_tests.rb index 4a18f694..86e7ca25 100644 --- a/lib/sisu/v0/db_tests.rb +++ b/lib/sisu/v0/db_tests.rb @@ -70,45 +70,49 @@ module SiSU_DB_tests      end      def verify        unless @opt.cmd =~/q/ -      puts @ck.tp[:fns].length.to_s            + ' checklength ' + @ck.tp[:fns]            if @ck.tp[:fns]            and @ck.tp[:fns].length            >@ck.lt_filename -      puts @ck.tp[:title].length.to_s          + ' checklength ' + @ck.tp[:title]          if @ck.tp[:title]          and @ck.tp[:title].length          >@ck.lt_title -      puts @ck.tp[:subtitle].length.to_s       + ' checklength ' + @ck.tp[:subtitle]       if @ck.tp[:subtitle]       and @ck.tp[:subtitle].length       >@ck.lt_subtitle -      puts @ck.tp[:creator].length.to_s        + ' checklength ' + @ck.tp[:creator]        if @ck.tp[:creator]        and @ck.tp[:creator].length        >@ck.lt_creator -      puts @ck.tp[:illustrator].length.to_s    + ' checklength ' + @ck.tp[:illustrator]    if @ck.tp[:illustrator]    and @ck.tp[:illustrator].length    >@ck.lt_illustrator -      puts @ck.tp[:translator].length.to_s     + ' checklength ' + @ck.tp[:translator]     if @ck.tp[:translator]     and @ck.tp[:translator].length     >@ck.lt_translator -      puts @ck.tp[:prepared_by].length.to_s    + ' checklength ' + @ck.tp[:prepared_by]    if @ck.tp[:prepared_by]    and @ck.tp[:prepared_by].length    >@ck.lt_prepared_by -      puts @ck.tp[:digitized_by].length.to_s   + ' checklength ' + @ck.tp[:digitized_by]   if @ck.tp[:digitized_by]   and @ck.tp[:digitized_by].length   >@ck.lt_digitized_by -      puts @ck.tp[:subject].length.to_s        + ' checklength ' + @ck.tp[:subject]        if @ck.tp[:subject]        and @ck.tp[:subject].length        >@ck.lt_subject -      puts @ck.tp[:description].length.to_s    + ' checklength ' + @ck.tp[:description]    if @ck.tp[:description]    and @ck.tp[:description].length    >@ck.lt_description -      puts @ck.tp[:publisher].length.to_s      + ' checklength ' + @ck.tp[:publisher]      if @ck.tp[:publisher]      and @ck.tp[:publisher].length      >@ck.lt_publisher -      puts @ck.tp[:contributor].length.to_s    + ' checklength ' + @ck.tp[:contributor]    if @ck.tp[:contributor]    and @ck.tp[:contributor].length    >@ck.lt_contributor -      puts @ck.tp[:date].length.to_s           + ' checklength ' + @ck.tp[:date]           if @ck.tp[:date]           and @ck.tp[:date].length           >@ck.lt_date -      puts @ck.tp[:date_created].length.to_s   + ' checklength ' + @ck.tp[:date_created]   if @ck.tp[:date_created]   and @ck.tp[:date_created].length   >@ck.lt_date_created -      puts @ck.tp[:date_issued].length.to_s    + ' checklength ' + @ck.tp[:date_issued]    if @ck.tp[:date_issued]    and @ck.tp[:date_issued].length    >@ck.lt_date_issued -      puts @ck.tp[:date_valid].length.to_s     + ' checklength ' + @ck.tp[:date_valid]     if @ck.tp[:date_valid]     and @ck.tp[:date_valid].length     >@ck.lt_date_valid -      puts @ck.tp[:date_available].length.to_s + ' checklength ' + @ck.tp[:date_available] if @ck.tp[:date_available] and @ck.tp[:date_available].length >@ck.lt_date_available -      puts @ck.tp[:date_modified].length.to_s  + ' checklength ' + @ck.tp[:date_modified]  if @ck.tp[:date_modified]  and @ck.tp[:date_modified].length  >@ck.lt_date_modified -      puts @ck.tp[:type].length.to_s           + ' checklength ' + @ck.tp[:type]           if @ck.tp[:type]           and @ck.tp[:type].length           >@ck.lt_type -      puts @ck.tp[:format].length.to_s         + ' checklength ' + @ck.tp[:format]         if @ck.tp[:format]         and @ck.tp[:format].length         >@ck.lt_format -      puts @ck.tp[:identifier].length.to_s     + ' checklength ' + @ck.tp[:identifier]     if @ck.tp[:identifier]     and @ck.tp[:identifier].length     >@ck.lt_identifier -      puts @ck.tp[:source].length.to_s         + ' checklength ' + @ck.tp[:source]         if @ck.tp[:source]         and @ck.tp[:source].length         >@ck.lt_source -      puts @ck.tp[:language].length.to_s       + ' checklength ' + @ck.tp[:language]       if @ck.tp[:language]       and @ck.tp[:language].length       >@ck.lt_language -      puts @ck.tp[:language_original].length.to_s + ' checklength ' + @ck.tp[:language_original] if @ck.tp[:language_original] and @ck.tp[:language_original].length >@ck.lt_language_original +      puts @ck.tp[:fns].length.to_s                + ' checklength ' + @ck.tp[:fns]                if @ck.tp[:fns]                and @ck.tp[:fns].length                >@ck.lt_filename +      puts @ck.tp[:title].length.to_s              + ' checklength ' + @ck.tp[:title]              if @ck.tp[:title]              and @ck.tp[:title].length              >@ck.lt_title +      puts @ck.tp[:subtitle].length.to_s           + ' checklength ' + @ck.tp[:subtitle]           if @ck.tp[:subtitle]           and @ck.tp[:subtitle].length           >@ck.lt_subtitle +      puts @ck.tp[:creator].length.to_s            + ' checklength ' + @ck.tp[:creator]            if @ck.tp[:creator]            and @ck.tp[:creator].length            >@ck.lt_creator +      puts @ck.tp[:author_title].length.to_s       + ' checklength ' + @ck.tp[:author_title]       if @ck.tp[:author_title]       and @ck.tp[:author_title].length       >@ck.lt_author_title +      puts @ck.tp[:illustrator].length.to_s        + ' checklength ' + @ck.tp[:illustrator]        if @ck.tp[:illustrator]        and @ck.tp[:illustrator].length        >@ck.lt_illustrator +      puts @ck.tp[:translator].length.to_s         + ' checklength ' + @ck.tp[:translator]         if @ck.tp[:translator]         and @ck.tp[:translator].length         >@ck.lt_translator +      puts @ck.tp[:prepared_by].length.to_s        + ' checklength ' + @ck.tp[:prepared_by]        if @ck.tp[:prepared_by]        and @ck.tp[:prepared_by].length        >@ck.lt_prepared_by +      puts @ck.tp[:digitized_by].length.to_s       + ' checklength ' + @ck.tp[:digitized_by]       if @ck.tp[:digitized_by]       and @ck.tp[:digitized_by].length       >@ck.lt_digitized_by +      puts @ck.tp[:subject].length.to_s            + ' checklength ' + @ck.tp[:subject]            if @ck.tp[:subject]            and @ck.tp[:subject].length            >@ck.lt_subject +      puts @ck.tp[:description].length.to_s        + ' checklength ' + @ck.tp[:description]        if @ck.tp[:description]        and @ck.tp[:description].length        >@ck.lt_description +      puts @ck.tp[:publisher].length.to_s          + ' checklength ' + @ck.tp[:publisher]          if @ck.tp[:publisher]          and @ck.tp[:publisher].length          >@ck.lt_publisher +      puts @ck.tp[:contributor].length.to_s        + ' checklength ' + @ck.tp[:contributor]        if @ck.tp[:contributor]        and @ck.tp[:contributor].length        >@ck.lt_contributor +      puts @ck.tp[:date].length.to_s               + ' checklength ' + @ck.tp[:date]               if @ck.tp[:date]               and @ck.tp[:date].length               >@ck.lt_date +      puts @ck.tp[:date_created].length.to_s       + ' checklength ' + @ck.tp[:date_created]       if @ck.tp[:date_created]       and @ck.tp[:date_created].length       >@ck.lt_date +      puts @ck.tp[:date_issued].length.to_s        + ' checklength ' + @ck.tp[:date_issued]        if @ck.tp[:date_issued]        and @ck.tp[:date_issued].length        >@ck.lt_date +      puts @ck.tp[:date_valid].length.to_s         + ' checklength ' + @ck.tp[:date_valid]         if @ck.tp[:date_valid]         and @ck.tp[:date_valid].length         >@ck.lt_date +      puts @ck.tp[:date_available].length.to_s     + ' checklength ' + @ck.tp[:date_available]     if @ck.tp[:date_available]     and @ck.tp[:date_available].length     >@ck.lt_date +      puts @ck.tp[:date_modified].length.to_s      + ' checklength ' + @ck.tp[:date_modified]      if @ck.tp[:date_modified]      and @ck.tp[:date_modified].length      >@ck.lt_date +      puts @ck.tp[:date_translated].length.to_s    + ' checklength ' + @ck.tp[:date_translated]    if @ck.tp[:date_translated]    and @ck.tp[:date_translated].length    >@ck.lt_date +      puts @ck.tp[:date_added_to_site].length.to_s + ' checklength ' + @ck.tp[:date_added_to_site] if @ck.tp[:date_added_to_site] and @ck.tp[:date_added_to_site].length >@ck.lt_date +      puts @ck.tp[:type].length.to_s               + ' checklength ' + @ck.tp[:type]               if @ck.tp[:type]               and @ck.tp[:type].length               >@ck.lt_type +      puts @ck.tp[:format].length.to_s             + ' checklength ' + @ck.tp[:format]             if @ck.tp[:format]             and @ck.tp[:format].length             >@ck.lt_format +      puts @ck.tp[:identifier].length.to_s         + ' checklength ' + @ck.tp[:identifier]         if @ck.tp[:identifier]         and @ck.tp[:identifier].length         >@ck.lt_identifier +      puts @ck.tp[:source].length.to_s             + ' checklength ' + @ck.tp[:source]             if @ck.tp[:source]             and @ck.tp[:source].length             >@ck.lt_source +      puts @ck.tp[:language].length.to_s           + ' checklength ' + @ck.tp[:language]           if @ck.tp[:language]           and @ck.tp[:language].length           >@ck.lt_language +      puts @ck.tp[:language_original].length.to_s  + ' checklength ' + @ck.tp[:language_original]  if @ck.tp[:language_original]  and @ck.tp[:language_original].length  >@ck.lt_language_original        #puts @ck.tp[:language_char].length.to_s     + ' checklength ' + @ck.tp[:language_char]       if @ck.tp[:language_char]       and @ck.tp[:language_char].length       >@ck.lt_language_char        #puts @ck.tp[:language_original_char].length.to_s + ' checklength ' + @ck.tp[:language_original_char]       if @ck.tp[:language_original_char]       and @ck.tp[:language_original_char].length       >@ck.lt_language_original_char -      puts @ck.tp[:relation].length.to_s       + ' checklength ' + @ck.tp[:relation]       if @ck.tp[:relation]       and @ck.tp[:relation].length       >@ck.lt_relation -      puts @ck.tp[:coverage].length.to_s       + ' checklength ' + @ck.tp[:coverage]       if @ck.tp[:coverage]       and @ck.tp[:coverage].length       >@ck.lt_coverage -      puts @ck.tp[:rights].length.to_s         + ' checklength ' + @ck.tp[:rights]         if @ck.tp[:rights]         and @ck.tp[:rights].length         >@ck.lt_rights -      puts @ck.tp[:copyright].length.to_s      + ' checklength ' + @ck.tp[:copyright]      if @ck.tp[:copyright]      and @ck.tp[:copyright].length      >@ck.lt_copyright -      puts @ck.tp[:owner].length.to_s          + ' checklength ' + @ck.tp[:owner]          if @ck.tp[:owner]          and @ck.tp[:owner].length          >@ck.lt_owner -      puts @ck.tp[:keywords].length.to_s       + ' checklength ' + @ck.tp[:keywords]       if @ck.tp[:keywords]       and @ck.tp[:keywords].length       >@ck.lt_keywords -      puts @ck.tp[:abstract].length.to_s       + ' checklength ' + @ck.tp[:abstract]       if @ck.tp[:abstract]       and @ck.tp[:abstract].length       >@ck.lt_abstract -      puts @ck.tp[:comment].length.to_s        + ' checklength ' + @ck.tp[:comment]        if @ck.tp[:comment]        and @ck.tp[:comment].length        >@ck.lt_comment -      puts @ck.tp[:loc].length.to_s            + ' checklength ' + @ck.tp[:loc]            if @ck.tp[:loc]            and @ck.tp[:loc].length            >@ck.lt_loc -      puts @ck.tp[:dewey].length.to_s          + ' checklength ' + @ck.tp[:dewey]          if @ck.tp[:dewey]          and @ck.tp[:dewey].length          >@ck.lt_dewey -      puts @ck.tp[:isbn].length.to_s           + ' checklength ' + @ck.tp[:isbn]           if @ck.tp[:isbn]           and @ck.tp[:isbn].length           >@ck.lt_isbn -      puts @ck.tp[:pg].length.to_s             + ' checklength ' + @ck.tp[:pg]             if @ck.tp[:pg]             and @ck.tp[:pg].length             >@ck.lt_pg -      puts @ck.tp[:date]                                                                   if  @ck.tp[:date] and not @ck.tp[:date].empty? and @ck.tp[:date] !~/\d\d-\d\d-\d\d/ +      puts @ck.tp[:relation].length.to_s           + ' checklength ' + @ck.tp[:relation]           if @ck.tp[:relation]           and @ck.tp[:relation].length           >@ck.lt_relation +      puts @ck.tp[:coverage].length.to_s           + ' checklength ' + @ck.tp[:coverage]           if @ck.tp[:coverage]           and @ck.tp[:coverage].length           >@ck.lt_coverage +      puts @ck.tp[:rights].length.to_s             + ' checklength ' + @ck.tp[:rights]             if @ck.tp[:rights]             and @ck.tp[:rights].length             >@ck.lt_rights +      puts @ck.tp[:copyright].length.to_s          + ' checklength ' + @ck.tp[:copyright]          if @ck.tp[:copyright]          and @ck.tp[:copyright].length          >@ck.lt_copyright +      puts @ck.tp[:owner].length.to_s              + ' checklength ' + @ck.tp[:owner]              if @ck.tp[:owner]              and @ck.tp[:owner].length              >@ck.lt_owner +      puts @ck.tp[:keywords].length.to_s           + ' checklength ' + @ck.tp[:keywords]           if @ck.tp[:keywords]           and @ck.tp[:keywords].length           >@ck.lt_keywords +      puts @ck.tp[:abstract].length.to_s           + ' checklength ' + @ck.tp[:abstract]           if @ck.tp[:abstract]           and @ck.tp[:abstract].length           >@ck.lt_abstract +      puts @ck.tp[:comment].length.to_s            + ' checklength ' + @ck.tp[:comment]            if @ck.tp[:comment]            and @ck.tp[:comment].length            >@ck.lt_comment +      puts @ck.tp[:loc].length.to_s                + ' checklength ' + @ck.tp[:loc]                if @ck.tp[:loc]                and @ck.tp[:loc].length                >@ck.lt_loc +      puts @ck.tp[:dewey].length.to_s              + ' checklength ' + @ck.tp[:dewey]              if @ck.tp[:dewey]              and @ck.tp[:dewey].length              >@ck.lt_dewey +      puts @ck.tp[:isbn].length.to_s               + ' checklength ' + @ck.tp[:isbn]               if @ck.tp[:isbn]               and @ck.tp[:isbn].length               >@ck.lt_isbn +      puts @ck.tp[:pg].length.to_s                 + ' checklength ' + @ck.tp[:pg]                 if @ck.tp[:pg]                 and @ck.tp[:pg].length                 >@ck.lt_pg +      puts @ck.tp[:topic_register].length.to_s     + ' checklength ' + @ck.tp[:topic_register]     if @ck.tp[:topic_register]     and @ck.tp[:topci_register].length     >@ck.lt_topic_register +      puts @ck.tp[:date]                                                                           if @ck.tp[:date] and not @ck.tp[:date].empty? and @ck.tp[:date] !~/\d\d-\d\d-\d\d/        end      end    end diff --git a/lib/sisu/v0/digests.rb b/lib/sisu/v0/digests.rb index fed761d6..baaeb884 100644 --- a/lib/sisu/v0/digests.rb +++ b/lib/sisu/v0/digests.rb @@ -227,7 +227,7 @@ module SiSU_Digest_view                  end                else                  prefix='' -                metad=[@tr.dc_title,@tr.creator,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Skin_Digest: ','Generated by: ','Ruby version: '] +                metad=[@tr.full_title,@tr.author,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Skin_Digest: ','Generated by: ','Ruby version: ']                  metad.each do |n|                    m=rgx_txt(n)                    if m=~/\S+/ \ @@ -242,17 +242,17 @@ module SiSU_Digest_view                    else prefix='  '*9                    end                  end -                m_dc_title=rgx_txt(@tr.dc_title) -                m_creator=rgx_txt(@tr.creator) +                m_title=rgx_txt(@tr.full_title) +                m_author=rgx_txt(@tr.author)                  m_sourcefile_digest=rgx_txt(@tr.sourcefile_digest)                  m_sisu_version=rgx_txt(@tr.sisu_version)                  m_last_generated=rgx_txt(@tr.last_generated)                  m_ruby_version=rgx_txt(@tr.ruby_version)                  case para -                when /#{m_dc_title}: / -                  @t=/#{m_dc_title}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip -                when /#{m_creator}: / -                  @c=/#{m_creator}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip +                when /#{m_title}: / +                  @t=/#{m_title}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip +                when /#{m_author}: / +                  @c=/#{m_author}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#@dl}:[0-9a-f]{#@dl}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip                  when /#{m_sourcefile_digest}.+?<u>/                                        #watch                    dgst_extra="\n" + ' '*21 +'source' +' '*4 + @md.dgst[1] + ' '*34 + @md.fns                  when /Skin_Digest: / diff --git a/lib/sisu/v0/harvest.rb b/lib/sisu/v0/harvest.rb index e8609a93..49303571 100644 --- a/lib/sisu/v0/harvest.rb +++ b/lib/sisu/v0/harvest.rb @@ -80,6 +80,10 @@ def cases(opt)      css(opt) if opt.cmd.inspect =~/M/      HARVEST_authors::Songsheet.new(opt).songsheet      HARVEST_topics::Songsheet.new(opt).songsheet +    if opt.cmd.inspect =~/R/ +      require "#{SiSU_lib}/remote" +      SiSU_Remote::Put.new(opt).rsync_harvest +    end    else      help    end diff --git a/lib/sisu/v0/harvest_authors.rb b/lib/sisu/v0/harvest_authors.rb index 7a5e1cea..9678e4f7 100644 --- a/lib/sisu/v0/harvest_authors.rb +++ b/lib/sisu/v0/harvest_authors.rb @@ -102,16 +102,18 @@ module HARVEST_authors      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 +      @orig_pub,@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+(.+)/ +      rgx[:date]=/^@subtitle:\s+(.+)/ +      rgx[:date]=/^@date:\s+(\d{4})/ +      rgx[:orig_pub]=/^@original_publication:\s+(.+)/        data.each do |para| -        if para=~ rgx[:publication_details] -          @publication_details=rgx[:publication_details].match(para)[1] +        if para=~ rgx[:orig_pub] +          @orig_pub=rgx[:orig_pub].match(para)[1]          end          if para=~ rgx[:title]            @title=rgx[:title].match(para)[1] @@ -122,19 +124,22 @@ module HARVEST_authors          if para=~ rgx[:author]            @author_format=rgx[:author].match(para)[1]          end -        break if @title and @subtitle and @author and @publication_details +        if para=~ rgx[:date] +          @date=rgx[:date].match(para)[1] +        end +        break if @title and @subtitle and @author and @date and @orig_pub        end        @fulltitle=if @subtitle          @title + ' - ' + @subtitle        else @title        end -      if @title and @author_format #and @publication_details +      if @title and @author_format #and @orig_pub (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 } +        idx_array <<= { :filename => filename, :file => file, :orig_pub => @orig_pub, :date => @date, :title => @fulltitle, :author => creator }        else -        #p "missing author field: #@filename title: #@title; author: #@author_format; idx: #@publication_details" +        #p "missing author field: #@filename title: #@title; author: #@author_format; idx: #@orig_pub"        end        idx_array.flatten!        idx_array @@ -156,7 +161,7 @@ module HARVEST_authors            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] } +          @@the_idx_authors[author][:md] << { :filename => idx[:filename], :file => idx[:file], :author => idx[:author], :title => idx[:title], :date => idx[:date] }          end        end        @the_idx=@@the_idx_authors @@ -168,38 +173,57 @@ module HARVEST_authors        @env=SiSU_Env::Info_env.new        @rc=Get_init.instance.yamlrc        @page='sisu_manifest.html' +      @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 +      @vz=SiSU_Env::Get_init.instance.skin +    end +    def html_file_open        @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_file_close +      @output[:html].close +      @output[:html_mnt].close if @output[:html_mnt].class == File      end      def html_print        def html_songsheet +        html_file_open          html_head          html_alph          html_body          html_tail +        html_file_close        end        def html_head_adjust(type='')          css_path=if type !~/maintenance/            '../_sisu/css/harvest.css'          else 'harvest.css'          end +        sv=SiSU_Env::Info_version.new.get_version          <<WOK  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <title>SiSU Metadata Harvest - Authors</title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> +<meta name="dc.title" content= "SiSU metadata harvest, Authors - SiSU information Structuring Universe, Structured information Serialised Units, 2008" /> +<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" /> +<meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" /> +<link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" />  <link rel="stylesheet" href="#{css_path}" type="text/css" /> +<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />  </head>  <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> +<a name="top" id="top"></a> +<a name="up" id="up"></a> +<a name="start" id="start"></a>  <h1>SiSU Metadata Harvest - Authors</h1> -<p>also see <a href="harvest_topics.html">SiSU Metadata Harvest - Topics</a></p> +<p>[<a href="../index.html"> HOME </a>] also see <a href="harvest_topics.html">SiSU Metadata Harvest - Topics</a></p>  <hr />  WOK        end @@ -222,6 +246,14 @@ WOK        def html_tail          a=[]          a <<<<WOK +<hr /> +<a name="bottom" id="bottom"></a> +<a name="down" id="down"></a> +<a name="end" id="end"></a> +<a name="finish" id="finish"></a> +<a name="stop" id="stop"></a> +<a name="credits"></a> +#{@vz.credits_sisu}  </body>  </html>  WOK @@ -263,9 +295,9 @@ WOK            @output[:html] << x            a[1][:md].each do |x|              if @output[:html_mnt].class == File -              @output[:html_mnt] << %{<p class="publication">[<a href="#{x[:file]}.sst">src</a>]  <a href="file://#{@env.path.output}/#{x[:file]}/#{@page}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>} +              @output[:html_mnt] << %{<p class="publication">[<a href="#{x[:file]}.sst">src</a>]  #{x[:date]} <a href="file://#{@env.path.output}/#{x[:file]}/#{@page}">#{x[:title]}</a>, #{x[:author][:authors_s]} -- [<a href="#{x[:file]}.sst">#{x[:file]}.sst</a>]</p>}              end -            @output[:html] << %{<p class="publication"><a href="../#{x[:file]}/#{@page}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>} +            @output[:html] << %{<p class="publication">#{x[:date]} <a href="../#{x[:file]}/#{@page}">#{x[:title]}</a>, #{x[:author][:authors_s]}</p>}            end          end        end diff --git a/lib/sisu/v0/harvest_topics.rb b/lib/sisu/v0/harvest_topics.rb index bda82629..51f55b2b 100644 --- a/lib/sisu/v0/harvest_topics.rb +++ b/lib/sisu/v0/harvest_topics.rb @@ -251,37 +251,56 @@ module HARVEST_topics        @env=SiSU_Env::Info_env.new        @rc=Get_init.instance.yamlrc        @page='sisu_manifest.html' +      @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 +      @vz=SiSU_Env::Get_init.instance.skin +    end +    def html_file_open        @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_file_close +      @output[:html].close +      @output[:html_mnt].close if @output[:html_mnt].class == File      end      def html_print        def html_songsheet +        html_file_open          html_head          html_alph          html_body          html_tail +        html_file_close        end        def html_head_adjust(type='')          css_path=if type !~/maintenance/            '../_sisu/css/harvest.css'          else 'harvest.css'          end +        sv=SiSU_Env::Info_version.new.get_version          <<WOK  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <title>SiSU Metadata Harvest - Topics</title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> +<meta name="dc.title" content= "SiSU metadata harvest, Topics - SiSU information Structuring Universe, Structured information Serialised Units, 2008" /> +<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" /> +<meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" /> +<link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" />  <link rel="stylesheet" href="#{css_path}" type="text/css" /> +<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />  </head>  <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> +<a name="top" id="top"></a> +<a name="up" id="up"></a> +<a name="start" id="start"></a>  <h1>SiSU Metadata Harvest - Topics</h1> -<p>also see <a href="harvest_authors.html">SiSU Metadata Harvest - Authors</a></p> +<p>[<a href="../index.html"> HOME </a>] also see <a href="harvest_authors.html">SiSU Metadata Harvest - Authors</a></p>  <hr />  WOK        end @@ -304,6 +323,14 @@ WOK        def html_tail          a=[]          a <<<<WOK +<hr /> +<a name="bottom" id="bottom"></a> +<a name="down" id="down"></a> +<a name="end" id="end"></a> +<a name="finish" id="finish"></a> +<a name="stop" id="stop"></a> +<a name="credits"></a> +#{@vz.credits_sisu}  </body>  </html>  WOK diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb index 6b819f95..67263b68 100644 --- a/lib/sisu/v0/help.rb +++ b/lib/sisu/v0/help.rb @@ -600,7 +600,9 @@ This is a sample header (#{@cX.fuschia}Dublin Core in fuschia,#{@cX.off} #{@cX.c  #{@cX.cyan}@subtitle:#{@cX.off} The Subtitle if any -#{@cX.fuschia}@creator:#{@cX.off} [or @author:] Name of Author +#{@cX.fuschia}@creator:#{@cX.off} [or @author:] Surname, Other names (if more than one author separate author names with a semi colon, if name is of an institution just write name or the name contains a comma enclose in quotation marks) + +#{@cX.fuschia}@topic_register:#{@cX.off} [e.g.:] text markup language; application:text processing;output:html|xml|latex|pdf|sql  #{@cX.fuschia}@subject:#{@cX.off} (whatever your subject) diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 5f2a1954..33285ed0 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -592,7 +592,7 @@ WOK          toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript          @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript          toc_shared << format_head_toc.scroll_head_navigation_band -        if @md.dc_rights +        if @md.rights            rights=format_head_toc.rights            rights=SiSU_Tune::Clean_html.new(rights).clean          end @@ -620,8 +620,8 @@ WOK            toc_shared << format_txt_obj.center_bold            @segtoc << format_txt_obj.center_bold          end -        if @md.dc_creator -          creator_endnote=@md.dc_creator.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>}) +        if @md.author +          creator_endnote=@md.author.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>})            tmp_head=creator_endnote + "\n"            txt_obj={:txt =>tmp_head}            format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) @@ -640,13 +640,13 @@ WOK          end          tmp_head=nil          toc_shared << @links_guide_toc -        toc_shared << rights if @md.dc_rights +        toc_shared << rights if @md.rights          toc_shared << prefix_b if @md.prefix_b          #Table of Contents added/appended here          toc_shared << @toc[:scr]          @segtoc << @links_guide_toc          @segtoc << @toc[:seg] -        @segtoc << rights if @md.dc_rights +        @segtoc << rights if @md.rights          @segtoc << prefix_b if @md.prefix_b          #Segtoc tail added here          @segtoc << "</p>\n" #bugfix sort later DEBUGNOW diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 4010209c..88e5fda7 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -478,7 +478,7 @@ WOK      def prefix_a      end      def rights -      rights=@md.dc_rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') +      rights=@md.rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ')        %{<p class="small_left">Rights: #{rights}</p>  <p />}      end diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index fb04f2f9..2f8bc1dd 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -112,33 +112,36 @@ module SiSU_HTML_scroll                txt_obj={:txt =>@sto.text}                format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj)              end -            case @sto.format -            when /^1:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body1 -            when /^2:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body2 -            when /^3:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body3 -            when /^4:\S+?/; para=@sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 -            when /^5:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body5 -            when /^6:\S*?/; para=@sto.scroll_lev_para_ocn.heading_body6 -            when /^#{Mx[:gl_bullet]}/;  para=@sto.scroll_lev_para_ocn.bullet +            para=case @sto.format +            when /^1:\S*?/; @sto.scroll_lev_para_ocn.heading_body1 +            when /^2:\S*?/; @sto.scroll_lev_para_ocn.heading_body2 +            when /^3:\S*?/; @sto.scroll_lev_para_ocn.heading_body3 +            when /^4:\S+?/; @sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 +            when /^5:\S*?/; @sto.scroll_lev_para_ocn.heading_body5 +            when /^6:\S*?/; @sto.scroll_lev_para_ocn.heading_body6 +            when /^#{Mx[:gl_bullet]}/; @sto.scroll_lev_para_ocn.bullet              when /^#{Mx[:pa_o]}:i([1-9])#{Mx[:pa_c]}#{Mx[:gl_bullet]}/ #indent with bullet                format_txt_obj.gsub_body -              para=@sto.scroll_lev_para_ocn.format('li',"i#{$1}") +              @sto.scroll_lev_para_ocn.format('li',"i#{$1}")              when /^i([1-9])$/ #indent                format_txt_obj.gsub_body -              para=@sto.scroll_lev_para_ocn.format('p',"i#{$1}") -            when /^center$/;               para=@sto.scroll_lev_para_ocn.center -            when /^(?:b|bold)$/;           para=@sto.scroll_lev_para_ocn.bold -            when /^(?:verse|group|alt)$/;  para=@sto.scroll_lev_para_ocn.para -            when /^code$/;                 para=@sto.scroll_lev_para_ocn.code +              @sto.scroll_lev_para_ocn.format('p',"i#{$1}") +            when /^center$/;               @sto.scroll_lev_para_ocn.center +            when /^(?:b|bold)$/;           @sto.scroll_lev_para_ocn.bold +            when /^(?:verse|group|alt)$/;  @sto.scroll_lev_para_ocn.para +            when /^code$/;                 @sto.scroll_lev_para_ocn.code              when /ordinary/ # see whether u can improve -              if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ +              para=if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/                  format_txt_obj.gsub_body -                para=@sto.scroll_lev_para_ocn.para -                if para =~/#{Mx[:gr_o]}Th?.+/ # tables come as single block +                para=if para =~/#{Mx[:gr_o]}Th?.+/ # tables come as single block +                  #@sto=nil                    table=SiSU_HTML_shared::Table.new(para) -                  para=table.table_split +                  table.table_split +                else @sto.scroll_lev_para_ocn.para                  end +              else para                end +            else para              end            elsif para =~/^#{Mx[:lv_o]}[1-9]:/ \            and para !~/#{Mx[:id_o]}~\d+;(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_c]}#@dp:#@dp#{Mx[:id_c]}$/ diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index a3199903..da33194a 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -72,7 +72,7 @@ module SiSU_HTML_seg          if @type =~/endnote/            @seg[:headers]=[]            format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) -          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator) +          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@author)            txt_obj={:txt =>'Endnotes',:ocn_display =>''}            format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)            @seg[:headers] << format_seg.title_header1 @@ -80,7 +80,7 @@ module SiSU_HTML_seg          elsif @type =~/idx/            @seg[:headers]=[]            format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) -          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator) +          @seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@author)            txt_obj={:txt =>'Index',:ocn_display =>''}            format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)            @seg[:headers] << format_seg.title_header1 @@ -267,7 +267,7 @@ module SiSU_HTML_seg        end        @p_num ||= ''        if @@is1 == 1 -        @dc_creator=%{<b>#{@md.dc_creator}</b>\n} if @md.dc_creator.to_s =~/\S/ +        @author=%{<b>#{@md.author}</b>\n} if @md.author.to_s =~/\S/          @@seg[:tocband_banner] << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav])          conditional_div_close=if @@get_hash_fn =~/metadata/ #watch            '</div>' @@ -275,7 +275,7 @@ module SiSU_HTML_seg          end          @@seg[:tocband_bannerless] << conditional_div_close << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav])          @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug -        @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator).gsub(clean,'') +        @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@author).gsub(clean,'')          ocn=if @@header1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1          else ''          end @@ -317,7 +317,7 @@ module SiSU_HTML_seg          format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj)          @@seg[:headers] << format_seg.title_header4.gsub(clean,'')        end -      @@seg[:header_endnotes]=format_head_seg.title_endnote(@md.title,@md.subtitle,@dc_creator,@@seg[:dot_nav]) +      @@seg[:header_endnotes]=format_head_seg.title_endnote(@md.title,@md.subtitle,@author,@@seg[:dot_nav])        @@tracker=@@tracker+1      end      def markup(para) diff --git a/lib/sisu/v0/html_table.rb b/lib/sisu/v0/html_table.rb index 7f28ed93..067a7dd9 100644 --- a/lib/sisu/v0/html_table.rb +++ b/lib/sisu/v0/html_table.rb @@ -109,16 +109,16 @@ module SiSU_HTML_table          tablefoot=[]          @@tablefoot.each {|x| tablefoot << ''}          @@tablefoot=[] -        if @parablock =~/#{Mx[:gr_o]}TZ#{Mx[:gr_c]}/; @parablock="</p>\n</div>" #table_end +        if @parablock =~/#{Mx[:gr_o]}TZ#{Mx[:gr_c]}/; @parablock="</table></p>\n</div>" #table_end          end        end        if @@tablehead == 1          if @parablock =~/#{Mx[:tc_p]}#{Mx[:tc_p]}/u -          if @parablock =~/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u -            @parablock.gsub!(/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u,table_row($1,true)) +          while @parablock =~/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u +            @parablock.sub!(/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u,table_row($1,true))            end -          if @parablock =~/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u -            @parablock.gsub!(/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u,table_cell($1,true)) +          while @parablock =~/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u +            @parablock.sub!(/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u,table_cell($1,true))            end            if @parablock =~/#{Mx[:tc_c]}/              @parablock.gsub!(/#{Mx[:tc_c]}/,table_row_close(true)) @@ -127,11 +127,11 @@ module SiSU_HTML_table          end          @parablock        else -        if @parablock =~/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u -          @parablock.gsub!(/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u,table_row($1)) +        while @parablock =~/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u +          @parablock.sub!(/#{Mx[:tc_o]}#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u,table_row($1))          end -        if @parablock =~/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u -          @parablock.gsub!(/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+?)#{Mx[:tc_p]}/u,table_cell($1)) +        while @parablock =~/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u +          @parablock.sub!(/#{Mx[:tc_p]}#{Mx[:tc_p]}(\d+)#{Mx[:tc_p]}/u,table_cell($1))          end          if @parablock =~/#{Mx[:tc_c]}/            @parablock.gsub!(/#{Mx[:tc_c]}/,table_row_close) @@ -141,12 +141,12 @@ module SiSU_HTML_table        @parablock      end      def table_split -      @new_content=[] +      content=[]        @one.split(/\n/).each do |parablock|          table=Table.new("#{parablock}\n") -        @new_content << table.table +        content << table.table        end -      @new_content.join +      content.join      end    end  end diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb index 93766140..33af71f9 100644 --- a/lib/sisu/v0/hub.rb +++ b/lib/sisu/v0/hub.rb @@ -181,7 +181,7 @@ module SiSU              end            end          end -        SiSU_Remote::Put.new(@opt).rsync_harvest if @opt.cmd.inspect =~/R/ and @opt.mod.inspect =~/harvest/ +        #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 @@ -495,8 +495,8 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/            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 +          #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 diff --git a/lib/sisu/v0/i18n.rb b/lib/sisu/v0/i18n.rb index 673ab08d..0b53e78d 100644 --- a/lib/sisu/v0/i18n.rb +++ b/lib/sisu/v0/i18n.rb @@ -116,8 +116,8 @@ module SiSU_Translate      def sourcefile_digest        @lang_class.sourcefile_digest      end -    def dc_title -      @lang_class.dc_title +    def full_title #dc +      @lang_class.full_title      end      def title        @lang_class.title @@ -125,8 +125,8 @@ module SiSU_Translate      def subtitle        @lang_class.subtitle      end -    def creator -      @lang_class.creator +    def author +      @lang_class.author      end      def contributor        @lang_class.contributor @@ -149,8 +149,8 @@ module SiSU_Translate      def subject        @lang_class.subject      end -    def dc_description -      @lang_class.dc_description +    def description #dc (watch) +      @lang_class.description      end      def abstract        @lang_class.abstract @@ -227,6 +227,9 @@ module SiSU_Translate      def prefix_b        @lang_class.prefix_b      end +    def topic_register +      @lang_class.topic_register +    end      def fns        @lang_class.fns      end @@ -328,8 +331,8 @@ module SiSU_Translate      def file_size        'file size'      end -    def dc_title -      'DC Title' +    def full_title #dc +      'Title'      end      def title        'Title' @@ -337,11 +340,14 @@ module SiSU_Translate      def subtitle        'Subtitle'      end -    def creator -      'DC Creator' +    def author +      'Author'      end -    def contributor -      'DC Contributor' +    def creator #dc +      'Creator' +    end +    def contributor #dc +      'Contributor'      end      def translator        'Translator' @@ -349,8 +355,8 @@ module SiSU_Translate      def illustrator        'Illustrator'      end -    def publisher -      'DC Publisher' +    def publisher #dc +      'Publisher'      end      def prepared_by        'Prepared by' @@ -358,59 +364,59 @@ module SiSU_Translate      def digitized_by        'Digitized by'      end -    def subject -      'DC Subject' +    def subject #dc +      'Subject'      end -    def dc_description -      'DC Description' +    def description #dc (watch) +      'Description'      end -    def abstract -      'DC Abstract' +    def abstract #dc +      'Abstract'      end -    def type -      'DC Type' +    def type #dc +      'Type'      end -    def rights -      'DC Rights' +    def rights #dc +      'Rights'      end -    def date -      'DC Date' +    def date #dc +      'Date'      end -    def date_created -      'DC Date created' +    def date_created #dc +      'Date created'      end -    def date_issued -      'DC Date issued' +    def date_issued #dc +      'Date issued'      end -    def date_available -      'DC Date available' +    def date_available #dc +      'Date available'      end -    def date_modified -      'DC Date modified' +    def date_modified #dc +      'Date modified'      end -    def date_valid -      'DC Date valid' +    def date_valid #dc +      'Date valid'      end -    def language -      'DC Language' +    def language #dc +      'Language'      end      def language_original        'Original Language'      end -    def format -      'DC Format' +    def format #dc +      'Format'      end -    def identifier -      'DC Identifier' +    def identifier #dc +      'Identifier'      end -    def source -      'DC Source' +    def source #dc +      'Source'      end -    def relation -      'DC Relation' +    def relation #dc +      'Relation'      end -    def coverage -      'DC Coverage' +    def coverage #dc +      'Coverage'      end      def keywords        'Keywords' @@ -436,6 +442,9 @@ module SiSU_Translate      def prefix_b        'Prefix (b)'      end +    def topic_register +      'Topics Registered' +    end      def sourcefile        'Sourcefile'      end @@ -533,8 +542,8 @@ module SiSU_Translate      def file_size        'taille'      end -    def dc_title -      'Titre (DC)' +    def full_title #dc +      'Titre'      end      def title        'Titre' @@ -542,11 +551,14 @@ module SiSU_Translate      def subtitle        'Sous titre'      end -    def creator -      'Auteur (DC)' +    def author +      'Auteur'      end -    def contributor -      'Contributeur (DC)' +    def creator #dc +      'Auteur' +    end +    def contributor #dc +      'Contributeur'      end      def translator        'Traducteur' @@ -554,8 +566,8 @@ module SiSU_Translate      def illustrator        'Illustrateur'      end -    def publisher -      'Éditeur (DC)' +    def publisher #dc +      'Éditeur'      end      def prepared_by        'Préparé par' @@ -563,59 +575,59 @@ module SiSU_Translate      def digitized_by        'Numérisé par'      end -    def subject -      'Sujet (DC)' +    def subject #dc +      'Sujet'      end -    def dc_description -      'Description (DC)' +    def description #dc (watch) +      'Description'      end -    def abstract -      'Résumé (DC)' +    def abstract #dc +      'Résumé'      end -    def type -      'Type (DC)' +    def type #dc +      'Type'      end -    def rights -      'Droits relatifs à la ressource (DC)' +    def rights #dc +      'Droits relatifs à la ressource'      end -    def date -      'Date (DC)' +    def date #dc +      'Date'      end -    def date_created -      'Date de création (DC)' +    def date_created #dc +      'Date de création'      end -    def date_issued -      'Date de publication (DC)' +    def date_issued #dc +      'Date de publication'      end -    def date_available -      'Date de mise à disposition (DC)' +    def date_available #dc +      'Date de mise à disposition'      end -    def date_modified -      'Date de modification (DC)' +    def date_modified #dc +      'Date de modification'      end -    def date_valid -      'Date de validité (DC)' +    def date_valid #dc +      'Date de validité'      end -    def language -      'Langue (DC)' +    def language #dc +      'Langue'      end      def language_original        'Langue originale'      end -    def format -      'Format (DC)' +    def format #dc +      'Format'      end -    def identifier -      'Identifiant (DC)' +    def identifier #dc +      'Identifiant'      end -    def source -      'Source (DC)' +    def source #dc +      'Source'      end -    def relation -      'Lien (DC)' +    def relation #dc +      'Lien'      end -    def coverage -      'Portée du document (DC)' +    def coverage #dc +      'Portée du document'      end      def keywords        'Mots clef' @@ -641,6 +653,9 @@ module SiSU_Translate      def prefix_b        'Préfixe (b)'      end +    def topic_register +      'Topics Registered' +    end      def sourcefile        'Fichier source'      end @@ -738,8 +753,8 @@ module SiSU_Translate      def file_size        'Dateigrösse'      end -    def dc_title -      'DC Titel' +    def full_title #dc +      'Titel'      end      def title        'Titel' @@ -750,8 +765,8 @@ module SiSU_Translate      def creator        'Autor'      end -    def contributor -      'DC Mitautor' +    def contributor #dc +      'Mitautor'      end      def translator        'Übersetzung' @@ -771,11 +786,11 @@ module SiSU_Translate      def subject        'Titel'      end -    def dc_description +    def description #dc (watch)        'Beschreibung'      end -    def abstract -      'DC Abstract' +    def abstract #dc +      'Abstract'      end      def type        'Typ' @@ -807,20 +822,20 @@ module SiSU_Translate      def language_original        'Ursprungssprache'      end -    def format -      'DC Format' +    def format #dc +      'Format'      end -    def identifier -      'DC Bezeichnung' +    def identifier #dc +      'Bezeichnung'      end -    def source -      'DC Quelle' +    def source #dc +      'Quelle'      end -    def relation -      'DC Beziehung' +    def relation #dc +      'Beziehung'      end -    def coverage -      'DC Eingrenzung' +    def coverage #dc +      'Eingrenzung'      end      def keywords        'Schlüsselwörter' @@ -846,6 +861,9 @@ module SiSU_Translate      def prefix_b        'Präfix (b)'      end +    def topic_register +      'Topics Registered' +    end      def sourcefile        'Quelldatei'      end @@ -943,8 +961,8 @@ module SiSU_Translate     def file_size       'tamaño del fichero'     end -   def dc_title -     'Título DC' +   def full_title #dc +     'Título'     end     def title       'Título' @@ -952,11 +970,11 @@ module SiSU_Translate     def subtitle       'Subtítulo'     end -   def creator -     'Creador DC' +   def creator #dc +     'Creador'     end -   def contributor -     'Contribuidor DC' +   def contributor #dc +     'Contribuidor'     end     def translator       'Traductor' @@ -964,8 +982,8 @@ module SiSU_Translate     def illustrator       'Ilustrador'     end -   def publisher -     'Editor DC' +   def publisher #dc +     'Editor'     end     def prepared_by       'Preparado por' @@ -973,59 +991,59 @@ module SiSU_Translate     def digitized_by       'Digitalizado por'     end -   def subject -     'Asunto DC' +   def subject #dc +     'Asunto'     end -   def dc_description -     'Descripción DC' +   def description #dc (watch) +     'Descripción'     end -   def abstract -     'Resumen DC' +   def abstract #dc +     'Resumen'     end -   def type -     'Tipo DC' +   def type #dc +     'Tipo'     end -   def rights -     'Derechos DC' +   def rights #dc +     'Derechos'     end -   def date -     'Fecha DC' +   def date #dc +     'Fecha'     end -   def date_created -     'Fecha de creación DC' +   def date_created #dc +     'Fecha de creación'     end -   def date_issued -     'Fecha de publicación DC' +   def date_issued #dc +     'Fecha de publicación'     end -   def date_available -     'Fecha de disponibilidad DC' +   def date_available #dc +     'Fecha de disponibilidad'     end -   def date_modified -     'Fecha de modificación DC' +   def date_modified #dc +     'Fecha de modificación'     end -   def date_valid -     'Fecha de valided DC' +   def date_valid #dc +     'Fecha de valided'     end -   def language -     'Idioma DC' +   def language #dc +     'Idioma'     end     def language_original       'Lenguaje original'     end -   def format -     'Formato DC' +   def format #dc +     'Formato'     end -   def identifier -     'Identificador DC' +   def identifier #dc +     'Identificador'     end -   def source -     'Fuente DC' +   def source #dc +     'Fuente'     end -   def relation -     'Relación DC' +   def relation #dc +     'Relación'     end -   def coverage -     'Cobertura DC' +   def coverage #dc +     'Cobertura'     end     def keywords       'Palabras claves' @@ -1051,6 +1069,9 @@ module SiSU_Translate     def prefix_b       'Prefijo (b)'     end +    def topic_register +      'Topics Registered' +    end     def sourcefile       'Fichero fuente'     end @@ -1148,8 +1169,8 @@ module SiSU_Translate      def file_size        'dimensione'      end -    def dc_title -      'Titolo (DC)' +    def full_title #dc +      'Titolo'      end      def title        'Titolo' @@ -1157,11 +1178,11 @@ module SiSU_Translate      def subtitle        'Sottotitolo'      end -    def creator -      'Autore (DC)' +    def creator #dc +      'Autore'      end -    def contributor -      'Contributore (DC)' +    def contributor #dc +      'Contributore'      end      def translator        'Traduttore' @@ -1169,8 +1190,8 @@ module SiSU_Translate      def illustrator        'Illustratore'      end -    def publisher -      'Casa editrice (DC)' +    def publisher #dc +      'Casa editrice'      end      def prepared_by        'Preparato da' @@ -1178,59 +1199,59 @@ module SiSU_Translate      def digitized_by        'Convertito in digitale da'      end -    def subject -      'Oggetto (DC)' +    def subject #dc +      'Oggetto'      end -    def dc_description -      'Descrizione (DC)' +    def description #dc (watch) +      'Descrizione'      end -    def abstract -      'Abstract (DC)' +    def abstract #dc +      'Abstract'      end -    def type -      'Tipo (DC)' +    def type #dc +      'Tipo'      end -    def rights -      'Diritti del lettore (DC)' +    def rights #dc +      'Diritti del lettore'      end -    def date -      'Data (DC)' +    def date #dc +      'Data'      end -    def date_created -      'Data di creazione (DC)' +    def date_created #dc +      'Data di creazione'      end -    def date_issued -      'Data di pubblicazione (DC)' +    def date_issued #dc +      'Data di pubblicazione'      end -    def date_available -      'Data di effettiva disponibilità (DC)' +    def date_available #dc +      'Data di effettiva disponibilità'      end -    def date_modified -      'Data di ultima modifica (DC)' +    def date_modified #dc +      'Data di ultima modifica'      end -    def date_valid -      'Data di inizo validità (DC)' +    def date_valid #dc +      'Data di inizo validità'      end -    def language -      'Lingua (DC)' +    def language #dc +      'Lingua'      end      def language_original        'Lingua originale'      end -    def format -      'Formato (DC)' +    def format #dc +      'Formato'      end -    def identifier -      'Indentificatore (DC)' +    def identifier #dc +      'Indentificatore'      end -    def source -      'Fonte (DC)' +    def source #dc +      'Fonte'      end -    def relation -      'Collegamento (DC)' +    def relation #dc +      'Collegamento'      end -    def coverage -      'Ambito (DC)' +    def coverage #dc +      'Ambito'      end      def keywords        'Parole chiave' @@ -1256,6 +1277,9 @@ module SiSU_Translate      def prefix_b        'Premessa (b)'      end +    def topic_register +      'Topics Registered' +    end      def sourcefile        'Sorgente'      end @@ -1353,8 +1377,8 @@ module SiSU_Translate      def file_size        'tiedoston koko'      end -    def dc_title -      'DC-otsikko' +    def full_title #dc +      'otsikko'      end      def title        'Otsikko' @@ -1362,11 +1386,11 @@ module SiSU_Translate      def subtitle        'Alaotsikko'      end -    def creator -      'DC-tekijä' +    def creator #dc +      'tekijä'      end -    def contributor -      'DC-osallistuja' +    def contributor #dc +      'osallistuja'      end      def translator        'Kääntäjä' @@ -1374,8 +1398,8 @@ module SiSU_Translate      def illustrator        'Kuvittaja'      end -    def publisher -      'DC-julkaisija' +    def publisher #dc +      'julkaisija'      end      def prepared_by        'Valmistaja' @@ -1383,59 +1407,59 @@ module SiSU_Translate      def digitized_by        'Digitalisoinut'      end -    def subject -      'DC-aihe' +    def subject #dc +      'aihe'      end -    def dc_description -      'DC-kuvaus' +    def description #dc (watch) +      'kuvaus'      end -    def abstract -      'DC-tiivistelmä' +    def abstract #dc +      'tiivistelmä'      end -    def type -      'DC-tyyppi' +    def type #dc +      'tyyppi'      end -    def rights -      'DC-oikeudet' +    def rights #dc +      'oikeudet'      end -    def date -      'DC-päiväys' +    def date #dc +      'päiväys'      end -    def date_created -      'DC-luontipäivä' +    def date_created #dc +      'luontipäivä'      end -    def date_issued -      'DC-julkaisupäivä' +    def date_issued #dc +      'julkaisupäivä'      end -    def date_available -      'DC-saantipäivä' +    def date_available #dc +      'saantipäivä'      end -    def date_modified -      'DC-muokkauspäivä' +    def date_modified #dc +      'muokkauspäivä'      end -    def date_valid -      'DC-kelpoisuuspäivä' +    def date_valid #dc +      'kelpoisuuspäivä'      end -    def language -      'DC-kieli' +    def language #dc +      'kieli'      end      def language_original        'Alkuperäiskieli'      end -    def format -      'DC-muoto' +    def format #dc +      'muoto'      end -    def identifier -      'DC-tunnus' +    def identifier #dc +      'tunnus'      end -    def source -      'DC-lähde' +    def source #dc +      'lähde'      end -    def relation -      'DC-suhde' +    def relation #dc +      'suhde'      end -    def coverage -      'DC-kattavuus' +    def coverage #dc +      'kattavuus'      end      def keywords        'Avainsanat' @@ -1461,6 +1485,9 @@ module SiSU_Translate      def prefix_b        'Prefix (b)'      end +    def topic_register +      'Topics Registered' +    end      def sourcefile        'Lähdetiedosto'      end diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb index 0b7c7bfc..3fa189fd 100644 --- a/lib/sisu/v0/manifest.rb +++ b/lib/sisu/v0/manifest.rb @@ -170,7 +170,7 @@ module SiSU_Manifest          end        end        def metadata(id,info) -        @manifest[:html] << %{<tr><th class="left"><p class="bold">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n} +        @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n}        end        def links(url,lnk,target)          static=if url =~/^\.\//; url.gsub(/^\.(\.)?/,@base_url) @@ -319,8 +319,8 @@ module SiSU_Manifest          end        end        def metadata_tests -        if @md.dc_title -          id,info=@translate.dc_title,@md.dc_title +        if @md.full_title #dc +          id,info=@translate.full_title,@md.full_title            metadata(id,info)          end          if @md.title @@ -331,12 +331,12 @@ module SiSU_Manifest            id,info=@translate.subtitle,@md.subtitle            metadata(id,info)          end -        if @md.dc_creator -          id,info=@translate.creator,@md.dc_creator +        if @md.author #dc +          id,info=@translate.author,@md.author            metadata(id,info)          end -        if @md.dc_contributor -          id,info=@translate.contributor,@md.dc_contributor +        if @md.contributor #dc +          id,info=@translate.contributor,@md.contributor            metadata(id,info)          end          if @md.translator @@ -347,8 +347,8 @@ module SiSU_Manifest            id,info=@translate.illustrator,@md.illustrator            metadata(id,info)          end -        if @md.dc_publisher -          id,info=@translate.publisher,@md.dc_publisher +        if @md.publisher #dc +          id,info=@translate.publisher,@md.publisher            metadata(id,info)          end          if @md.prepared_by @@ -359,53 +359,53 @@ module SiSU_Manifest            id,info=@translate.digitized_by,@md.digitized_by            metadata(id,info)          end -        if @md.dc_subject -          id,info=@translate.subject,@md.dc_subject +        if @md.subject #dc +          id,info=@translate.subject,@md.subject            metadata(id,info)          end -        if @md.dc_description -          id,info=@translate.dc_description,@md.dc_description +        if @md.description #dc +          id,info=@translate.description,@md.description            metadata(id,info)          end          if @md.abstract            id,info=@translate.abstract,@md.abstract            metadata(id,info)          end -        if @md.dc_type -          id,info=@translate.type,@md.dc_type +        if @md.type #dc +          id,info=@translate.type,@md.type            metadata(id,info)          end -        if @md.dc_rights -          id,info=@translate.rights,@md.dc_rights +        if @md.rights #dc +          id,info=@translate.rights,@md.rights            metadata(id,info)          end -        if @md.dc_date -          id,info=@translate.date,@md.dc_date +        if @md.date #dc +          id,info=@translate.date,@md.date            metadata(id,info)          end -        if @md.dc_date_created -          id,info=@translate.date_created,@md.dc_date_created +        if @md.date_created #dc +          id,info=@translate.date_created,@md.date_created            metadata(id,info)          end -        if @md.dc_date_issued -          id,info=@translate.date_issued,@md.dc_date_issued +        if @md.date_issued #dc +          id,info=@translate.date_issued,@md.date_issued            metadata(id,info)          end -        if @md.dc_date_available -          id,info=@translate.date_available,@md.dc_date_available +        if @md.date_available #dc +          id,info=@translate.date_available,@md.date_available            metadata(id,info)          end -        if @md.dc_date_modified -          id,info=@translate.date_modified,@md.dc_date_modified +        if @md.date_modified #dc +          id,info=@translate.date_modified,@md.date_modified            metadata(id,info)          end -        if @md.dc_date_valid -          id,info=@translate.date_valid,@md.dc_date_valid +        if @md.date_valid #dc +          id,info=@translate.date_valid,@md.date_valid            metadata(id,info)          end -        if @md.dc_language \ -        and @md.dc_language[:name] -          id,info=@translate.language,@md.dc_language[:name] +        if @md.language \ +        and @md.language[:name] #dc +          id,info=@translate.language,@md.language[:name]            metadata(id,info)          end          if @md.language_original \ @@ -413,24 +413,24 @@ module SiSU_Manifest            id,info=@translate.language_original,@md.language_original[:name]            metadata(id,info)          end -        if @md.dc_format -          id,info=@transate.format,@md.dc_format +        if @md.format #dc +          id,info=@transate.format,@md.format            metadata(id,info)          end -        if @md.dc_identifier -          id,info=@translate.identifier,@md.dc_identifier +        if @md.identifier #dc +          id,info=@translate.identifier,@md.identifier            metadata(id,info)          end -        if @md.dc_source -          id,info=@translate.source,@md.dc_source +        if @md.source #dc +          id,info=@translate.source,@md.source            metadata(id,info)          end -        if @md.dc_relation -          id,info=@translate.relation,@md.dc_relation +        if @md.relation #dc +          id,info=@translate.relation,@md.relation            metadata(id,info)          end -        if @md.dc_coverage -          id,info=@translate.coverage,@md.dc_coverage +        if @md.coverage #dc +          id,info=@translate.coverage,@md.coverage            metadata(id,info)          end          if @md.keywords @@ -465,6 +465,20 @@ module SiSU_Manifest            id,info=@translate.prefix_b,@md.prefix_b            metadata(id,info)          end +        if @md.topic_register_array.length > 1 +          @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{@translate.topic_register}:</p></th><td>\n} +          @md.topic_register_array.each do |t| +            t.each_with_index do |st,i| +              if st.class == Array +                st.each do |v| +                  @manifest[:html] << %{<p class="it#{i}">#{v}</p>\n} +                end +              else @manifest[:html] << %{<p class="it#{i}">#{st}</p>\n} +              end +            end +          end +          @manifest[:html] << %{</td></tr>\n} +        end          if @md.fns            id,info=@translate.sourcefile,@md.fns            metadata(id,info) @@ -544,7 +558,7 @@ WOK  <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <title> -SiSU manifest: #{@md.title} +SiSU manifest: #{@md.full_title}  </title>  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />  <meta name="sourcefile" content="#{@md.fns}" /> @@ -559,8 +573,8 @@ SiSU manifest: #{@md.title}  </div>  <div class="content">  <h1 class="small">#{@translate.manifest_description}</h1> -<h2 class="small">#{@md.dc_title}</h2> -<p class="bold">#{@md.dc_creator}</p> +<h2 class="small">#{@md.full_title}</h2> +<p class="bold">#{@md.author}</p>  <p class="small">    <a href="#output">Document, Available Filetypes</a>  </p> diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb index d4b315f4..d369cc8c 100644 --- a/lib/sisu/v0/manpage.rb +++ b/lib/sisu/v0/manpage.rb @@ -418,7 +418,7 @@ WOK        def publish(manpage)          divider='='          content=[] -        date=if @md.dc_date; @md.dc_date +        date=if @md.date; @md.date          else '2007' #date missing decide on action          end          proj=SiSU_Env::Info_version.new.get_version diff --git a/lib/sisu/v0/odf_format.rb b/lib/sisu/v0/odf_format.rb index fe94bf5b..62e42863 100644 --- a/lib/sisu/v0/odf_format.rb +++ b/lib/sisu/v0/odf_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/param.rb b/lib/sisu/v0/param.rb index 2829abe1..c78a56b7 100644 --- a/lib/sisu/v0/param.rb +++ b/lib/sisu/v0/param.rb @@ -118,9 +118,9 @@ 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,: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 +      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,:subtitle,:full_title,:html_title,:subtitle_tex,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,: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,:author_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,:topic_register_array,:original_publication,:original_publication_date,:original_publication_nationality,:original_publication_institution,:writing_focus        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=@topic_register=@original_publication_details=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=@subtitle=@full_title=@html_title=@subtitle_tex=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@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=@author_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@man_synopsis=@topic_register=@original_publication_details=@original_publication=@original_publication_date=@original_publication_nationality=@original_publication_institution=@writing_focus=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 @@ -131,8 +131,7 @@ module SiSU_Param          @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=[] +        @authors,@topic_register_array,@papersize_array=[],[],[]          @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/          @rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/          @rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg @@ -152,9 +151,45 @@ module SiSU_Param          else                            'A4'          end        end +      def name_format(name) +        name.strip! +        @name_a_h=[] +        authors=name.scan(/[^;]+/) +        authors.each do |a| +          if a =~/"(.+?)"/ +            @name_a_h << { :the => $1 } +          else #if a =~/,/ +            x=a.scan(/[^,]+/) +            if x.length == 1 +              @name_a_h << { :the => x[0].strip } +            elsif x.length == 2 +              @name_a_h << { :the => x[0].strip, :others => x[1].strip } +            else #p x.length +            end +          end +        end +        l = @name_a_h.length +        name_str='' +        @name_a_h.each_with_index do |a,i| +          name_str += 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 +        {:name_a_h =>@name_a_h,:name_str =>name_str} +      end        def extract          @user,@home,@hostname,@pwd=ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'] -        @programs,@wc,@dc_language,@language_original={},{},{},{} +        @programs,@wc,@language,@language_original={},{},{},{}          @en={ :sum=>0,:mark=>0,:note=>0,:mismatch=>0 }          @prog=SiSU_Env::Info_settings.new          @sys=SiSU_Env::System_call.new @@ -257,7 +292,7 @@ module SiSU_Param            tell.warn unless @cmd =~/q/          end          @code_flag=false -        fns_array.each do |para|                                                                     #% Scan document +        fns_array.each do |para|                                                                                       #% Scan document            if para !~/^%+\s/ \            and para =~/<![abcdeghijklmnopqrstuvwxyz]/i # <!f not included              raise "Old markup style in file #@fns, current version #{@sisu_version[:project]} #{@sisu_version[:version]} #{@sisu_version[:date_stamp]} #{@sisu_version[:date]}:\n\t\t#{para}\n\n" @@ -267,165 +302,159 @@ module SiSU_Param            when /^\}code\s*$/; false            else @code_flag            end -          regx_header=/^(?:0~|@\S+?:[+-]?\s)/ +          regx_header=/^(?:@\S+?:[+-]?\s|0~\S+)/            if para =~regx_header \            and not @code_flag #or para=~/^(?:1|:?A)~/              case para -            when /^(?:0~ocn|@ocn:)\s+(.+?)$/m;  @ocn=$1                                             #% processing -            when /^(?:0~title|@title:)\s+(.+?)$/m                                                   #% metainfo DC +            when /^(?:@ocn:|0~ocn)\s+(.+?)$/m; @ocn=$1                                                                 #% processing +            when /^(?:@title:|0~title)\s+(.+?)$/m                                                                      #% metainfo DC                @title=$1.strip -              @dc_title=@title.dup +              @full_title=@title.dup                @html_title=@title.gsub(/(<p>|<p \/>|<br>|<br \/>)/,'')                @set_header_title=true                @title.chomp!(' ')                @html_title.chomp!(' ')                tell=SiSU_Screen::Ansi.new(@cmd,'Parameters',@html_title)                tell.txt_grey unless @cmd =~/q/ -            when /^(?:0~subtitle|@subtitle:)\s+(.+?)$/m                                             #% metainfo +            when /^(?:@subtitle:|0~subtitle)\s+(.+?)$/m                                                                #% metainfo                @subtitle=$1.strip -              @dc_title="#{@title} - #{@subtitle}" +              @full_title="#{@title} - #{@subtitle}"                @subtitle_tex=@subtitle -            when /^(?:0~(creator|author)-?|@(creator|author)-?:)\s+/                                #% metainfo DC -              if para[/(?:0~|@)(?:creator|author):?\s+((?:https?|ftp)\S+)\s+(.+?)$/m] -                @creator_home, @dc_creator=$1,$2 -              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 +            when /^(?:@(?:creator|author)-?:|0~(?:creator|author)-?)\s+(.+?)$/                                         #% metainfo DC +              names=name_format($1) +              @authorship=@author=names[:name_str] +              @authors=names[:name_a_h] +            when /^@(?:creator|author)\.title:\s+(.+?)$/; @author_title=$1                                             # Prof. Dr. etc. +            when /^@(?:creator|author)\.nationality:\s+(.+?)$/; @author_nationality=$1 +            when /^(?:@(?:translator|translated_by):|0~(?:translator|translated_by))\s+(.+?)$/m                        #% metainfo +              names=name_format($1) +              @translator=names[:name_str] +            when /^(?:@(?:illustrator|illustrated_by):|0~(?:illustrator|illustrated_by))\s+(.+?)$/m                    #% metainfo +              names=name_format($1) +              @illustrator=names[:name_str] +            when /^(?:@prepared_by:|0~prepared_by)\s+(.+?)$/m                                                          #% metainfo +              names=name_format($1) +              @prepared_by=names[:name_str] +            when /^(?:@digitized_by:|0~digitized_by)\s+(.+?)$/m                                                        #% metainfo DC +              names=name_format($1) +              @digitized_by=names[:name_str] +            when /^(?:@subject:|0~subject)\s+(.+?)$/m; @subject=$1                                                     #% metainfo DC +            when /^(?:@description:|0~description)\s+(.+?)$/m; @description=$1                                         #% metainfo DC & rss feed +            when /^(?:@contributor:|0~contributor)\s+(.+?)$/m                                                          #% metainfo DC +              names=name_format($1) +              @contributor=names[:name_str] +            when /^(?:@publisher:|0~publisher)\s+(.+?)$/m; @publisher=$1                                               #% metainfo DC +            when /^@original_publication:\s+(.+?)$/m; @original_publication=$1 +            when /^@original_publication\.date:\s+(.+?)$/; @original_publication_date=$1 +            when /^@original_publication\.nationality:\s+(.+?)$/; @original_publication_nationality=$1 +            when /^@original_publication\.institution:\s+(.+?)$/; @original_publication_institution=$1 +            when /^@writing_focus\.nationality:\s+(.+?)$/; @writing_focus=$1                                           # e.g. Finland (where and article on Finnish law) +            when /^(?:@|0~)date.+?$/m                                                                                  #% metainfo DC +              if para =~/(?:@date:|0~date)\s+(.+?)$/m +                @date=$1.strip                                                                                         #% original publication date unless the substantive text is updated/modified, then date of update +                if @date !~regx_date \ +                and not @date.empty? +                  tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',@date) +                  tell.instruct if @cmd =~/v/                  end +                @date_scheme='scheme="ISO-8601"' if @date =~/\d{4}-\d{2}-\d{2}/                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 -              @illustrator=$1 -            when /^(?:0~prepared_by|@prepared_by:)\s+(.+?)$/m                                       #% metainfo -              @prepared_by=$1 -            when /^(?:0~digitized_by|@digitized_by:)\s+(.+?)$/m                                     #% metainfo DC -              @digitized_by=$1 -            when /^(?:0~subject|@subject:)\s+(.+?)$/m                                               #% metainfo DC -              @dc_subject=$1 -            when /^(?:0~description|@description:)\s+(.+?)$/m                                       #% metainfo DC & rss feed -              @dc_description=$1 -            when /^(?:0~contributor|@contributor:)\s+(.+?)$/m                                       #% metainfo DC -              @dc_contributor=$1 -            when /^(?:0~publisher|@publisher:)\s+(.+?)$/m                                           #% metainfo DC -              @dc_publisher=$1 -            when /^(?:0~|@)date.+?$/m                                                               #% metainfo DC -              if para =~/(?:0~date|@date:)\s+(.+?)$/m -                @dc_date=$1.strip -                if @dc_date !~regx_date \ -                and not @dc_date.empty? -                  tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',@dc_date) +              if para =~/(?:@date\.added_to_site:|0~date\.added_to_site)\s+(.+?)$/m +                @date_added_to_site=$1.strip +                if @date_added_to_site !~regx_date \ +                and not @date_added_to_site.empty? +                  tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',@date_added_to_site)                    tell.instruct if @cmd =~/v/                  end -                @date_scheme='scheme="ISO-8601"' if @dc_date =~/\d{4}-\d{2}-\d{2}/ +                @date_scheme='scheme="ISO-8601"' if @date_added_to_site =~/\d{4}-\d{2}-\d{2}/                end -              if para =~/(?:0~date\.created|@date\.created:)\s*(.+?)$/m +              if para =~/(?:@date\.created:|0~date\.created)\s*(.+?)$/m                  date=$1.strip                  if date !~regx_date \                  and not date.empty?                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_created=date +                @date_created=date                  @date_created_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end -              if para =~/(?:0~date\.issued|@date\.issued:)\s*(.+?)$/m +              if para =~/(?:@date\.issued:|0~date\.issued)\s*(.+?)$/m                  date=$1.strip                  if date !~regx_date \                  and not date.empty?                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_issued=date +                @date_issued=date                  @date_issued_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end -              if para =~/(?:0~date\.available|@date\.available:)\s*(.+?)$/m +              if para =~/(?:@date\.available:|0~date\.available)\s*(.+?)$/m                  date=$1.strip                  if date !~regx_date \                  and not date.empty?                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_available=date +                @date_available=date                  @date_available_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end -              if para =~/^(?:0~date\.valid|@date\.valid:)\s*(.+?)$/m +              if para =~/^(?:@date\.valid:|0~date\.valid)\s*(.+?)$/m                  date=$1.strip                  if date !~regx_date \                  and not date.empty?                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_valid=date +                @date_valid=date                  @date_valid_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end -              if para =~/^(?:0~date\.modified|@date\.modified:)\s*(.+?)$/m                                                               #% of interest rss feed & sitemap +              if para =~/^(?:@date\.modified:|0~date\.modified)\s*(.+?)$/m                                             #% of interest rss feed & sitemap                  date=$1.strip                  if date !~regx_date \                  and not date.empty?                    tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date)                    tell.instruct if @cmd =~/v/                  end -                @dc_date_modified=date +                @date_modified=date                  @date_modified_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/                end -            when /^(?:0~type|@type:)\s+(.+?)$/m;             @dc_type=$1                                                 #% metainfo DC -            when /^(?:0~format|@format:)\s+(.+?)$/m;         @dc_format=$1                                               #% metainfo DC -            #when /^(?:0~identifier|@identifier:)\s+(.+?)$/m; @dc_identifier=$1                                           #% metainfo DC -            when /^(?:0~source|@source:)\s+(.+?)$/m;         @dc_source=$1                                               #% metainfo DC -            when /^(?:0~language(?:\.document)?|@language(?:\.document)?:)\s+(.+?)$/m                                    #% metainfo DC +              if para =~/^(?:@date\.translated:|0~date\.translated)\s*(.+?)$/m +                date=$1.strip +                if date !~regx_date \ +                and not date.empty? +                  tell=SiSU_Screen::Ansi.new(@cmd,'Date Format should be','YYYY-MM-DD','please correct document','Date','field, current value:',date) +                  tell.instruct if @cmd =~/v/ +                end +                @date_translated=date +                @date_translated_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ +              end +            when /^(?:@type:|0~type)\s+(.+?)$/m; @type=$1                                                              #% metainfo DC +            when /^(?:@format:|0~format)\s+(.+?)$/m; @format=$1                                                        #% metainfo DC +            #when /^(?:@identifier:|0~identifier)\s+(.+?)$/m; @identifier=$1                                           #% metainfo DC +            when /^(?:@source:|0~source)\s+(.+?)$/m; @source=$1                                                        #% metainfo DC +            when /^(?:@language(?:\.document)?:|0~language(?:\.document)?)\s+(.+?)$/m                                  #% metainfo DC                x=$1.strip                lang=SiSU_Env::Standardise_language.new(x.dup) -              @dc_language[:code]=lang.code -              @dc_language[:name]=lang.title -            when /^(?:0~language\.original|@language\.original:)\s+(.+?)$/m                                              #% metainfo DC +              @language[:code]=lang.code +              @language[:name]=lang.title +            when /^(?:@language\.original:|0~language\.original)\s+(.+?)$/m                                            #% metainfo DC                x=$1.strip                lang=SiSU_Env::Standardise_language.new(x.dup)                @language_original[:name]=lang.title -            when /^(?:0~relation|@relation:)\s+(.+?)$/m;     @dc_relation=$1                                             #% metainfo DC -            when /^(?:0~coverage|@coverage:)\s+(.+?)$/m;     @dc_coverage=$1                                             #% metainfo DC -            when /^(?:0~rights|@rights:)\s+(.+?)$/m;         @dc_rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC copyright, public domain, copyleft, creative commons, etc. -            when /^(?:0~papersize|@papersize:)\s+(.+?)$/m                                                                #% metainfo DC +            when /^(?:@relation:|0~relation)\s+(.+?)$/m; @relation=$1                                                  #% metainfo DC +            when /^(?:@coverage:|0~coverage)\s+(.+?)$/m; @coverage=$1                                                  #% metainfo DC +            when /^(?:@rights:|0~rights)\s+(.+?)$/m; @rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line])          #% metainfo DC copyright, public domain, copyleft, creative commons, etc. +            when /^(?:@papersize:|0~papersize)\s+(.+?)$/m                                                              #% metainfo DC                l=$1                if @mod.inspect !~/--papersize[=-]\S+/                  l=determine_papersize(l.dup)                  @papersize=l                end -            when /^(?:0~keywords?|@keywords?:?)\s+(.+?)$/m;  @keywords=$1                                                #% metainfo DC -            when /^(?:0~comments?|@comments?:?)\s+(.+?)$/m;  @comments=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line])  #% metainfo DC -            when /^(?:0~abstract|@abstract)\s+(.+?)$/m;      @abstract=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line])  #% metainfo DC -            when /^(?:0~tags?|@tags?:)\s+\S/m                                                                            #% metainfo -              tags=para.match(/^(?:0~tags?|@tags?:)\s+(.+)\Z/m)[1] +            when /^(?:@keywords?:|0~keywords?)\s+(.+?)$/m; @keywords=$1                                                #% metainfo DC +            when /^(?:@comments?:|0~comments?)\s+(.+?)$/m; @comments=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line])  #% metainfo DC +            when /^(?:@abstract:|0~abstract)\s+(.+?)$/m; @abstract=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line])    #% metainfo DC +            when /^(?:@tags?:|0~tags?)\s+\S/m                                                                          #% metainfo +              tags=para.match(/^(?:@tags?:|0~tags?)\s+(.+)\Z/m)[1]                tags.split(/,|$/).each do |tag|                  tag.strip!                  @tags << tag @@ -434,23 +463,23 @@ module SiSU_Param                  tag_a=tag_a.split(/:/).join('][')                  @tag_a << tag_a                end -            when /^(?:0~catalogue|@catalogue:)\s+(.+)?$/m                                                                #% metainfo +            when /^(?:@catalogue:|0~catalogue)\s+(.+)?$/m                                                              #% metainfo                m=$1                @cls_pg=m.match(/pg=(\S+)/)[1] if m =~/pg=/                @cls_isbn=m.match(/isbn=(\S+)/)[1] if m =~/isbn=/                @cls_dewey=m.match(/dewey=(\S+)/)[1] if m =~/dewey=/                @cls_loc=m.match(/loc=(\S+)/)[1] if m =~/loc=/ -            when /^(?:0~class(?:ify)?_loc|@class(?:ify)?_loc:)\s+(.+?)$/m;             @cls_loc=$1                       #% metainfo -            when /^(?:0~class(?:ify)?_dewey|@class(?:ify)?_dewey:)\s+(.+?)$/m;         @cls_dewey=$1                      #% metainfo -            when /^(?:0~class(?:ify)?_pg|@class(?:ify)?_pg)\s+(.+?)$/m;                @cls_pg=$1                        #% metainfo -            when /^(?:0~(?:class(?:ify)?_)?isbn|@(?:class(?:ify)?_)?isbn)\s+(\S+?)$/m; @cls_isbn=$1                      #% metainfo -            when /^(?:0~images?|@images?:)\s+(.+?)$/m;                                 @image=$1                         #% processing -            when /^(?:0~(?:toc|structure)|@(?:toc|structure):)\s+(.+?)\Z/m                                                 #% processing +            when /^(?:@class(?:ify)?_loc:|0~class(?:ify)?_loc)\s+(.+?)$/m; @cls_loc=$1                                 #% metainfo +            when /^(?:@class(?:ify)?_dewey:|0~class(?:ify)?_dewey)\s+(.+?)$/m; @cls_dewey=$1                           #% metainfo +            when /^(?:@class(?:ify)?_pg:|0~class(?:ify)?_pg)\s+(.+?)$/m; @cls_pg=$1                                    #% metainfo +            when /^(?:@(?:class(?:ify)?_)?isbn:|0~(?:class(?:ify)?_)?isbn)\s+(\S+?)$/m; @cls_isbn=$1                   #% metainfo +            when /^(?:@images?:|0~images?)\s+(.+?)$/m; @image=$1                                                       #% processing +            when /^(?:@(?:toc|structure):|0~(?:toc|structure))\s+(.+?)\Z/m                                             #% processing                doc_toc_str=$1                @toc=doc_toc_str.split(/;\s*/)                @toc=[ @toc ] if @toc == String                #@toc.each {|x| x.gsub!(/\{/,'\{') } #FIX~ -              lv1=@toc[0] ||='1~ '                                        #some arbitrary changes made +              lv1=@toc[0] ||='1~ '                                                                                     #some arbitrary changes made                @lv1=/^#{lv1}/                lv2=@toc[1] ||='2~ '                @lv2=/^#{lv2}/ @@ -462,8 +491,8 @@ module SiSU_Param                @lv5=/^#{lv5}/                lv6=@toc[5] ||='6~ '                @lv6=/^#{lv6}/ -            when /^(?:0~(?:level|page|markup)|@(?:level|page|markup):)\s+(.+?)$/m                   #% processing revisit..., use syntax 0~level new=1,2,3; break=4 -              if para =~/(?:0~|@)(?:markup|level|page):?\s+(.+?)\Z/m +            when /^(?:@(?:level|page|markup):|0~(?:level|page|markup))\s+(.+?)$/m                                      #% processing revisit..., use syntax 0~level new=1,2,3; break=4 +              if para =~/(?:@|0~)(?:markup|level|page):?\s+(.+?)\Z/m                  page_break_str=$1                  pagebreaks=page_break_str.split(/;\s*/)                  #pagebreaks=[ pagebreaks ] if pagebreaks == String @@ -480,11 +509,11 @@ module SiSU_Param                  @toc_lev_limit=toc_lev_limit if toc_lev_limit                  @flag_auto_heading_num=true if para =~/num_top/                end -              if para =~/^(?:0~markup|@markup:)\s+(.+?)$/m                             #%use of markup depreciated for num_top +              if para =~/^(?:@markup:|0~markup)\s+(.+?)$/m                                                             #%use of markup depreciated for num_top                  @markup=$1                  @flag_auto_heading_num=true if para =~/num_top/                end -            when /^(?:0~bold|@bold:)\s+(.+?)$/m                                                     #% processing +            when /^(?:@bold:|0~bold)\s+(.+?)$/m                                                                        #% processing                m=$1.strip                x=case m                when /\/i$/; 'i' @@ -498,7 +527,7 @@ module SiSU_Param                else                          /#{rgx}/                end                @make_bold -            when /^(?:0~(?:italics?|itali[sz]e)|@(?:italics?|itali[sz]e):)\s+(.+?)$/m               #% processing Dublin Core - dublin core within +            when /^(?:@(?:italics?|itali[sz]e):|0~(?:italics?|itali[sz]e))\s+(.+?)$/m                                  #% processing Dublin Core - dublin core within                m=$1.strip                x=case m                when /\/i$/; 'i' @@ -512,11 +541,11 @@ module SiSU_Param                else                            /#{rgx}/                end                @make_italic -            when /^(?:0~(?:vocabulary|wordlist)|@(?:vocabulary|wordlist):)\s+(.+?)$/m               #% processing -                @vocabulary=$1                                                   #not actually used by concordance -            when /^(?:0~skin|@skin:)\s+(.+?)$/; @doc_skin=$1.strip                                  #% processing -            when /^(?:0~(?:css|stylesheet)|@(?:css|stylesheet):)\s+(.+?)$/; @doc_css=$1.strip       #% processing -            when /^(?:0~links|@links:)\s+(.+?)\Z/m                                                   #% processing +            when /^(?:@(?:vocabulary|wordlist):|0~(?:vocabulary|wordlist))\s+(.+?)$/m                                  #% processing +                @vocabulary=$1                                                                                         #not actually used by concordance +            when /^(?:@skin:|0~skin)\s+(.+?)$/; @doc_skin=$1.strip                                                     #% processing +            when /^(?:@(?:css|stylesheet):|0~(?:css|stylesheet))\s+(.+?)$/; @doc_css=$1.strip                          #% processing +            when /^(?:@links:|0~links)\s+(.+?)\Z/m                                                                     #% processing                doc_links_str=$1                @lnk=[]                if doc_links_str=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/ @@ -540,40 +569,50 @@ module SiSU_Param                    end                  end                end -            when /^(?:0~prefix(?:_[ab])?|@prefix(?:_[ab])?:)\s/                                     #% metainfo +            when /^(?:@prefix(?:_[ab])?:|0~prefix(?:_[ab])?)\s/                                                        #% metainfo                if para =~/prefix_a:?\s+/ -                @prefix_a=para[/(?:0~prefix_a|@prefix_a:)\s+(.+?)$/im,1] +                @prefix_a=para[/(?:@prefix_a:|0~prefix_a)\s+(.+?)$/im,1]                end                if para =~/prefix(?:_b)?:?\s+/ -                @prefix_b=para[/(?:0~prefix(?:_b)?|@prefix(?:_b)?:)\s+(.+?)$/im,1] +                @prefix_b=para[/(?:@prefix(?:_b)?:|0~prefix(?:_b)?)\s+(.+?)$/im,1] +              end +            when /^(?:@suffix:|0~suffix)\s+(.+?)$/m; @suffix=$1                                                        #% metainfo +            when /^(?:@information:|0~information)\s+(.+?)$/m; @information=$1                                         #% metainfo +            when /^(?:@topic_register:|0~topic_register)\s+(.+?)$/m; @topic_register=$1                                #% metainfo, similar syntax to book index, leave out the ={} i.e. use equivalent of ={(.+?)} +              u=@topic_register.scan(/[^;]+/) +              v=[] +              u.each do |l| +                v << l.scan(/[^:]+/) +              end +              v.each do |m| +                m[-1]=m[-1].scan(/[^|]+/) if m[-1] =~/[|]/ +                @topic_register_array << m                end -            when /^(?:0~suffix|@suffix:)\s+(.+?)$/m;           @suffix=$1                           #% metainfo -            when /^(?:0~information|@information:)\s+(.+?)$/m; @information=$1                      #% metainfo -            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 +              @topic_register_array.sort! +            when /^(?:@contact:|0~contact)\s+(.+?)$/m; @contact=$1                                                     #% metainfo +            when /^(?:@original_publication:|0~original_publication)\s+(.+?)$/m; @original_publication=$1              #% details of original publication +            when /^(?:@icon:|0~icon)\s+(.+?)$/m; @icon=$1                                                              #% processing +            when /^(?:@promo:|0~promo)\s+(.+?)$/m                @flag_promo=true                @promo=$1.split(/[,;]\s*/) -            when /^(?:0~ad|@ad:)\s+(\S+)?\s+(\S+\.png)?\s+(.+?!)\s+(\d+)\s*$/m                      #% processing +            when /^(?:@ad:|0~ad)\s+(\S+)?\s+(\S+\.png)?\s+(.+?!)\s+(\d+)\s*$/m                                         #% processing                @ad_url,@ad_png,@ad_alt,@ad_began=$1,$2,$3,$4 -            when /0~ad\.home\s+(.+)?\s*$/m                                                          #% processing +            when /0~ad\.home\s+(.+)?\s*$/m                                                                             #% processing                ad_home_str=$1                @ad_home=ad_home_str.split(/\s+!/) -            when /^(?:0~sta?mp(?:ed)?|@sta?mp(?:ed)?:)\s+(.+?)$/m;  @stmp= $1.downcase!             #% processing -            when /^(?:0~(?:rcs|cvs)|@(?:rcs|cvs):)\+?\s+/                                           #% processing -              m=/(?:0~(?:rcs|cvs)|@(?:rcs|cvs):)\+?\s+/ #note the + sign to turn on use of rcs or cvs id +            when /^(?:@sta?mp(?:ed)?:|0~sta?mp(?:ed)?)\s+(.+?)$/m; @stmp= $1.downcase!                                 #% processing +            when /^(?:@(?:rcs|cvs):|0~(?:rcs|cvs))\+?\s+/                                                              #% processing +              m=/(?:@(?:rcs|cvs):|0~(?:rcs|cvs))\+?\s+/ #note the + sign to turn on use of rcs or cvs id                ver=para[/#{m}(.+)/,1] #RCS or CVS ID tag # eg. # $Id$                contains=/[\$]Id:\s+(\S+),v\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+Exp\s+(?:\S+\s+)?[\$]/ # reason for [$] which is apparently unnecessary is that rcs or cvs will otherwise expand id!                if contains.match(ver)                  filename,vnumber,date,time,operator=contains.match(ver).captures                  @sc_filename,@sc_number,@sc_date,@sc_time=filename,vnumber,date,time                end -              @sc_info=true if para[/(?:0~(?:rcs|cvs)|@(?:rcs|cvs):)\+/] -            when /^@base_program:\s+(.+?)$/;                   @base_program=$1                                       #% processing +              @sc_info=true if para[/(?:@(?:rcs|cvs):|0~(?:rcs|cvs))\+/] +            when /^@base_program:\s+(.+?)$/; @base_program=$1                                                          #% processing                #% break - break, not necessary to process headers further :-) but necessary to extract endnotes etc. ;-( -            when /^(?:0~man|@man:)\s+(.+?)\Z/m                                           #% man pages +            when /^(?:@man:|0~man)\s+(.+?)\Z/m                                                                         #% man pages                maninfo_str=$1                maninfo=maninfo_str.split(/;\s*/m)                maninfo.each do |x| @@ -588,8 +627,8 @@ module SiSU_Param              @lv4 ||=/^#{Mx[:lv_o]}4:/              @lv5 ||=/^#{Mx[:lv_o]}5:/              @lv6 ||=/^#{Mx[:lv_o]}6:/ -          else                                                                   #% -            if para =~ /^(?:1|:?A)~/                                                                      #% processing +          else                                                                                                         #% +            if para =~ /^(?:1|:?A)~/                                                                                   #% processing                if para=~/^:?A~/                  if @markup.nil? \                  or @markup.empty? @@ -614,13 +653,13 @@ module SiSU_Param              end              unless @code_flag                case para -              when /~\{\s+.+?\}~/m                                                                    #% processing +              when /~\{\s+.+?\}~/m                                                                                     #% processing                  en=para.scan(/~\{.+?\}~/m)                  en.each { |e| @en[:sum] +=1 } -              when /~\^(?:\s|$)/m                                                                       #% processing +              when /~\^(?:\s|$)/m                                                                                      #% processing                  mk=para.scan(/~\^(?:\s|$)/)                  mk.each { |e| @en[:mark] +=1 } -              when /^\^~\s+\S/; @en[:note] +=1                                                        #% processing +              when /^\^~\s+\S/; @en[:note] +=1                                                                         #% processing                end              end              if para =~/~\{|\^~ |~\^|<:ee>|\{.+?\[[1-6]\]\}\S+?\.ss[tm]/m; @flag_auto_endnotes,@flag_endnotes=true,true @@ -658,11 +697,11 @@ module SiSU_Param              and para =~/^4~\s+(.+)$/                t=$1              end -            unless @heading_seg_first_flag                          # extract first segment name +            unless @heading_seg_first_flag                                                                             # extract first segment name                @heading_seg_first=t                @heading_seg_first_flag=true              end -            if m                                                     # list all segment names +            if m                                                                                                       # list all segment names                @seg_names << m                @set_heading_seg=true                if m=~/^\d{1,3}/ \ @@ -680,7 +719,7 @@ module SiSU_Param            unless @sem_tag              @sem_tag=true if para=~/[:;]\{.+?\}[:;][a-z+]/ #refix later            end -        end #% here endeth the document loop +        end                                                                                                            #% here endeth the document loop          if @ec[:image].length > 0            @ec[:image].flatten!            @ec[:image].uniq! @@ -697,11 +736,11 @@ module SiSU_Param            @man_synopsis.gsub!(/\n/,"\n.BR\n")            @man_synopsis.gsub!(/\A/,"\n.SH SYNOPSIS\n")          end -        unless @dc_rights -          if @dc_creator -            @dc_rights ||=if @dc_date =~/([12][890]\d{2})/                     #matches years 1800 through 20\d\d 2004w19 -              "Copyright (C) #{$1} #@dc_creator" -            else 'Copyright (C)' + @dc_creator +        unless @rights +          if @author +            @rights ||=if @date =~/([12][890]\d{2})/                     #matches years 1800 through 20\d\d 2004w19 +              "Copyright (C) #{$1} #@author" +            else 'Copyright (C)' + @author              end            end          end @@ -754,17 +793,17 @@ module SiSU_Param              end            end          end -        @dc_publisher ||= "#@@publisher (this copy)" +        @publisher ||= "#@@publisher (this copy)"          fn_set_lang=SiSU_Env::Standardise_language.new.file_to_language(@fns) -        unless @dc_language[:code] \ -        and @dc_language[:name] +        unless @language[:code] \ +        and @language[:name]            lang=@env.i18n.language #default language settings for directory by name, or in sysrc.yml -          @dc_language[:code] ||= lang.code -          @dc_language[:name] ||= lang.title +          @language[:code] ||= lang.code +          @language[:name] ||= lang.title          end          unless fn_set_lang[:d]==true #decide, naming convention overrides other settings, within document, etc. -          @dc_language[:code]=fn_set_lang[:c] -          @dc_language[:name]=fn_set_lang[:l] +          @language[:code]=fn_set_lang[:c] +          @language[:name]=fn_set_lang[:l]          end          @fnl=@env.i18n.lang_filename(fn_set_lang[:c])          @flv.each do |l| @@ -778,7 +817,7 @@ module SiSU_Param          end if @flv          @lang.uniq!          @fn=SiSU_Env::Env_call.new(@fns).lang(fn_set_lang[:c]) -        @dc_identifier="#{@env.url.root}/#@fnb/#{@fn[:toc]}" #DC note constructed dc identifier +        @identifier="#{@env.url.root}/#@fnb/#{@fn[:toc]}" #DC note constructed dc identifier          if @en[:note] > 0 \          and @en[:sum] > 0            if @en[:sum] > 0 @@ -797,8 +836,8 @@ module SiSU_Param            tell=SiSU_Screen::Ansi.new(@cmd,'Document Title Missing','please provide it')            tell.warn if @cmd =~/v/          end -        if @dc_creator !~/[\S]/ -          tell=SiSU_Screen::Ansi.new(@cmd,'Document Creator/Author Missing','please provide it') +        if @author !~/[\S]/ +          tell=SiSU_Screen::Ansi.new(@cmd,'Document Author/Creator Missing','please provide it')            tell.warn if @cmd =~/v/          end          # Elementary Document Structure Analysis - adds complexity may remove - need to develop - appears to work, proof of concept @@ -887,8 +926,8 @@ module SiSU_Param            tell=SiSU_Screen::Ansi.new(@cmd,"doc_skin <- #@doc_skin")            tell.txt_grey if @cmd =~/v/          end -        @data=nil                                                                #else whole file's contents are stored in md pstore & is not required to be... big waste actually -        Store.new(self,@env).store                                           #% pstore +        @data=nil #else whole file's contents are stored in md pstore & is not required to be... big waste actually +        Store.new(self,@env).store                                                                                     #% pstore          self        end        private diff --git a/lib/sisu/v0/shared_txt.rb b/lib/sisu/v0/shared_txt.rb index 91389538..3dfadeb3 100644 --- a/lib/sisu/v0/shared_txt.rb +++ b/lib/sisu/v0/shared_txt.rb @@ -156,7 +156,7 @@ module SiSU_text_utils      end      def start_is_match        meta=case @p -      when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/;               header($1,@md.dc_title,'meta','dc') #dc 1 +      when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/;               header($1,@md.full_title,'meta','dc') #dc 1        #when /^@(subtitle):\s+(.+?)$/;            header($1,$2,'meta','extra')        when /^#{Mx[:meta_o]}(creator|author)#{Mx[:meta_c]}\s*(.+?)$/;      header('creator',$2,'meta','dc')    #dc 2        when /^#{Mx[:meta_o]}(subject)#{Mx[:meta_c]}\s*(.+?)$/;             header($1,$2,'meta','dc')           #dc 3 diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb index aad7c17e..ffd4bc15 100644 --- a/lib/sisu/v0/shared_xml.rb +++ b/lib/sisu/v0/shared_xml.rb @@ -541,109 +541,109 @@ module SiSU_XML_tags #Format    include SiSU_Viz    class RDF      def initialize(md='',seg_name=[],tracker=0) -      @dc_title=@dc_subtitle=@dc_creator=@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=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@dc_relation=@dc_coverage=@dc_rights=@copyright=@owner=@keywords='' +      @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords=''        #seg_name=%{#{@@seg_name[@@tracker]} - } if @@seg_name[@@tracker]        @md=md        @sfx,@pdf=@md.sfx,@md.pdf        @rdfurl=%{  rdf:about="http://www.jus.uio.no/lm/toc"\n} -      if @md.dc_title                                                            # DublinCore 1 - title -        @rdf_title=%{    dc.title="#{seg_name}#{@md.dc_title}"\n} -        @dc_title=%{  <meta name="dc.title" content="#{@md.dc_title}" />\n} -        #@dc_title=%{  <meta name="dc.title" content="#{seg_name}#{@md.dc_title}" />\n} -      end -      if @md.dc_creator                                                          # DublinCore 2 - creator/author (author) -        @rdf_creator=%{    dc.creator="#{@md.dc_creator}"\n} -        content=meta_content_clean(@md.dc_creator) -        @dc_creator=%{  <meta name="dc.creator" content="#{content}" />\n} -      end -      if @md.dc_subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) -        @rdf_subject=%{    dc.subject="#{@md.dc_subject}"\n} -        content=meta_content_clean(@md.dc_subject) -        @dc_subject=%{  <meta name="dc.subject" content="#{content}" />\n} -      end -      if @md.dc_description                                                      # DublinCore 4 - description -        @rdf_description=%{    dc.description="#{@md.dc_description}"\n} -        content=meta_content_clean(@md.dc_description) -        @dc_description=%{  <meta name="dc.description" content="#{content}" />\n} -      end -      if @md.dc_publisher                                                        # DublinCore 5 - publisher (current copy published by) -        @rdf_publisher=%{    dc.publisher="#{@md.dc_publisher}"\n} -        content=meta_content_clean(@md.dc_publisher) -        @dc_publisher=%{  <meta name="dc.publisher" content="#{content}" />\n} -      end -      if @md.dc_contributor                                                      # DublinCore 6 - contributor -        @rdf_contributor=%{    dc.contributor="#{@md.dc_contributor}"\n} -        content=meta_content_clean(@md.dc_contributor) -        @dc_contributor=%{  <meta name="dc.contributor" content="#{content}" />\n} -      end -      if @md.dc_date                                                             # DublinCore 7 - date year-mm-dd -        @rdf_date=%{    dc.date="#{@md.dc_date}"\n} -        @dc_date=%{  <meta name="dc.date" content="#{@md.dc_date}" #{@md.date_scheme} />\n} -      end -      if @md.dc_date_created                                                     # DublinCore 7 - date.created year-mm-dd -        @rdf_date_created=%{    dc.date.created="#{@md.dc_date_created}"\n} -        @dc_date_created=%{  <meta name="dc.date.created" content="#{@md.dc_date_created}" #{@md.date_created_scheme} />\n} -      end -      if @md.dc_date_issued                                                      # DublinCore 7 - date.issued year-mm-dd -        @rdf_date_issued=%{    dc.date.issued="#{@md.dc_date_issued}"\n} -        @dc_date_issued=%{  <meta name="dc.date.issued" content="#{@md.dc_date_issued}" #{@md.date_issued_scheme} />\n} -      end -      if @md.dc_date_available                                                   # DublinCore 7 - date.available year-mm-dd -        @rdf_date_available=%{    dc.date.available="#{@md.dc_date_available}"\n} -        @dc_date_available=%{  <meta name="dc.date.available" content="#{@md.dc_date_available}" #{@md.date_available_scheme} />\n} -      end -      if @md.dc_date_valid                                                       # DublinCore 7 - date.valid year-mm-dd -        @rdf_date_valid=%{    dc.date.valid="#{@md.dc_date_valid}"\n} -        @dc_date_valid=%{  <meta name="dc.date.valid" content="#{@md.dc_date_valid}" #{@md.date_valid_scheme} />\n} -      end -      if @md.dc_date_modified                                                    # DublinCore 7 - date.modified year-mm-dd -        @rdf_date_modified=%{    dc.date.modified="#{@md.dc_date_modified}"\n} -        @dc_date_modified=%{  <meta name="dc.date.modified" content="#{@md.dc_date_modified}" #{@md.date_modified_scheme} />\n} -      end -      if @md.dc_type                                                             # DublinCore 8 - type (genre eg. report, convention etc) -        @rdf_type=%{    dc.type="#{@md.dc_type}"\n} -        content=meta_content_clean(@md.dc_type) -        @dc_type=%{  <meta name="dc.type" content="#{content}" />\n} -      end -      if @md.dc_format                                                           # DublinCore 9 - format (use your mime type) -        @rdf_format=%{    dc.format="#{@md.dc_format}"\n} -        content=meta_content_clean(@md.dc_format) -        @dc_format=%{  <meta name="dc.format" content="#{content}" />\n} -      end -      if @md.dc_identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) -        @rdf_identifier=%{    dc.identifier="#{@md.dc_identifier}"\n} -        content=meta_content_clean(@md.dc_identifier) -        @dc_identifier=%{  <meta name="dc.identifier" content="#{content}" />\n} -      end -      if @md.dc_source                                                           # DublinCore 11 - source (document source) -        @rdf_source=%{    dc.source="#{@md.dc_source}"\n} -        content=meta_content_clean(@md.dc_source) -        @dc_source=%{  <meta name="dc.source" content="#{content}" />\n} -      end -      if @md.dc_language \ -      and @md.dc_language[:name]                                                  # DublinCore 12 - language (English) -        @rdf_language=%{    dc.language="#{@md.dc_language[:name]}"\n} -        @dc_language=%{  <meta name="dc.language" content="#{@md.dc_language[:name]}" />\n} +      if @md.full_title                                                            # DublinCore 1 - title +        @rdf_title=%{    dc.title="#{seg_name}#{@md.full_title}"\n} +        @full_title=%{  <meta name="dc.title" content="#{@md.full_title}" />\n} +        #@full_title=%{  <meta name="dc.title" content="#{seg_name}#{@md.full_title}" />\n} +      end +      if @md.author                                                          # DublinCore 2 - creator/author (author) +        @rdf_author=%{    dc.author="#{@md.author}"\n} +        content=meta_content_clean(@md.author) +        @author=%{  <meta name="dc.author" content="#{content}" />\n} +      end +      if @md.subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) +        @rdf_subject=%{    dc.subject="#{@md.subject}"\n} +        content=meta_content_clean(@md.subject) +        @subject=%{  <meta name="dc.subject" content="#{content}" />\n} +      end +      if @md.description                                                      # DublinCore 4 - description +        @rdf_description=%{    dc.description="#{@md.description}"\n} +        content=meta_content_clean(@md.description) +        @description=%{  <meta name="dc.description" content="#{content}" />\n} +      end +      if @md.publisher                                                        # DublinCore 5 - publisher (current copy published by) +        @rdf_publisher=%{    dc.publisher="#{@md.publisher}"\n} +        content=meta_content_clean(@md.publisher) +        @publisher=%{  <meta name="dc.publisher" content="#{content}" />\n} +      end +      if @md.contributor                                                      # DublinCore 6 - contributor +        @rdf_contributor=%{    dc.contributor="#{@md.contributor}"\n} +        content=meta_content_clean(@md.contributor) +        @contributor=%{  <meta name="dc.contributor" content="#{content}" />\n} +      end +      if @md.date                                                             # DublinCore 7 - date year-mm-dd +        @rdf_date=%{    dc.date="#{@md.date}"\n} +        @date=%{  <meta name="dc.date" content="#{@md.date}" #{@md.date_scheme} />\n} +      end +      if @md.date_created                                                     # DublinCore 7 - date.created year-mm-dd +        @rdf_date_created=%{    dc.date.created="#{@md.date_created}"\n} +        @date_created=%{  <meta name="dc.date.created" content="#{@md.date_created}" #{@md.date_created_scheme} />\n} +      end +      if @md.date_issued                                                      # DublinCore 7 - date.issued year-mm-dd +        @rdf_date_issued=%{    dc.date.issued="#{@md.date_issued}"\n} +        @date_issued=%{  <meta name="dc.date.issued" content="#{@md.date_issued}" #{@md.date_issued_scheme} />\n} +      end +      if @md.date_available                                                   # DublinCore 7 - date.available year-mm-dd +        @rdf_date_available=%{    dc.date.available="#{@md.date_available}"\n} +        @date_available=%{  <meta name="dc.date.available" content="#{@md.date_available}" #{@md.date_available_scheme} />\n} +      end +      if @md.date_valid                                                       # DublinCore 7 - date.valid year-mm-dd +        @rdf_date_valid=%{    dc.date.valid="#{@md.date_valid}"\n} +        @date_valid=%{  <meta name="dc.date.valid" content="#{@md.date_valid}" #{@md.date_valid_scheme} />\n} +      end +      if @md.date_modified                                                    # DublinCore 7 - date.modified year-mm-dd +        @rdf_date_modified=%{    dc.date.modified="#{@md.date_modified}"\n} +        @date_modified=%{  <meta name="dc.date.modified" content="#{@md.date_modified}" #{@md.date_modified_scheme} />\n} +      end +      if @md.type                                                             # DublinCore 8 - type (genre eg. report, convention etc) +        @rdf_type=%{    dc.type="#{@md.type}"\n} +        content=meta_content_clean(@md.type) +        @type=%{  <meta name="dc.type" content="#{content}" />\n} +      end +      if @md.format                                                           # DublinCore 9 - format (use your mime type) +        @rdf_format=%{    dc.format="#{@md.format}"\n} +        content=meta_content_clean(@md.format) +        @format=%{  <meta name="dc.format" content="#{content}" />\n} +      end +      if @md.identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) +        @rdf_identifier=%{    dc.identifier="#{@md.identifier}"\n} +        content=meta_content_clean(@md.identifier) +        @identifier=%{  <meta name="dc.identifier" content="#{content}" />\n} +      end +      if @md.source                                                           # DublinCore 11 - source (document source) +        @rdf_source=%{    dc.source="#{@md.source}"\n} +        content=meta_content_clean(@md.source) +        @source=%{  <meta name="dc.source" content="#{content}" />\n} +      end +      if @md.language \ +      and @md.language[:name]                                                  # DublinCore 12 - language (English) +        @rdf_language=%{    dc.language="#{@md.language[:name]}"\n} +        @language=%{  <meta name="dc.language" content="#{@md.language[:name]}" />\n}        end        if @md.language_original \        and @md.language_original[:name]          @rdf_language_original=%{    dc.language="#{@md.language_original[:name]}"\n}          @language_original=%{  <meta name="dc.language" content="#{@md.language_original[:name]}" />\n}        end -      if @md.dc_relation                                                         # DublinCore 13 - relation -        @rdf_relation=%{    dc.relation="#{@md.dc_relation}"\n} -        content=meta_content_clean(@md.dc_relation) -        @dc_relation=%{  <meta name="dc.relation" content="#{content}" />\n} +      if @md.relation                                                         # DublinCore 13 - relation +        @rdf_relation=%{    dc.relation="#{@md.relation}"\n} +        content=meta_content_clean(@md.relation) +        @relation=%{  <meta name="dc.relation" content="#{content}" />\n}        end -      if @md.dc_coverage                                                         # DublinCore 14 - coverage -        @rdf_coverage=%{    dc.coverage="#{@md.dc_coverage}"\n} -        content=meta_content_clean(@md.dc_coverage) -        @dc_coverage=%{  <meta name="dc.coverage" content="#{content}" />\n} +      if @md.coverage                                                         # DublinCore 14 - coverage +        @rdf_coverage=%{    dc.coverage="#{@md.coverage}"\n} +        content=meta_content_clean(@md.coverage) +        @coverage=%{  <meta name="dc.coverage" content="#{content}" />\n}        end -      if @md.dc_rights                                                           # DublinCore 15 - rights -        @rdf_rights=%{    dc.rights="#{@md.dc_rights}"\n} -        content=meta_content_clean(@md.dc_rights) -        @dc_rights=%{  <meta name="dc.rights" content="#{content}" />\n} +      if @md.rights                                                           # DublinCore 15 - rights +        @rdf_rights=%{    dc.rights="#{@md.rights}"\n} +        content=meta_content_clean(@md.rights) +        @rights=%{  <meta name="dc.rights" content="#{content}" />\n}        end        content=meta_content_clean(@md.keywords)        @keywords=%{  <meta name="keywords" content="#{content}" />\n} if @md.keywords @@ -725,7 +725,7 @@ WOK      def metatag_html #values strung together, because some empty, and resulting output (line breaks) is much better  #{@vz.js_head}  <<WOK -#@dc_title#@dc_subtitle#@dc_creator#@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#@dc_type#@dc_format#@dc_identifier#@dc_source#@dc_language#@dc_relation#@dc_coverage#@dc_rights#@copyright#@owner +#@full_title#@subtitle#@author#@subject#@description#@publisher#@contributor#@date#@date_created#@date_issued#@date_available#@date_valid#@date_modified#@type#@format#@identifier#@source#@language#@relation#@coverage#@rights#@copyright#@owner  #{@vz.txt_generator}  #{@vz.png_ico}  WOK diff --git a/lib/sisu/v0/sitemaps.rb b/lib/sisu/v0/sitemaps.rb index c08a0789..8e706ce4 100644 --- a/lib/sisu/v0/sitemaps.rb +++ b/lib/sisu/v0/sitemaps.rb @@ -153,8 +153,8 @@ WOK        idx=sitemap_idx.join      end      def sitemap -      map=if @md.dc_date_modified \ -      and @md.dc_date_modified=~/\d{4}-\d{2}-\d{2}/ +      map=if @md.date_modified \ +      and @md.date_modified=~/\d{4}-\d{2}-\d{2}/          sitemap_date_modified        else sitemap_no_date        end @@ -169,18 +169,18 @@ WOK  #{@rdf.comment_xml}    <url>      <loc>#{@env.path.url.remote}/#@fnb_utf8_xml/#{@fn[:toc]}</loc> -    <lastmod>#{@md.dc_date_modified}</lastmod> +    <lastmod>#{@md.date_modified}</lastmod>      <changefreq>monthly</changefreq>      <priority>0.7</priority>    </url>    <url>      <loc>#{@env.path.url.remote}/#@fnb_utf8_xml/#{@fn[:doc]}</loc> -    <lastmod>#{@md.dc_date_modified}</lastmod> +    <lastmod>#{@md.date_modified}</lastmod>      <priority>0.5</priority>    </url>    <url>      <loc>#{@env.path.url.remote}/#@fnb_utf8_xml/#{@fn[:manifest]}</loc> -    <lastmod>#{@md.dc_date_modified}</lastmod> +    <lastmod>#{@md.date_modified}</lastmod>      <priority>0.5</priority>    </url>  </urlset> diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 57695904..ded14951 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -1362,7 +1362,7 @@ WOK        def output                                                                 #web/webserv output directory... subdirectory into which further subdirectories are made based on file names          "#{path.webserv}/#@stub_pwd"        end -      def output_src                                                                 #web/webserv output directory... subdirectory into which further subdirectories are made based on file names +      def output_src          "#{path.output}/src"        end        def output_md_harvest diff --git a/lib/sisu/v0/texinfo_format.rb b/lib/sisu/v0/texinfo_format.rb index 7f669185..91e48d0f 100644 --- a/lib/sisu/v0/texinfo_format.rb +++ b/lib/sisu/v0/texinfo_format.rb @@ -100,7 +100,7 @@ module SiSU_Texinfo_format          subtitle="@subtitle @value{VERSION}, @value{UPDATED}\n" #bugwatch        end        subtitle ||='' -      author=@md.dc_creator if @md.dc_creator +      author=@md.author if @md.author        author ||=''        author.gsub!(/[\*]/,'') #if author        v=SiSU_Env::Info_version.new.get_version @@ -174,68 +174,68 @@ WOK      def dublincore        title=spec_char_string(@md.title) if @md.title        subtitle=spec_char_string(@md.subtitle) if @md.subtitle -      dc_title="#{title} - #{subtitle}" -      dc_creator=spec_char_string(@md.dc_creator) if @md.dc_creator -      dc_subject=spec_char_string(@md.dc_subject) if @md.dc_subject -      dc_description=spec_char_string(@md.dc_description) if @md.dc_description -      dc_publisher=spec_char_string(@md.dc_publisher) if @md.dc_publisher -      dc_contributor=spec_char_string(@md.dc_contributor) if @md.dc_contributor -      dc_date=spec_char_string(@md.dc_date) if @md.dc_date -      dc_date_created=spec_char_string(@md.dc_date_created) if @md.dc_date_created -      dc_date_issued=spec_char_string(@md.dc_date_issued) if @md.dc_date_issued -      dc_date_available=spec_char_string(@md.dc_date_available) if @md.dc_date_available -      dc_date_valid=spec_char_string(@md.dc_date_valid) if @md.dc_date_valid -      dc_date_modified=spec_char_string(@md.dc_date_modified) if @md.dc_date_modified -      dc_type=spec_char_string(@md.dc_type) if @md.dc_type -      dc_format=spec_char_string(@md.dc_format) if @md.dc_format -      dc_identifier=spec_char_string(@md.dc_identifier) if @md.dc_identifier -      dc_source=spec_char_string(@md.dc_source) if @md.dc_source -      dc_language=spec_char_string(@md.dc_language[:name]) if @md.dc_language[:name] +      full_title="#{title} - #{subtitle}"                                           #dc +      author=spec_char_string(@md.author) if @md.author                             #dc +      subject=spec_char_string(@md.subject) if @md.subject                          #dc +      description=spec_char_string(@md.description) if @md.description              #dc +      publisher=spec_char_string(@md.publisher) if @md.publisher                    #dc +      contributor=spec_char_string(@md.contributor) if @md.contributor              #dc +      date=spec_char_string(@md.date) if @md.date                                   #dc +      date_created=spec_char_string(@md.date_created) if @md.date_created           #dc +      date_issued=spec_char_string(@md.date_issued) if @md.date_issued              #dc +      date_available=spec_char_string(@md.date_available) if @md.date_available     #dc +      date_valid=spec_char_string(@md.date_valid) if @md.date_valid                 #dc +      date_modified=spec_char_string(@md.date_modified) if @md.date_modified        #dc +      type=spec_char_string(@md.type) if @md.type                                   #dc +      format=spec_char_string(@md.format) if @md.format                             #dc +      identifier=spec_char_string(@md.identifier) if @md.identifier                 #dc +      source=spec_char_string(@md.source) if @md.source                             #dc +      language=spec_char_string(@md.language[:name]) if @md.language[:name]         #dc        #language_original=spec_char_string(@md.language_original[:name]) if @md.language_original[:name] -      dc_relation=spec_char_string(@md.dc_relation) if @md.dc_relation -      dc_coverage=spec_char_string(@md.dc_coverage) if @md.dc_coverage -      dc_rights=spec_char_string(@md.dc_rights) if @md.dc_rights -      dc_title="Title: #{dc_title}\n\n" if dc_title -      dc_creator="Creator: #{dc_creator}\n\n" if dc_creator -      dc_subject="Subject: #{dc_subject}\n\n" if dc_subject -      dc_description="Description: #{dc_description}\n\n" if dc_description -      dc_publisher="Publisher: #{dc_publisher}\n\n" if dc_publisher -      dc_contributor="Contributor: #{dc_contributor}\n\n" if dc_contributor -      dc_date="Date: #{dc_date}\n\n" if dc_date -      dc_date_created="Date Created: #{dc_date_created}\n\n" if dc_date_created -      dc_date_issued="Date Issued: #{dc_date_issued}\n\n" if dc_date_issued -      dc_date_available="Date Available: #{dc_date_available}\n\n" if dc_date_available -      dc_date_valid="Date Valid: #{dc_date_valid}\n\n" if dc_date_valid -      dc_date_modified="Date Modified: #{dc_date_modified}\n\n" if dc_date_modified -      dc_format="Format: #{dc_format}\n\n" if dc_format -      dc_identifier="Identifier: #{dc_identifier}\n\n" if dc_identifier #watch -      dc_source="Source: #{dc_source}\n\n" if dc_source -      dc_language="Language: #{dc_language}\n\n" if dc_language -      dc_relation="Relation: #{dc_relation}\n\n" if dc_relation -      dc_coverage="Coverage: #{dc_coverage}\n\n" if dc_coverage -      dc_rights="Rights: #{dc_rights}\n\n" if dc_rights +      relation=spec_char_string(@md.relation) if @md.relation                       #dc +      coverage=spec_char_string(@md.coverage) if @md.coverage                       #dc +      rights=spec_char_string(@md.rights) if @md.rights                             #dc +      full_title="Title: #{full_title}\n\n" if full_title                           #dc +      author="Author: #{author}\n\n" if author                                      #dc +      subject="Subject: #{subject}\n\n" if subject                                  #dc +      description="Description: #{description}\n\n" if description                  #dc +      publisher="Publisher: #{publisher}\n\n" if publisher                          #dc +      contributor="Contributor: #{contributor}\n\n" if contributor                  #dc +      date="Date: #{date}\n\n" if date                                              #dc +      date_created="Date Created: #{date_created}\n\n" if date_created              #dc +      date_issued="Date Issued: #{date_issued}\n\n" if date_issued                  #dc +      date_available="Date Available: #{date_available}\n\n" if date_available      #dc +      date_valid="Date Valid: #{date_valid}\n\n" if date_valid                      #dc +      date_modified="Date Modified: #{date_modified}\n\n" if date_modified          #dc +      format="Format: #{format}\n\n" if format                                      #dc +      identifier="Identifier: #{identifier}\n\n" if identifier #watch               #dc +      source="Source: #{source}\n\n" if source                                      #dc +      language="Language: #{language}\n\n" if language                              #dc +      relation="Relation: #{relation}\n\n" if relation                              #dc +      coverage="Coverage: #{coverage}\n\n" if coverage                              #dc +      rights="Rights: #{rights}\n\n" if rights                                      #dc        "@node Dublin Core\n" +          "@unnumbered Dublin Core\n" +          "@cindex chapter, Dublin Core\n\n" + -        "#{dc_title}" + -        "#{dc_creator}" + -        "#{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}" + -        "#{dc_format}" + -        "#{dc_identifier}" + -        "#{dc_source}" + -        "#{dc_language}" + -        "#{dc_relation}" + -        "#{dc_coverage}" + -        "#{dc_rights}" + +        "#{full_title}" + +        "#{author}" + +        "#{subject}" + +        "#{description}" + +        "#{publisher}" + +        "#{contributor}" + +        "#{date}" + +        "#{date_created}" + +        "#{date_issued}" + +        "#{date_available}" + +        "#{date_valid}" + +        "#{date_modified}" + +        "#{format}" + +        "#{identifier}" + +        "#{source}" + +        "#{language}" + +        "#{relation}" + +        "#{coverage}" + +        "#{rights}" +          "\n\n"      end      def tail @@ -518,4 +518,4 @@ WOK    end  end  __END__ - +watch title, might need full_title diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index ea1e10e6..abafb30f 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -303,10 +303,10 @@ module SiSU_TeX            @@rights=nil            tell=SiSU_Screen::Ansi.new(@md.cmd,"pdfTex portrait & landscape")            tell.txt_grey unless @md.cmd =~/q/ -          if @md.dc_rights -            use=@md.dc_rights.dup #dup is necessary, else contents of :rights changed +          if @md.rights +            use=@md.rights.dup #dup is necessary, else contents of :rights changed              sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,use) -            copymark=if @md.creator_copymark; '{\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} ' +            copymark=if @md.author_copymark; '{\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} '              else ''              end              copymark='Copyright {\\begin{small}\\raisebox{1ex}{\\copyright}\\end{small}} ' @@ -544,13 +544,14 @@ module SiSU_TeX  \\widowpenalty=300  \\makeatother  \\makeatother +\\chardef\\txtbullet="2022  % \\sloppy  \\begin{document}  WOK          sisu_rc_footnote=if @md.sc_info; @tex.doc_sc_info_footnote_full          else                             @tex.doc_sc_info_footnote_brief          end -        #@copymark=if @md.creator_copymark; '^\copyright' +        #@copymark=if @md.author_copymark; '^\copyright'          #else                               ''          #end          @copymark='' #check and remove as now is superflous @@ -560,15 +561,15 @@ WOK          x[:p]=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).title_portrait          @tex_file << x          x=nil -        if @md.dc_creator -          sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,@md.dc_creator) -          creator=sp_char.special_characters -          @tex_file << if @md.creator_home +        if @md.author +          sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,@md.author) +          author=sp_char.special_characters +          @tex_file << if @md.author_home              <<WOK -\\author{\\href{#{@md.creator_home}}{#@copymark \\textnormal{#{creator}}}} +\\author{\\href{#{@md.author_home}}{#@copymark \\textnormal{#{author}}}}  WOK -          else "\n\\author{#@copymark \\textnormal{#{creator}}}" +          else "\n\\author{#@copymark \\textnormal{#{author}}}"            end          end          @tex_file << unless @md.fnb =~/^mail\s*$/; "\n\\date{\\begin{footnotesize} copy @ #{@tex.site} \\end{footnotesize} #{sisu_rc_footnote}}" @@ -580,7 +581,7 @@ WOK  WOK          #@tex_file << @tex.newpage #newpage clearpage depending on portrait or landscape          @tex_file << "\\newpage\n" -        @tex_file << @@rights if @md.dc_rights #if @orientation =~/landscape/ +        @tex_file << @@rights if @md.rights #if @orientation =~/landscape/          @tex_file << @@prefix_b if @md.prefix_b          @tex_file << @tex.sisu_rights          @tex_file << if @md.sc_info; @tex.doc_sc_info diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 2c791b18..2efec5c4 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -603,8 +603,8 @@ para        @ps=@txt if @txt=~/(?:a4|letter|legal|book|a5|b5)/i      end      def language -      @lang=if @md.dc_language[:code] -        case @md.dc_language[:code] +      @lang=if @md.language[:code] +        case @md.language[:code]          when 'en'; 'english'          when 'us'; 'USenglish' # depreciated, see iso-639-2          when 'fr'; 'french' @@ -639,7 +639,7 @@ para      end      def tex_head_lang #babel 18n        language -      #@md.dc_language[:name] +      #@md.language[:name]        lang=if @lang =~/^(?:en)$/; @lang        else "#@lang,english"        end @@ -1083,7 +1083,8 @@ WOK          string.gsub!(/^(#{Mx[:lv_o]}[1-6-]:\S*?#{Mx[:lv_c]}|<.+?>)?\s*'/,'\1`')  # open '        end        string.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})?\s*#{Mx[:gl_bullet]}\s*/, -        '\1 \begin{math} \bullet \end{math}~~') #bullets - added 2004w17 watch \\_ +        '\1 $\txtbullet$~~') #bullets - defined 2008w49 temporary absence of bullet in debian texlive \\_ +        #'\1 \begin{math} \bullet \end{math}~~') #bullets - added 2004w17 watch \\_        string.gsub!(/(<font.*?>|<\/font>)/,'')        string.gsub!(/\s*#{Mx[:fa_superscript_o]}(\S+?)#{Mx[:fa_superscript_c]}/,'^\1')        #string.gsub!(/\s*(?:#{Mx[:br_line]}|#{Mx[:br_paragraph]}|\n)\*/,' \\\\ ') @@ -1256,8 +1257,10 @@ WOK          string.gsub!(/\s+'/,' `')                                # open '          string.gsub!(/^(#{Mx[:lv_o]}[1-6-]:\S*?#{Mx[:lv_c]}|<.+?>)?\s*'/,'\1`')  # open '        end -      string.gsub!(/^\s*#{Mx[:gl_bullet]}\s*/,'\begin{math} \bullet \end{math}~~') -      string.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})?\s*#{Mx[:gl_bullet]}\s*/,'\1 \begin{math} \bullet \end{math}~~') +      string.gsub!(/^\s*#{Mx[:gl_bullet]}\s*/,'$\txtbullet$~~') +      string.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})?\s*#{Mx[:gl_bullet]}\s*/,'\1 $\txtbullet$~~') +      #string.gsub!(/^\s*#{Mx[:gl_bullet]}\s*/,'\begin{math} \bullet \end{math}~~') +      #string.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})?\s*#{Mx[:gl_bullet]}\s*/,'\1 \begin{math} \bullet \end{math}~~')        #string.gsub!(/^\s*#{Mx[:gl_bullet]}\s*/,'● ~~')        #string.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})?\s*#{Mx[:gl_bullet]}\s*/,'\1 ● ~~')        ##string.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})?\s*\\_\*\s*/,'\1 ● ~~') diff --git a/lib/sisu/v0/xml_fictionbook.rb b/lib/sisu/v0/xml_fictionbook.rb index 60cbed66..3cdd098a 100644 --- a/lib/sisu/v0/xml_fictionbook.rb +++ b/lib/sisu/v0/xml_fictionbook.rb @@ -109,10 +109,10 @@ module SiSU_XML_Fictionbook        def head          version=SiSU_Env::Info_version.new.get_version          rb_ver=SiSU_Env::Info_version.new.rbversion -        date_available=if defined? @md.dc_date_available; "\n     <p>#{@md.dc_date_available} Initial version</p>" +        date_available=if defined? @md.date_available; "\n     <p>#{@md.date_available} Initial version</p>"          else ''          end -        date_modified=if defined? @md.dc_date_available; "\n      <p>#{@md.dc_date_modified} Last Modified</p>" +        date_modified=if defined? @md.date_available; "\n      <p>#{@md.date_modified} Last Modified</p>"          else ''          end          head=<<WOK @@ -127,10 +127,10 @@ module SiSU_XML_Fictionbook        <middle-name>***</middle-name>        <last-name>***</last-name>      </author> -    <book-title>#{@md.dc_title}</book-title> +    <book-title>#{@md.full_title}</book-title>      <annotation>      </annotation> -    <date value="#{@md.dc_date}">yyyy</date> +    <date value="#{@md.date}">yyyy</date>    </title-info>       <document-info>      <author> diff --git a/lib/sisu/v0/xml_format.rb b/lib/sisu/v0/xml_format.rb index b90200ea..3fe703d7 100644 --- a/lib/sisu/v0/xml_format.rb +++ b/lib/sisu/v0/xml_format.rb @@ -84,101 +84,101 @@ module SiSU_XML_format    end    class Head_information      def initialize #dc rdf -      @dc_title=@dc_subtitle=@dc_creator=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@dc_relation=@dc_coverage=@dc_rights=@copyright=@owner=@keywords='' +      @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords=''        @sfx,@pdf,@md=@@md.sfx,@@md.pdf,@@md        # DublinCore 1 - title        @rdfurl=%{  rdf:about="http://www.jus.uio.no/lm/toc"\n} -      if @md.dc_title -        @dc_title=%{<meta name="dc.title" content="#{seg_name}#{@md.dc_title}" />\n} +      if @md.full_title +        @full_title=%{<meta name="dc.title" content="#{seg_name}#{@md.full_title}" />\n}          #if @md.subtitle          #  #@rdf_title=%{    dc.title="#{seg_name}#{@md.title} - #{@md.subtitle}"\n} -        #  @dc_title=%{<meta name="dc.title" content="#{seg_name}#{@md.title} - #{@md.subtitle}" />\n} +        #  @full_title=%{<meta name="dc.title" content="#{seg_name}#{@md.title} - #{@md.subtitle}" />\n}          #else          #  #@rdf_title=%{    dc.title="#{seg_name}#{@md.title}"\n} -        #  @dc_title=%{<meta name="dc.title" content="#{seg_name}#{@md.dc_title}" />\n} +        #  @full_title=%{<meta name="dc.title" content="#{seg_name}#{@md.title}" />\n}          #end        end -      if @md.dc_creator                                                          # DublinCore 2 - creator/author (author) -        @rdf_creator=%{    dc.creator="#{@md.dc_creator}"\n} -        @dc_creator=%{<meta name="dc.creator" content="#{@md.dc_creator}" />\n} +      if @md.author                                                          # DublinCore 2 - author/creator (author) +        @rdf_author=%{    dc.author="#{@md.author}"\n} +        @author=%{<meta name="dc.author" content="#{@md.author}" />\n}        end -      if @md.dc_subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) -        @rdf_subject=%{    dc.subject="#{@md.dc_subject}"\n} -        @dc_subject=%{<meta name="dc.subject" content="#{@md.dc_subject}" />\n} +      if @md.subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) +        @rdf_subject=%{    dc.subject="#{@md.subject}"\n} +        @subject=%{<meta name="dc.subject" content="#{@md.subject}" />\n}        end -      if @md.dc_description                                                      # DublinCore 4 - description +      if @md.description                                                      # DublinCore 4 - description          @rdf_description=%{    dc.description="#{@md.description}"\n} -        @dc_description=%{<meta name="dc.dc_description" content="#{@md.description}" />\n} +        @description=%{<meta name="dc.description" content="#{@md.description}" />\n}        end -      if @md.dc_publisher                                                        # DublinCore 5 - publisher (current copy published by) -        @rdf_publisher=%{    dc.publisher="#{@md.dc_publisher}"\n} -        @dc_publisher=%{<meta name="dc.publisher" content="#{@md.dc_publisher}" />\n} +      if @md.publisher                                                        # DublinCore 5 - publisher (current copy published by) +        @rdf_publisher=%{    dc.publisher="#{@md.publisher}"\n} +        @publisher=%{<meta name="dc.publisher" content="#{@md.publisher}" />\n}        end -      if @md.dc_contributor                                                      # DublinCore 6 - contributor -        @rdf_contributor=%{    dc.contributor="#{@md.dc_contributor}"\n} -        @dc_contributor=%{<meta name="dc.contributor" content="#{@md.dc_contributor}" />\n} +      if @md.contributor                                                      # DublinCore 6 - contributor +        @rdf_contributor=%{    dc.contributor="#{@md.contributor}"\n} +        @contributor=%{<meta name="dc.contributor" content="#{@md.contributor}" />\n}        end -      if @md.dc_date                                                             # DublinCore 7 - date year-mm-dd -        @rdf_date=%{    dc.date="#{@md.dc_date}"\n} -        @dc_date=%{<meta name="dc.date" content="#{@md.dc_date}" #{@md.date_scheme} />\n} +      if @md.date                                                             # DublinCore 7 - date year-mm-dd +        @rdf_date=%{    dc.date="#{@md.date}"\n} +        @date=%{<meta name="dc.date" content="#{@md.date}" #{@md.date_scheme} />\n}        end -      if @md.dc_date_created                                                     # DublinCore 7 - date.created year-mm-dd -        @rdf_date_created=%{    dc.date.created="#{@md.dc_date_created}"\n} -        @dc_date_created=%{<meta name="dc.date.created" content="#{@md.dc_date_created}" #{@md.date_created_scheme} />\n} +      if @md.date_created                                                     # DublinCore 7 - date.created year-mm-dd +        @rdf_date_created=%{    dc.date.created="#{@md.date_created}"\n} +        @date_created=%{<meta name="dc.date.created" content="#{@md.date_created}" #{@md.date_created_scheme} />\n}        end -      if @md.dc_date_issued                                                      # DublinCore 7 - date.issued year-mm-dd -        @rdf_date_issued=%{    dc.date.issued="#{@md.dc_date_issued}"\n} -        @dc_date_issued=%{<meta name="dc.date.issued" content="#{@md.dc_date_issued}" #{@md.date_issued_scheme} />\n} +      if @md.date_issued                                                      # DublinCore 7 - date.issued year-mm-dd +        @rdf_date_issued=%{    dc.date.issued="#{@md.date_issued}"\n} +        @date_issued=%{<meta name="dc.date.issued" content="#{@md.date_issued}" #{@md.date_issued_scheme} />\n}        end -      if @md.dc_date_available                                                   # DublinCore 7 - date.available year-mm-dd -        @rdf_date_available=%{    dc.date.available="#{@md.dc_date_available}"\n} -        @dc_date_available=%{<meta name="dc.date.available" content="#{@md.dc_date_available}" #{@md.date_available_scheme} />\n} +      if @md.date_available                                                   # DublinCore 7 - date.available year-mm-dd +        @rdf_date_available=%{    dc.date.available="#{@md.date_available}"\n} +        @date_available=%{<meta name="dc.date.available" content="#{@md.date_available}" #{@md.date_available_scheme} />\n}        end -      if @md.dc_date_valid                                                       # DublinCore 7 - date.valid year-mm-dd -        @rdf_date_valid=%{    dc.date.valid="#{@md.dc_date_valid}"\n} -        @dc_date_valid=%{<meta name="dc.date.valid" content="#{@md.dc_date_valid}" #{@md.date_valid_scheme} />\n} +      if @md.date_valid                                                       # DublinCore 7 - date.valid year-mm-dd +        @rdf_date_valid=%{    dc.date.valid="#{@md.date_valid}"\n} +        @date_valid=%{<meta name="dc.date.valid" content="#{@md.date_valid}" #{@md.date_valid_scheme} />\n}        end -      if @md.dc_date_modified                                                    # DublinCore 7 - date.modified year-mm-dd -        @rdf_date_modified=%{    dc.date.modified="#{@md.dc_date_modified}"\n} -        @dc_date_modified=%{<meta name="dc.date.modified" content="#{@md.dc_date_modified}" #{@md.date_modified_scheme} />\n} +      if @md.date_modified                                                    # DublinCore 7 - date.modified year-mm-dd +        @rdf_date_modified=%{    dc.date.modified="#{@md.date_modified}"\n} +        @date_modified=%{<meta name="dc.date.modified" content="#{@md.date_modified}" #{@md.date_modified_scheme} />\n}        end -      if @md.dc_type                                                             # DublinCore 8 - type (genre eg. report, convention etc) -        @rdf_type=%{    dc.type="#{@md.dc_type}"\n} -        @dc_type=%{<meta name="dc.type" content="#{@md.dc_type}" />\n} +      if @md.type                                                             # DublinCore 8 - type (genre eg. report, convention etc) +        @rdf_type=%{    dc.type="#{@md.type}"\n} +        @type=%{<meta name="dc.type" content="#{@md.type}" />\n}        end -      if @md.dc_format                                                           # DublinCore 9 - format (use your mime type) -        @rdf_format=%{    dc.format="#{@md.dc_format}"\n} -        @dc_format=%{<meta name="dc.format" content="#{@md.dc_format}" />\n} +      if @md.format                                                           # DublinCore 9 - format (use your mime type) +        @rdf_format=%{    dc.format="#{@md.format}"\n} +        @format=%{<meta name="dc.format" content="#{@md.format}" />\n}        end -      if @md.dc_identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) -        @rdf_identifier=%{    dc.identifier="#{@md.dc_identifier}"\n} -        @dc_identifier=%{<meta name="dc.identifier" content="#{@md.dc_identifier}" />\n} +      if @md.identifier                                                       # DublinCore 10 - identifier (your identifier, could use urn which is free) +        @rdf_identifier=%{    dc.identifier="#{@md.identifier}"\n} +        @identifier=%{<meta name="dc.identifier" content="#{@md.identifier}" />\n}        end -      if @md.dc_source                                                           # DublinCore 11 - source (document source) -        @rdf_source=%{    dc.source="#{@md.dc_source}"\n} -        @dc_source=%{<meta name="dc.source" content="#{@md.dc_source}" />\n} +      if @md.source                                                           # DublinCore 11 - source (document source) +        @rdf_source=%{    dc.source="#{@md.source}"\n} +        @source=%{<meta name="dc.source" content="#{@md.source}" />\n}        end -      if @md.dc_language[:name]                                                  # DublinCore 12 - language (English) -        @rdf_language=%{    dc.language="#{@md.dc_language[:name]}"\n} -        @dc_language=%{<meta name="dc.language" content="#{@md.dc_language[:name]}" />\n} +      if @md.language[:name]                                                  # DublinCore 12 - language (English) +        @rdf_language=%{    dc.language="#{@md.language[:name]}"\n} +        @language=%{<meta name="dc.language" content="#{@md.language[:name]}" />\n}        end        if @md.language_original[:name]                                                  # DublinCore 12 - language (English)          @rdf_language_original=%{    dc.language="#{@md.language_original[:name]}"\n}          @language_original=%{<meta name="dc.language" content="#{@md.language_original[:name]}" />\n}        end -      if @md.dc_relation                                                         # DublinCore 13 - relation -        @rdf_relation=%{    dc.relation="#{@md.dc_relation}"\n} -        @dc_relation=%{<meta name="dc.relation" content="#{@md.dc_relation}" />\n} +      if @md.relation                                                         # DublinCore 13 - relation +        @rdf_relation=%{    dc.relation="#{@md.relation}"\n} +        @relation=%{<meta name="dc.relation" content="#{@md.relation}" />\n}        end -      if @md.dc_coverage                                                         # DublinCore 14 - coverage -        @rdf_coverage=%{    dc.coverage="#{@md.dc_coverage}"\n} -        @dc_coverage=%{<meta name="dc.coverage" content="#{@md.dc_coverage}" />\n} +      if @md.coverage                                                         # DublinCore 14 - coverage +        @rdf_coverage=%{    dc.coverage="#{@md.coverage}"\n} +        @coverage=%{<meta name="dc.coverage" content="#{@md.coverage}" />\n}        end -      if @md.dc_rights                                                           # DublinCore 15 - rights -        @rdf_rights=%{    dc.rights="#{@md.dc_rights}"\n} -        @dc_rights=%{<meta name="dc.rights" content="#{@md.dc_rights}" />\n} +      if @md.rights                                                           # DublinCore 15 - rights +        @rdf_rights=%{    dc.rights="#{@md.rights}"\n} +        @rights=%{<meta name="dc.rights" content="#{@md.rights}" />\n}        end -      @copyright=%{<meta name="copyright" content="#{@md.dc_rights}" />\n} if @md.rights # possibly redundant see dc.rights +      @copyright=%{<meta name="copyright" content="#{@md.rights}" />\n} if @md.rights # possibly redundant see dc.rights        @owner=%{<meta name="owner" content="#{@md.owner}" />\n} if @md.owner        @keywords=%{<meta name="keywords" content="#{@md.keywords}" />\n} if @md.keywords        @vz=SiSU_Env::Get_init.instance.skin #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php @@ -206,7 +206,7 @@ module SiSU_XML_format        #<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"        #         xmlns:dc="http://purl.org/dc/elements/1.1/">        #  <rdf:Description rdf:about="http://www.jus.uio.no/lm/doc" -      #      dc:creator="Author" +      #      dc:author="Author"        #      dc:title="Title"        #      dc:description="Description if any"        #      dc:date="Publication Date" @@ -223,7 +223,7 @@ module SiSU_XML_format  #@rdfurl  #@rdf_title  #@rdf_subtitle -#@rdf_creator +#@rdf_author  #@rdf_subject  #@rdf_description  #@rdf_publisher @@ -244,26 +244,26 @@ module SiSU_XML_format  #@rdf_rights    />  </rdf:RDF> -#@dc_title -#@dc_creator -#@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 -#@dc_type -#@dc_format -#@dc_identifier -#@dc_source -#@dc_language -#@dc_relation -#@dc_coverage -#@dc_rights +#@full_title +#@author +#@subject +#@description +#@publisher +#@contributor +#@date +#@date_created +#@date_issued +#@date_available +#@date_valid +#@date_modified +#@type +#@format +#@identifier +#@source +#@language +#@relation +#@coverage +#@rights  #@copyright  #@owner  #{@png.ico} diff --git a/lib/sisu/v0/xml_md_oai_pmh_dc.rb b/lib/sisu/v0/xml_md_oai_pmh_dc.rb index 7c89ee07..527c6c78 100644 --- a/lib/sisu/v0/xml_md_oai_pmh_dc.rb +++ b/lib/sisu/v0/xml_md_oai_pmh_dc.rb @@ -82,80 +82,80 @@ module SiSU_XML_metadata  WOK      end      def body -      if @md.dc_title                                                            # DublinCore 1 - title -        @oai_pmh << %{  <dc:title xml:lang="en">#{@md.dc_title}</dc:title>\n} -        #@oai_pmh << %{  <dc:title xml:lang="en">#{seg_name}#{@md.dc_title}</dc:title>\n} +      if @md.full_title                                                            # DublinCore 1 - title +        @oai_pmh << %{  <dc:title xml:lang="en">#{@md.full_title}</dc:title>\n} +        #@oai_pmh << %{  <dc:title xml:lang="en">#{seg_name}#{@md.title}</dc:title>\n}        end -      if @md.dc_creator                                                          # DublinCore 2 - creator/author (author) -        txt=meta_content_clean(@md.dc_creator) -        @oai_pmh << %{  <dc:creator>#{txt}</dc:creator>\n} +      if @md.author                                                          # DublinCore 2 - author/creator (author) +        txt=meta_content_clean(@md.author) +        @oai_pmh << %{  <dc:author>#{txt}</dc:author>\n}        end -      if @md.dc_subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) -        txt=meta_content_clean(@md.dc_subject) +      if @md.subject                                                          # DublinCore 3 - subject (us library of congress, eric or udc, or schema???) +        txt=meta_content_clean(@md.subject)          @oai_pmh << %{  <dc:subject>#{txt}</dc:subject>\n}        end -      if @md.dc_description                                                      # DublinCore 4 - description -        txt=meta_content_clean(@md.dc_description) +      if @md.description                                                      # DublinCore 4 - description +        txt=meta_content_clean(@md.description)          @oai_pmh << %{  <dc:description>#{txt}</dc:description>\n}        end -      if @md.dc_publisher                                                        # DublinCore 5 - publisher (current copy published by) -        txt=meta_content_clean(@md.dc_publisher) +      if @md.publisher                                                        # DublinCore 5 - publisher (current copy published by) +        txt=meta_content_clean(@md.publisher)          @oai_pmh << %{  <dc:publisher>#{txt}</dc:publisher>\n}        end -      if @md.dc_contributor                                                      # DublinCore 6 - contributor -        txt=meta_content_clean(@md.dc_contributor) +      if @md.contributor                                                      # DublinCore 6 - contributor +        txt=meta_content_clean(@md.contributor)          @oai_pmh << %{  <dc:contributor>#{txt}</dc:contributor>\n}        end -      if @md.dc_date                                                             # DublinCore 7 - date year-mm-dd -        @oai_pmh << %{  <dc:date>#{@md.dc_date}</dc:date>\n} +      if @md.date                                                             # DublinCore 7 - date year-mm-dd +        @oai_pmh << %{  <dc:date>#{@md.date}</dc:date>\n}        end -      if @md.dc_date_created                                                     # DublinCore 7 - date.created -        @oai_pmh << %{  <dc:date_created>#{@md.dc_date_created}</dc:date_created>\n} +      if @md.date_created                                                     # DublinCore 7 - date.created +        @oai_pmh << %{  <dc:date_created>#{@md.date_created}</dc:date_created>\n}        end -      if @md.dc_date_issued                                                      # DublinCore 7 - date.issued -        @oai_pmh << %{  <dc:date_issued>#{@md.dc_date_issued}</dc:date_issued>\n} +      if @md.date_issued                                                      # DublinCore 7 - date.issued +        @oai_pmh << %{  <dc:date_issued>#{@md.date_issued}</dc:date_issued>\n}        end -      if @md.dc_date_available                                                   # DublinCore 7 - date.available -        @oai_pmh << %{  <dc:date_available>#{@md.dc_date_available}</dc:date_available>\n} +      if @md.date_available                                                   # DublinCore 7 - date.available +        @oai_pmh << %{  <dc:date_available>#{@md.date_available}</dc:date_available>\n}        end -      if @md.dc_date_valid                                                       # DublinCore 7 - date.valid -        @oai_pmh << %{  <dc:date_valid>#{@md.dc_date_valid}</dc:date_valid>\n} +      if @md.date_valid                                                       # DublinCore 7 - date.valid +        @oai_pmh << %{  <dc:date_valid>#{@md.date_valid}</dc:date_valid>\n}        end -      if @md.dc_date_modified                                                    # DublinCore 7 - date.modified -        @oai_pmh <<  %{  <dc:date_modified>#{@md.dc_date_modified}</dc:date_modified>\n} +      if @md.date_modified                                                    # DublinCore 7 - date.modified +        @oai_pmh <<  %{  <dc:date_modified>#{@md.date_modified}</dc:date_modified>\n}        end -      if @md.dc_type                                                             # DublinCore 8 - type -        txt=meta_content_clean(@md.dc_type) +      if @md.type                                                             # DublinCore 8 - type +        txt=meta_content_clean(@md.type)          @oai_pmh << %{  <dc:type>#{txt}</dc:type>\n}        end -      if @md.dc_format                                                           # DublinCore 9 - format -        txt=meta_content_clean(@md.dc_format) +      if @md.format                                                           # DublinCore 9 - format +        txt=meta_content_clean(@md.format)          @oai_pmh << %{  <dc:format>#{txt}</dc:format>\n}        end -      if @md.dc_identifier                                                       # DublinCore 10 - identifier -        txt=meta_content_clean(@md.dc_identifier) +      if @md.identifier                                                       # DublinCore 10 - identifier +        txt=meta_content_clean(@md.identifier)          @oai_pmh << %{  <dc:identifier>#{txt}</dc:identifier>\n}        end -      if @md.dc_source                                                           # DublinCore 11 - source -        txt=meta_content_clean(@md.dc_source) +      if @md.source                                                           # DublinCore 11 - source +        txt=meta_content_clean(@md.source)          @oai_pmh << %{  <dc:source>#{txt}</dc:source>\n}        end -      if @md.dc_language[:name]                                                  # DublinCore 12 - language (English) -        @oai_pmh << %{  <dc:language>#{@md.dc_language[:name]}</dc:language>\n} +      if @md.language[:name]                                                  # DublinCore 12 - language (English) +        @oai_pmh << %{  <dc:language>#{@md.language[:name]}</dc:language>\n}        end        if @md.language_original[:name]          @oai_pmh << %{  <dc:language>#{@md.language_original[:name]}</dc:language>\n}        end -      if @md.dc_relation                                                         # DublinCore 13 - relation -        txt=meta_content_clean(@md.dc_relation) +      if @md.relation                                                         # DublinCore 13 - relation +        txt=meta_content_clean(@md.relation)          @oai_pmh << %{  <dc:relation>#{txt}</dc:relation>\n}        end -      if @md.dc_coverage                                                         # DublinCore 14 - coverage -        txt=meta_content_clean(@md.dc_coverage) +      if @md.coverage                                                         # DublinCore 14 - coverage +        txt=meta_content_clean(@md.coverage)          @oai_pmh << %{  <dc:coverage>#{txt}</dc:coverage>\n}        end -      if @md.dc_rights                                                           # DublinCore 15 - rights -        txt=meta_content_clean(@md.dc_rights) +      if @md.rights                                                           # DublinCore 15 - rights +        txt=meta_content_clean(@md.rights)          @oai_pmh << %{  <dc:rights>#{txt}</dc:rights>\n}        end        if @md.keywords @@ -200,7 +200,7 @@ see also http://dublincore.org/documents/dcmes-xml/      xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/      http://www.openarchives.org/OAI/2.0/oai_dc.xsd">    <dc:title xml:lang="en">Grassmann's space analysis</dc:title> -  <dc:creator>Hyde, E. W. (Edward Wyllys)</dc:creator> +  <dc:author>Hyde, E. W. (Edward Wyllys)</dc:author>    <dc:subject>LCSH:Ausdehnungslehre; LCCN QA205.H99</dc:subject>    <dc:publisher>J. Wiley & Sons</dc:publisher>    <dc:date>Created: 1906; Available: 1991</dc:date> diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index e8d68e2d..fc8f3a77 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2008-07-21" "0.68.0" "SiSU" +.TH "sisu" "1" "2008-12-14" "0.70.1" "SiSU"  .SH NAME  sisu \- documents: markup, structuring, publishing in multiple standard formats, and search  .SH SYNOPSIS @@ -858,9 +858,8 @@ sisu\-markup\-samples is installed also under:  .BR  .BR -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.  .BR  Note: the first line of a document may include information on the markup @@ -882,30 +881,64 @@ This current document has a header similar to this one (without the comments):  .nf    % SiSU 0.57 +.BR    @title: SiSU +.BR    @subtitle: Markup -  @creator: Ralph Amissah +.BR +  @creator: Amissah, Ralph +.BR +  % note formatting rules on author / creator field, \"Surname, Other names\", if more than one author separate by semi\-colon (if name is of an institution just write name or the name contains a comma enclose in quotation marks) +.BR    @rights: Copyright (C) Ralph Amissah 2007, part of SiSU documentation, License GPL 3 +.BR    @type: information +.BR    @subject: ebook, epublishing, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, search +.BR +  @topic_register: text markup language; application:text processing;output:html|xml|latex|pdf|sql +.BR +  % note formatting for topic_register topic levels are separated by a colon, a semi\-colon separates main topics +.BR +  @date: 2007\-09\-16 +.BR +  % original publication date unless the substantive text is updated/modified, then date of update +.BR    @date.created: 2002\-08\-28 +.BR    @date.issued: 2002\-08\-28 +.BR    @date.available: 2002\-08\-28 +.BR    @date.modified: 2007\-09\-16 -  @date: 2007\-09\-16 +.BR    @level: new=C; break=1; num_top=1 +.BR    % comment: in this @level header num_top=1 starts automatic heading numbering at heading level 1 (numbering continues 3 levels down); the new and break instructions are used by the LaTeX/pdf and odf output to determine where to put page breaks (that are not used by html output or say sql database population). +.BR    @skin: skin_sisu_manual +.BR    % skins modify the appearance of a document and are placed in a sub\-directory under \./_sisu/skin ~/.sisu/skin or /etc/sisu/skin. A skin may affect single documents that request them, all documents in a directory, or be site\-wide. (A document is affected by a single skin) +.BR    @bold: /Gnu|Debian|Ruby|SiSU/ +.BR    @links: { SiSU Manual }http://www.jus.uio.no/sisu/sisu_manual/ +.BR    { Book Samples and Markup Examples }http://www.jus.uio.no/sisu/SiSU/examples.html +.BR    { SiSU @ Wikipedia }http://en.wikipedia.org/wiki/SiSU +.BR    { SiSU @ Freshmeat }http://freshmeat.net/projects/sisu/ +.BR    { SiSU @ Ruby Application Archive }http://raa.ruby\-lang.org/project/sisu/ +.BR    { SiSU @ Debian }http://packages.qa.debian.org/s/sisu.html +.BR    { SiSU Download }http://www.jus.uio.no/sisu/SiSU/download.html +.BR    { SiSU Changelog }http://www.jus.uio.no/sisu/SiSU/changelog.html +.BR +.BR  .fi  .SH @@ -1556,14 +1589,14 @@ about SiSU <http://www.jus.uio.no/sisu/> [^13] markup  .nf -     \ [ tux.png ] +  { tux.png 64x80 }image  .BR    % various url linked images  .BR -     \ [ tux.png ] +  {tux.png 64x80 \"a better way\" }http://www.jus.uio.no/sisu/  .BR  .BR -     \ [ GnuDebianLinuxRubyBetterWay.png ] +  {GnuDebianLinuxRubyBetterWay.png 100x101 \"Way Better \- with Gnu/Linux, Debian and Ruby\" }http://www.jus.uio.no/sisu/  .BR  .BR    {~^ ruby_logo.png \"Ruby\" }http://www.ruby\-lang.org/en/ @@ -1581,7 +1614,7 @@ about SiSU <http://www.jus.uio.no/sisu/> [^13] markup  tux.png 64x80 \"Gnu/Linux \- a better way\" <http://www.jus.uio.no/sisu/>  .BR -[ \ ruby_logo \ (png \ missing) \ ] \ [^14] +[ \ ruby_logo \ (png \ missing) \ ] [^14]  .BR  GnuDebianLinuxRubyBetterWay.png 100x101 \"Way Better \- with Gnu/Linux, Debian @@ -5033,10 +5066,10 @@ pdf: <http://www.jus.uio.no/sisu/sisu/landscape.pdf>  at: <http://www.jus.uio.no/sisu>  .TP  .TP -* Generated by: SiSU 0.68.0 of 2008w29/1 (2008-07-21) +* Generated by: SiSU 0.70.0 of 2008w48/3 (2008-12-03)  .TP -* Ruby version: ruby 1.8.7 (2008-06-20 patchlevel 22) [i486-linux] +* Ruby version: ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]  .TP -* Last Generated on: Mon Jul 21 02:54:35 -0400 2008 +* Last Generated on: Tue Dec 09 12:24:07 -0500 2008  .TP  * SiSU http://www.jus.uio.no/sisu | 
