From 2ea3e59261af7b908e0731551a32808fa7c87a4f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 Feb 2014 18:27:55 -0500 Subject: v5 v6: version & changelog (& rakefile) --- data/doc/sisu/CHANGELOG_v5 | 7 +++++++ data/doc/sisu/CHANGELOG_v6 | 7 +++++++ data/sisu/v5/v/version.yml | 2 +- data/sisu/v6/v/version.yml | 2 +- rbuild | 4 ++-- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 15e4ce0d..bbb939b0 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -31,6 +31,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 5.3.2.orig.tar.xz (2014-02-05:05/3) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.2 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.2-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.2.orig.tar.xz + sisu_5.3.2.orig.tar.xz + sisu_5.3.2-1.dsc + %% 5.3.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.1-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 4454c3e1..f8de2f5d 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -21,6 +21,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 6.0.2.orig.tar.xz (2014-02-05:05/3) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.2 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.2-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.2.orig.tar.xz + sisu_6.0.2.orig.tar.xz + sisu_6.0.2-1.dsc + %% 6.0.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.1-1 diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index f5c89bbf..e3f29dbc 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@ --- :project: SiSU -:version: 5.3.1 +:version: 5.3.2 :date_stamp: 2014w05/3 :date: "2014-02-05" diff --git a/data/sisu/v6/v/version.yml b/data/sisu/v6/v/version.yml index 109b2123..0f55d28e 100644 --- a/data/sisu/v6/v/version.yml +++ b/data/sisu/v6/v/version.yml @@ -1,5 +1,5 @@ --- :project: SiSU -:version: 6.0.1 +:version: 6.0.2 :date_stamp: 2014w05/3 :date: "2014-02-05" diff --git a/rbuild b/rbuild index 060ffafe..959b89b6 100644 --- a/rbuild +++ b/rbuild @@ -37,8 +37,8 @@ #require 'mkmf' #create_makefile("sisu") #% manual settings, edit/update as required (note current default settings are obtained from sisu version yml file) -SiSU_version_next_stable = '5.3.1' -SiSU_version_next_unstable = '6.0.1' +SiSU_version_next_stable = '5.3.2' +SiSU_version_next_unstable = '6.0.2' #% rake file SiSU_version_generic_next_stable = '5.3.x' SiSU_version_generic_next_unstable = '6.0.x' -- cgit v1.2.3 From ba862b944247ccbcc82921a47957ebdbcb3f5df3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 Feb 2014 18:29:55 -0500 Subject: v5 v6: ao, html book index linking, follow --strict option --- data/doc/sisu/CHANGELOG_v5 | 2 ++ data/doc/sisu/CHANGELOG_v6 | 2 ++ lib/sisu/v5/ao_idx.rb | 17 +++++++++-------- lib/sisu/v6/ao_idx.rb | 17 +++++++++-------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index bbb939b0..7d080634 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -38,6 +38,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.2.orig.tar.xz sisu_5.3.2.orig.tar.xz sisu_5.3.2-1.dsc +* ao, html book index linking, follow --strict option + %% 5.3.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.1-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index f8de2f5d..fe534781 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -28,6 +28,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.2.orig.tar.xz sisu_6.0.2.orig.tar.xz sisu_6.0.2-1.dsc +* ao, html book index linking, follow --strict option + %% 6.0.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.1-1 diff --git a/lib/sisu/v5/ao_idx.rb b/lib/sisu/v5/ao_idx.rb index aa5f6609..43d5aeda 100644 --- a/lib/sisu/v5/ao_idx.rb +++ b/lib/sisu/v5/ao_idx.rb @@ -67,6 +67,7 @@ module SiSU_AO_BookIndex @rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/ @rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/ @rgx_idx_ocn=/(.+?)~(\d+)/ + @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier @env ||=SiSU_Env::InfoEnv.new(@md.fns) end def indexing_song @@ -199,15 +200,15 @@ module SiSU_AO_BookIndex if x['node_0_terms'].is_a?(Array) x['node_0_terms'].each do |a| if a[:range] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{a[:range]}, } + idx[:html][@q]=idx[:html][@q] + %{#{a[:range]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{a[:range]}, } print a[:range] + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif a[:ocn] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{a[:ocn]}, } + idx[:html][@q]=idx[:html][@q] + %{#{a[:ocn]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{a[:ocn]}, } print a[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on else p 'error' @@ -227,15 +228,15 @@ module SiSU_AO_BookIndex print "\n\t" + k + ', ' if @md.opt.act[:verbose_plus][:set]==:on y.each do |z| if z[:range] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{z[:range]}, } + idx[:html][@q]=idx[:html][@q] + %{#{z[:range]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{z[:range]}, } print z[:range] + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif z[:ocn] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{z[:ocn]}, } + idx[:html][@q]=idx[:html][@q] + %{#{z[:ocn]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{z[:ocn]}, } print z[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on else p 'error' diff --git a/lib/sisu/v6/ao_idx.rb b/lib/sisu/v6/ao_idx.rb index cd6ab26f..eaaf7a90 100644 --- a/lib/sisu/v6/ao_idx.rb +++ b/lib/sisu/v6/ao_idx.rb @@ -67,6 +67,7 @@ module SiSU_AO_BookIndex @rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/ @rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/ @rgx_idx_ocn=/(.+?)~(\d+)/ + @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier @env ||=SiSU_Env::InfoEnv.new(@md.fns) end def indexing_song @@ -199,15 +200,15 @@ module SiSU_AO_BookIndex if x['node_0_terms'].is_a?(Array) x['node_0_terms'].each do |a| if a[:range] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{a[:range]}, } + idx[:html][@q]=idx[:html][@q] + %{#{a[:range]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{a[:range]}, } print a[:range] + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif a[:ocn] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{a[:ocn]}, } + idx[:html][@q]=idx[:html][@q] + %{#{a[:ocn]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{a[:ocn]}, } print a[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on else p 'error' @@ -227,15 +228,15 @@ module SiSU_AO_BookIndex print "\n\t" + k + ', ' if @md.opt.act[:verbose_plus][:set]==:on y.each do |z| if z[:range] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{z[:range]}, } + idx[:html][@q]=idx[:html][@q] + %{#{z[:range]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{z[:range]}, } print z[:range] + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif z[:ocn] - idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } + idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } - idx[:html][@q]=idx[:html][@q] + %{#{z[:ocn]}, } + idx[:html][@q]=idx[:html][@q] + %{#{z[:ocn]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{z[:ocn]}, } print z[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on else p 'error' -- cgit v1.2.3 From 9f10ff9b7667f7e62cf17943dc6dae5a260776bd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 Feb 2014 18:31:28 -0500 Subject: v5 v6: utils, code markers & messages, notes/warning/errors, fix --- data/doc/sisu/CHANGELOG_v5 | 2 ++ data/doc/sisu/CHANGELOG_v6 | 2 ++ lib/sisu/v5/ao_images.rb | 12 ++++++------ lib/sisu/v5/utils.rb | 46 +++++++++++++++++++++++++++++++++++----------- lib/sisu/v6/ao_images.rb | 12 ++++++------ lib/sisu/v6/utils.rb | 46 +++++++++++++++++++++++++++++++++++----------- 6 files changed, 86 insertions(+), 34 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 7d080634..cf224b05 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -40,6 +40,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.2.orig.tar.xz * ao, html book index linking, follow --strict option +* utils, code markers & messages, notes/warning/errors, fix + %% 5.3.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.1-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index fe534781..d2ce1f19 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.2.orig.tar.xz * ao, html book index linking, follow --strict option +* utils, code markers & messages, notes/warning/errors, fix + %% 6.0.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.1-1 diff --git a/lib/sisu/v5/ao_images.rb b/lib/sisu/v5/ao_images.rb index d01c98b8..b72f66a3 100644 --- a/lib/sisu/v5/ao_images.rb +++ b/lib/sisu/v5/ao_images.rb @@ -62,12 +62,12 @@ =end module SiSU_AO_Images class Images - #begin - # require 'RMagick' - # include Magick - #rescue LoadError - # SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('RMagic NOT FOUND (LoadError)') - #end + begin + require 'RMagick' + include Magick + rescue LoadError + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('RMagic NOT FOUND') + end def initialize(md,data) @md,@data=md,data end diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/v5/utils.rb index 1c04d886..4894df9d 100644 --- a/lib/sisu/v5/utils.rb +++ b/lib/sisu/v5/utils.rb @@ -95,23 +95,29 @@ module SiSU_Utils end def var(v,x) h={ c: nil, m: '' } - if v.class == Hash + if v.is_a?(Hash) h[:c] = (defined? v[:c]) ? v[:c] : '' h[:m] = (defined? v[:m]) ? v[:m] : '' - else - if v.class == Symbol + elsif (v.is_a?(Symbol) \ + and x.is_a?(String)) + if v.is_a?(Symbol) h[:c]=v - elsif v.class == String + elsif v.is_a?(String) h[:m]=v end - if x.class == Symbol - h[:c]=x - elsif x.class == String + if x.is_a?(String) h[:m]=x end - h[:c] = (defined? h[:c]) ? h[:c] : '' - h[:m] = (defined? h[:m]) ? h[:m] : '' + elsif (v.is_a?(Symbol) \ + or v.is_a?(String)) + if v.is_a?(Symbol) + h[:c]=v + elsif v.is_a?(String) + h[:m]=v + end end + h[:c] = (defined? h[:c]) ? h[:c] : '' + h[:m] = (defined? h[:m]) ? h[:m] : '' h[:c]=ansi(h[:c]) h[:m]=message(h[:m]) h @@ -128,10 +134,28 @@ module SiSU_Utils puts set(v,x) end def warn(v=nil,x=nil) - STDERR.puts set(v,'*WARN* ' + x) + if (v.is_a?(Symbol) \ + and x.is_a?(String)) + x= '*WARN* ' + x + elsif v.is_a?(String) + v='*WARN* ' + v + x=nil + else + v,x='*WARN*',nil + end + STDERR.puts set(v,x) end def error(v=nil,x=nil) - STDERR.puts set(v,'*ERROR* ' + x) + if (v.is_a?(Symbol) \ + and x.is_a?(String)) + x= '*ERROR* ' + x + elsif v.is_a?(String) + v='*ERROR* ' + v + x=nil + else + v,x='*ERROR*',nil + end + STDERR.puts set(v,x) end end class Path diff --git a/lib/sisu/v6/ao_images.rb b/lib/sisu/v6/ao_images.rb index 0279994d..05bc8e63 100644 --- a/lib/sisu/v6/ao_images.rb +++ b/lib/sisu/v6/ao_images.rb @@ -62,12 +62,12 @@ =end module SiSU_AO_Images class Images - #begin - # require 'RMagick' - # include Magick - #rescue LoadError - # SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('RMagic NOT FOUND (LoadError)') - #end + begin + require 'RMagick' + include Magick + rescue LoadError + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).mark('RMagic NOT FOUND') + end def initialize(md,data) @md,@data=md,data end diff --git a/lib/sisu/v6/utils.rb b/lib/sisu/v6/utils.rb index 60925f22..8f9e17b8 100644 --- a/lib/sisu/v6/utils.rb +++ b/lib/sisu/v6/utils.rb @@ -95,23 +95,29 @@ module SiSU_Utils end def var(v,x) h={ c: nil, m: '' } - if v.class == Hash + if v.is_a?(Hash) h[:c] = (defined? v[:c]) ? v[:c] : '' h[:m] = (defined? v[:m]) ? v[:m] : '' - else - if v.class == Symbol + elsif (v.is_a?(Symbol) \ + and x.is_a?(String)) + if v.is_a?(Symbol) h[:c]=v - elsif v.class == String + elsif v.is_a?(String) h[:m]=v end - if x.class == Symbol - h[:c]=x - elsif x.class == String + if x.is_a?(String) h[:m]=x end - h[:c] = (defined? h[:c]) ? h[:c] : '' - h[:m] = (defined? h[:m]) ? h[:m] : '' + elsif (v.is_a?(Symbol) \ + or v.is_a?(String)) + if v.is_a?(Symbol) + h[:c]=v + elsif v.is_a?(String) + h[:m]=v + end end + h[:c] = (defined? h[:c]) ? h[:c] : '' + h[:m] = (defined? h[:m]) ? h[:m] : '' h[:c]=ansi(h[:c]) h[:m]=message(h[:m]) h @@ -128,10 +134,28 @@ module SiSU_Utils puts set(v,x) end def warn(v=nil,x=nil) - STDERR.puts set(v,'*WARN* ' + x) + if (v.is_a?(Symbol) \ + and x.is_a?(String)) + x= '*WARN* ' + x + elsif v.is_a?(String) + v='*WARN* ' + v + x=nil + else + v,x='*WARN*',nil + end + STDERR.puts set(v,x) end def error(v=nil,x=nil) - STDERR.puts set(v,'*ERROR* ' + x) + if (v.is_a?(Symbol) \ + and x.is_a?(String)) + x= '*ERROR* ' + x + elsif v.is_a?(String) + v='*ERROR* ' + v + x=nil + else + v,x='*ERROR*',nil + end + STDERR.puts set(v,x) end end class Path -- cgit v1.2.3 From bbbb88fa93768a67e59019a191f3a84cb5fc1d3b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 Feb 2014 18:32:38 -0500 Subject: v5 v6: sysenv, concordance redirected paths, watch --- data/doc/sisu/CHANGELOG_v5 | 2 ++ data/doc/sisu/CHANGELOG_v6 | 2 ++ lib/sisu/v5/sysenv.rb | 5 ++++- lib/sisu/v6/sysenv.rb | 5 ++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index cf224b05..925b03f2 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -42,6 +42,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.2.orig.tar.xz * utils, code markers & messages, notes/warning/errors, fix +* sysenv, concordance redirected paths, watch + %% 5.3.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.1-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index d2ce1f19..de699c73 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -32,6 +32,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.2.orig.tar.xz * utils, code markers & messages, notes/warning/errors, fix +* sysenv, concordance redirected paths, watch + %% 6.0.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.1-1 diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index f2b5bd27..537e52ca 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -5201,7 +5201,10 @@ WOK fh=default_hash_build(fh,Sfx[:html]) fh[:lng]=lang_code?(fh[:lng]) fnh=if output_dir_structure.dump_or_redirect? - @md.fnb + '.concordance' + ft + { + fn: 'concordance', + ft: fh[:ft], + } else { fn: 'concordance', diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb index db1bdc91..60d963dc 100644 --- a/lib/sisu/v6/sysenv.rb +++ b/lib/sisu/v6/sysenv.rb @@ -5201,7 +5201,10 @@ WOK fh=default_hash_build(fh,Sfx[:html]) fh[:lng]=lang_code?(fh[:lng]) fnh=if output_dir_structure.dump_or_redirect? - @md.fnb + '.concordance' + ft + { + fn: 'concordance', + ft: fh[:ft], + } else { fn: 'concordance', -- cgit v1.2.3 From f67352938fd43fe4bb9591311173e1601d4edbc7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 5 Feb 2014 18:34:16 -0500 Subject: manual Rakefile, README & minor config adjustment --- README | 30 +++++++++++----------- data/doc/sisu/CHANGELOG_v5 | 2 ++ data/doc/sisu/CHANGELOG_v6 | 2 ++ data/doc/sisu/markup-samples/manual/README | 5 ++++ data/doc/sisu/markup-samples/manual/Rakefile | 25 +++++++++++++++--- .../manual/_sisu/rc/sisurc_by_fn.yml | 2 +- .../manual/_sisu/rc/sisurc_by_ft.yml | 2 +- .../manual/_sisu/rc/sisurc_by_lng.yml | 4 +-- 8 files changed, 50 insertions(+), 22 deletions(-) create mode 100644 data/doc/sisu/markup-samples/manual/README diff --git a/README b/README index e0550c83..82bf5466 100644 --- a/README +++ b/README @@ -1552,21 +1552,21 @@ TREE */"Viral Spiral"/, David Bollier* -"Viral Spiral", David Bollier [link: ] - document manifest [link: ] - html, segmented text [link: ] - html, scroll, document in one [link: ] - epub [link: ] - pdf, landscape [link: ] - pdf, portrait [link: ] - odf: odt, open document text [link: ] - xhtml scroll [link: ] - xml, sax [link: ] - xml, dom [link: ] - concordance [link: ] - dcc, document content certificate (digests) [link: ] - markup source text [link: ] - markup source (zipped) pod [link: ] +"Viral Spiral", David Bollier [link: ] + document manifest [link: ] + html, segmented text [link: ] + html, scroll, document in one [link: ] + epub [link: ] + pdf, landscape [link: ] + pdf, portrait [link: ] + odf: odt, open document text [link: ] + xhtml scroll [link: ] + xml, sax [link: ] + xml, dom [link: ] + concordance [link: ] + dcc, document content certificate (digests) [link: ] + markup source text [link: ] + markup source (zipped) pod [link: ] GROUPED TEXT ............ diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 925b03f2..d9dc1349 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -44,6 +44,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.2.orig.tar.xz * sysenv, concordance redirected paths, watch +* manual Rakefile, README & minor config adjustment + %% 5.3.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.1-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index de699c73..2057fadc 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -34,6 +34,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.2.orig.tar.xz * sysenv, concordance redirected paths, watch +* manual Rakefile, README & minor config adjustment + %% 6.0.1.orig.tar.xz (2014-02-05:05/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.1 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.1-1 diff --git a/data/doc/sisu/markup-samples/manual/README b/data/doc/sisu/markup-samples/manual/README new file mode 100644 index 00000000..76b55552 --- /dev/null +++ b/data/doc/sisu/markup-samples/manual/README @@ -0,0 +1,5 @@ +ruby ../../../../../bin/sisu6 --txt -v en/README.ssm +ruby ../../../../../bin/sisu6 --txt -v --no-manifest --dump='../../../../../..' en/README.ssm + +ruby ../../../../../bin/sisu6 --manpage -v en/README.ssm +ruby ../../../../../bin/sisu6 --manpage -v --no-manifest --dump='../../../../../../man/man1' en/sisu.ssm diff --git a/data/doc/sisu/markup-samples/manual/Rakefile b/data/doc/sisu/markup-samples/manual/Rakefile index 1d9b5414..e389856f 100644 --- a/data/doc/sisu/markup-samples/manual/Rakefile +++ b/data/doc/sisu/markup-samples/manual/Rakefile @@ -169,7 +169,7 @@ def notice #{project_details.name} #{project_details.rake_project} -This rake file is to assist with having sisu markup files under po4a +This rake file is primarily to assist with having sisu markup files under po4a translation management. It assumes that the source language files are placed under the sub-directory identifying the source language set, which is currently #{language.source} @@ -190,6 +190,15 @@ For a more detailed and up to date task list use: end self end +def generate + def readme + system(%{ruby ../../../../../bin/sisu6 --txt -v --no-manifest --dump='../../../../../..' en/README.ssm}) + end + def manpage + system(%{ruby ../../../../../bin/sisu6 --manpage -v --no-manifest --dump='../../../../../../man/man1' en/sisu.ssm}) + end + self +end def tasks system('rake -T') end @@ -341,8 +350,8 @@ def distclean end #% task lists -desc "runs make (see its description below)" -task :default => [:make] +desc "help" +task :default => [:help] desc "assist with having sisu markup files managed by po4a create configuration files, and language directories and populate them with po4a pot & po files for translation and @@ -369,6 +378,10 @@ and File.directory?(dir.po) else task :make! => [:build_] end +desc "generate sisu manpage sisu.1" +task :manpage => [:manpage_] +desc "generate sisu README" +task :readme => [:readme_] #% task actions task :project_help_ do @@ -401,4 +414,10 @@ end task :notice_rebuild_ do notice.default(:rebuild) end +task :manpage_ do + generate.manpage +end +task :readme_ do + generate.readme +end __END__ diff --git a/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_fn.yml b/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_fn.yml index f12e3144..7f78f367 100644 --- a/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_fn.yml +++ b/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_fn.yml @@ -15,7 +15,7 @@ # #all: 'image' #% presentation/web directory, main path and subdirectories (most subdirectories are created automatically based on markup directory name) #webserv: -# url_root: 'http://www.your.url' #without dir stub +# url_root: 'http://www.your.url' #url to document root, without dir stub # path: '/var/www' #either (i) / [full path from root] or (ii) ~/ [home] or (iii) ./ [pwd] or (iv) will be made from home # images: '_sisu/image' # man: 'man' diff --git a/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_ft.yml b/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_ft.yml index 71faa3e0..26fff9a0 100644 --- a/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_ft.yml +++ b/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_ft.yml @@ -15,7 +15,7 @@ # #all: 'image' #% presentation/web directory, main path and subdirectories (most subdirectories are created automatically based on markup directory name) #webserv: -# url_root: 'http://www.your.url' #without dir stub +# url_root: 'http://www.your.url' #url to document root, without dir stub # path: '/var/www' #either (i) / [full path from root] or (ii) ~/ [home] or (iii) ./ [pwd] or (iv) will be made from home # images: '_sisu/image' # man: 'man' diff --git a/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_lng.yml b/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_lng.yml index ca1cf424..4ab568ca 100644 --- a/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_lng.yml +++ b/data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_lng.yml @@ -14,8 +14,8 @@ # public: '_sisu/image' # #all: 'image' #% presentation/web directory, main path and subdirectories (most subdirectories are created automatically based on markup directory name) -#webserv: -# url_root: 'http://www.your.url' #without dir stub +webserv: + url_root: 'http://www.sisudoc.org' #url to document root, without dir stub # path: '/var/www' #either (i) / [full path from root] or (ii) ~/ [home] or (iii) ./ [pwd] or (iv) will be made from home # images: '_sisu/image' # man: 'man' -- cgit v1.2.3