From 9a05bd6dd052174d5264e9fef9ef2d4fbee1e52b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 19 Mar 2015 17:51:40 -0400 Subject: c&d: misc, largely but not entirely cosmetic --- bin/sisu-misc-utils | 2 +- lib/sisu/current/ao.rb | 5 +-- lib/sisu/current/ao_syntax.rb | 6 ++-- lib/sisu/current/db_columns.rb | 7 ---- lib/sisu/current/po4a.rb | 2 +- lib/sisu/develop/ao.rb | 5 +-- lib/sisu/develop/ao_expand_insertions.rb | 16 ++++----- lib/sisu/develop/ao_syntax.rb | 6 ++-- lib/sisu/develop/db_columns.rb | 7 ---- lib/sisu/develop/txt_output.rb | 56 ++++++++++++++++++++++++++++++++ lib/sisu/develop/txt_read.rb | 2 +- 11 files changed, 78 insertions(+), 36 deletions(-) diff --git a/bin/sisu-misc-utils b/bin/sisu-misc-utils index 621d1442..47d8f32b 100644 --- a/bin/sisu-misc-utils +++ b/bin/sisu-misc-utils @@ -220,7 +220,7 @@ __END__ ** Copyright: (C) 2007 - 2015 Ralph Amissah -** License: +** License: GPL3+ ** Ralph Amissah Ralph Amissah diff --git a/lib/sisu/current/ao.rb b/lib/sisu/current/ao.rb index e24fd4e9..3467c4c6 100644 --- a/lib/sisu/current/ao.rb +++ b/lib/sisu/current/ao.rb @@ -60,7 +60,7 @@ module SiSU_AO include SiSU_Env require_relative 'dp' # dp.rb include SiSU_Param - require_relative 'ao_doc_objects' # ao.rb + require_relative 'ao_doc_objects' # ao_doc_objects.rb require_relative 'ao_syntax' # ao_syntax.rb include SiSU_AO_Syntax require_relative 'ao_doc_str' # ao_doc_str.rb @@ -558,7 +558,8 @@ module SiSU_AO data_obj, book_index_rel, book_index_rel_html_seg, - html_idx,xhtml_idx= + html_idx, + xhtml_idx= SiSU_AO_BookIndex::BookIndex.new(@md,data_obj,@env). # ao_idx.rb indexing_song if @md.book_idx data_obj= diff --git a/lib/sisu/current/ao_syntax.rb b/lib/sisu/current/ao_syntax.rb index cfcc9045..957a2c35 100644 --- a/lib/sisu/current/ao_syntax.rb +++ b/lib/sisu/current/ao_syntax.rb @@ -357,7 +357,7 @@ module SiSU_AO_Syntax # {url address}:url # {image.png}imageurl # {image.png}png - # ~{endnote}~ + # ~{endnote}~ # !_ #bold/emphasise paragraph # _" #blockquote paragraph # _1 <:i1> #indent paragraph 1 step @@ -389,7 +389,7 @@ module SiSU_AO_Syntax dob.obj=dob.obj.strip end dob.obj=dob.obj. - gsub(/^([*#-.]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators + gsub(/^([*#.-]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators gsub(/~\{(.+?)\}~/m,Mx[:en_a_o] + '\1' + Mx[:en_a_c]). gsub(/~\[([^*+].+?)\]~/m,Mx[:en_b_o] + '* \1' + Mx[:en_b_c]). #default if markup does not specify gsub(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c]) @@ -552,7 +552,7 @@ module SiSU_AO_Syntax # {url address}:url # {image.png}imageurl # {image.png}png - # ~{endnote}~ + # ~{endnote}~ # +1 # +2 puts 'tech' diff --git a/lib/sisu/current/db_columns.rb b/lib/sisu/current/db_columns.rb index adeced8f..35491e94 100644 --- a/lib/sisu/current/db_columns.rb +++ b/lib/sisu/current/db_columns.rb @@ -369,7 +369,6 @@ module SiSU_DbColumns if defined? @md.creator.editor_detail \ and @md.creator.editor_detail.is_a?(Array) \ and @md.creator.editor_detail.length > 0 - txt=@md.creator.editor_detail #dc txt='' @md.creator.editor_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -397,7 +396,6 @@ module SiSU_DbColumns if defined? @md.creator.contributor_detail \ and @md.creator.contributor_detail.is_a?(Array) \ and @md.creator.contributor_detail.length > 0 - txt=@md.creator.contributor_detail #dc txt='' @md.creator.contributor_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -425,7 +423,6 @@ module SiSU_DbColumns if defined? @md.creator.illustrator_detail \ and @md.creator.illustrator_detail.is_a?(Array) \ and @md.creator.illustrator_detail.length > 0 - txt=@md.creator.illustrator_detail txt='' @md.creator.illustrator_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -453,7 +450,6 @@ module SiSU_DbColumns if defined? @md.creator.photographer_detail \ and @md.creator.photographer_detail.is_a?(Array) \ and @md.creator.photographer_detail.length > 0 - txt=@md.creator.photographer_detail txt='' @md.creator.photographer_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -508,7 +504,6 @@ module SiSU_DbColumns if defined? @md.creator.prepared_by_detail \ and @md.creator.prepared_by_detail.is_a?(Array) \ and @md.creator.prepared_by_detail.length > 0 - txt=@md.creator.prepared_by_detail txt='' @md.creator.prepared_by_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -536,7 +531,6 @@ module SiSU_DbColumns if defined? @md.creator.digitized_by_detail \ and @md.creator.digitized_by_detail.is_a?(Array) \ and @md.creator.digitized_by_detail.length > 0 - txt=@md.creator.digitized_by_detail txt='' @md.creator.digitized_by_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -564,7 +558,6 @@ module SiSU_DbColumns if defined? @md.creator.audio_detail \ and @md.creator.audio_detail.is_a?(Array) \ and @md.creator.audio_detail.length > 0 - txt=@md.creator.audio_detail txt='' @md.creator.audio_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } diff --git a/lib/sisu/current/po4a.rb b/lib/sisu/current/po4a.rb index f7d89c2d..3de3ff7d 100644 --- a/lib/sisu/current/po4a.rb +++ b/lib/sisu/current/po4a.rb @@ -64,7 +64,7 @@ module SiSU_Po4a include SiSU_Param class Source @@opt_src,@@opt_trn,@@opt_src_,@@opt_trn_,@@md_src,@@md_trn= - nil,nil,nil,nil,nil,nil + nil, nil, nil, nil, nil, nil def initialize(opt,fn=nil) @opt,@fn=opt,fn #unless @opt.fns =~/(.+?\.(?:-|ssm\.)?sst)$/ diff --git a/lib/sisu/develop/ao.rb b/lib/sisu/develop/ao.rb index 1ca49338..ed3aa98b 100644 --- a/lib/sisu/develop/ao.rb +++ b/lib/sisu/develop/ao.rb @@ -60,7 +60,7 @@ module SiSU_AO include SiSU_Env require_relative 'dp' # dp.rb include SiSU_Param - require_relative 'ao_doc_objects' # ao.rb + require_relative 'ao_doc_objects' # ao_doc_objects.rb require_relative 'ao_syntax' # ao_syntax.rb include SiSU_AO_Syntax require_relative 'ao_doc_str' # ao_doc_str.rb @@ -558,7 +558,8 @@ module SiSU_AO data_obj, book_index_rel, book_index_rel_html_seg, - html_idx,xhtml_idx= + html_idx, + xhtml_idx= SiSU_AO_BookIndex::BookIndex.new(@md,data_obj,@env). # ao_idx.rb indexing_song if @md.book_idx data_obj= diff --git a/lib/sisu/develop/ao_expand_insertions.rb b/lib/sisu/develop/ao_expand_insertions.rb index 0d416314..897cb7e2 100644 --- a/lib/sisu/develop/ao_expand_insertions.rb +++ b/lib/sisu/develop/ao_expand_insertions.rb @@ -484,21 +484,19 @@ module SiSU_AO_Insertions linked_title="#{m_pre}{#{m_txt} }#{lnk[:manifest]}#{m_note}\n\n" tuned_file_tmp << linked_title output_filetypes=output_filetypes_in_cmd(m_cmd,lnk) - output_filetypes[:gen].each do |o_f| - describe = o_f - if describe - tuned_file_tmp << if @u.remote #to double space <:br> at beginning of entry - "#{Mx[:nbsp]*4} #{describe} " + output_filetypes[:gen].each do |desc| + if desc + tuned_file_tmp << if @u.remote + "#{Mx[:nbsp]*4} #{desc} " else # remove ... "[provide document placement host location]" end end end - output_filetypes[:src].each do |o_f| - describe = o_f - if describe + output_filetypes[:src].each do |desc| + if desc tuned_file_tmp << if @u.remote - "#{Mx[:nbsp]*4} #{describe} " + "#{Mx[:nbsp]*4} #{desc} " else "[provide document placement host location]" end diff --git a/lib/sisu/develop/ao_syntax.rb b/lib/sisu/develop/ao_syntax.rb index 16f54b61..1ffb7e67 100644 --- a/lib/sisu/develop/ao_syntax.rb +++ b/lib/sisu/develop/ao_syntax.rb @@ -357,7 +357,7 @@ module SiSU_AO_Syntax # {url address}:url # {image.png}imageurl # {image.png}png - # ~{endnote}~ + # ~{endnote}~ # !_ #bold/emphasise paragraph # _" #blockquote paragraph # _1 <:i1> #indent paragraph 1 step @@ -389,7 +389,7 @@ module SiSU_AO_Syntax dob.obj=dob.obj.strip end dob.obj=dob.obj. - gsub(/^([*#-.]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators + gsub(/^([*#.-]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators gsub(/~\{(.+?)\}~/m,Mx[:en_a_o] + '\1' + Mx[:en_a_c]). gsub(/~\[([^*+].+?)\]~/m,Mx[:en_b_o] + '* \1' + Mx[:en_b_c]). #default if markup does not specify gsub(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c]) @@ -552,7 +552,7 @@ module SiSU_AO_Syntax # {url address}:url # {image.png}imageurl # {image.png}png - # ~{endnote}~ + # ~{endnote}~ # +1 # +2 puts 'tech' diff --git a/lib/sisu/develop/db_columns.rb b/lib/sisu/develop/db_columns.rb index e79c0263..478a1127 100644 --- a/lib/sisu/develop/db_columns.rb +++ b/lib/sisu/develop/db_columns.rb @@ -369,7 +369,6 @@ module SiSU_DbColumns if defined? @md.creator.editor_detail \ and @md.creator.editor_detail.is_a?(Array) \ and @md.creator.editor_detail.length > 0 - txt=@md.creator.editor_detail #dc txt='' @md.creator.editor_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -397,7 +396,6 @@ module SiSU_DbColumns if defined? @md.creator.contributor_detail \ and @md.creator.contributor_detail.is_a?(Array) \ and @md.creator.contributor_detail.length > 0 - txt=@md.creator.contributor_detail #dc txt='' @md.creator.contributor_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -425,7 +423,6 @@ module SiSU_DbColumns if defined? @md.creator.illustrator_detail \ and @md.creator.illustrator_detail.is_a?(Array) \ and @md.creator.illustrator_detail.length > 0 - txt=@md.creator.illustrator_detail txt='' @md.creator.illustrator_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -453,7 +450,6 @@ module SiSU_DbColumns if defined? @md.creator.photographer_detail \ and @md.creator.photographer_detail.is_a?(Array) \ and @md.creator.photographer_detail.length > 0 - txt=@md.creator.photographer_detail txt='' @md.creator.photographer_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -508,7 +504,6 @@ module SiSU_DbColumns if defined? @md.creator.prepared_by_detail \ and @md.creator.prepared_by_detail.is_a?(Array) \ and @md.creator.prepared_by_detail.length > 0 - txt=@md.creator.prepared_by_detail txt='' @md.creator.prepared_by_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -536,7 +531,6 @@ module SiSU_DbColumns if defined? @md.creator.digitized_by_detail \ and @md.creator.digitized_by_detail.is_a?(Array) \ and @md.creator.digitized_by_detail.length > 0 - txt=@md.creator.digitized_by_detail txt='' @md.creator.digitized_by_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } @@ -564,7 +558,6 @@ module SiSU_DbColumns if defined? @md.creator.audio_detail \ and @md.creator.audio_detail.is_a?(Array) \ and @md.creator.audio_detail.length > 0 - txt=@md.creator.audio_detail txt='' @md.creator.audio_detail.each do |h| txt=txt + %{#{h[:the]}, #{h[:others]}; } diff --git a/lib/sisu/develop/txt_output.rb b/lib/sisu/develop/txt_output.rb index 98a295ef..a70776ec 100644 --- a/lib/sisu/develop/txt_output.rb +++ b/lib/sisu/develop/txt_output.rb @@ -1,3 +1,59 @@ +# encoding: utf-8 +=begin + +* Name: SiSU + +** Description: documents, structuring, processing, publishing, search +*** plaintext + +** Author: Ralph Amissah + + + +** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah, + All Rights Reserved. + +** License: GPL 3 or later: + + SiSU, a framework for document structuring, publishing and search + + Copyright (C) Ralph Amissah + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + + + +** SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system + +** Hompages: + + + +** Git + + + +=end module Txt_Output class Output include SiSU_Param diff --git a/lib/sisu/develop/txt_read.rb b/lib/sisu/develop/txt_read.rb index 204b94c5..eddeaa9c 100644 --- a/lib/sisu/develop/txt_read.rb +++ b/lib/sisu/develop/txt_read.rb @@ -4,7 +4,7 @@ * Name: SiSU ** Description: documents, structuring, processing, publishing, search -*** plaintext (smarttext) generation, asciidoc +*** plaintext ** Author: Ralph Amissah -- cgit v1.2.3