diff options
| author | Ralph Amissah <ralph@amissah.com> | 2014-02-05 18:38:18 -0500 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2014-02-05 18:38:18 -0500 | 
| commit | 9f8f2879231f7ffa5fa1906babd31ea6af88331a (patch) | |
| tree | f819b41031608703385f02d1532598ee40dcb477 | |
| parent | debian/changelog (5.3.1-1) (diff) | |
| parent | manual Rakefile, README & minor config adjustment (diff) | |
Merge tag 'sisu_5.3.2' into debian/sid
SiSU 5.3.2
| -rw-r--r-- | README | 30 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 15 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v6 | 15 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/manual/README | 5 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/manual/Rakefile | 25 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_fn.yml | 2 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_ft.yml | 2 | ||||
| -rw-r--r-- | data/doc/sisu/markup-samples/manual/_sisu/rc/sisurc_by_lng.yml | 4 | ||||
| -rw-r--r-- | data/sisu/v5/v/version.yml | 2 | ||||
| -rw-r--r-- | data/sisu/v6/v/version.yml | 2 | ||||
| -rw-r--r-- | lib/sisu/v5/ao_idx.rb | 17 | ||||
| -rw-r--r-- | lib/sisu/v5/ao_images.rb | 12 | ||||
| -rw-r--r-- | lib/sisu/v5/sysenv.rb | 5 | ||||
| -rw-r--r-- | lib/sisu/v5/utils.rb | 46 | ||||
| -rw-r--r-- | lib/sisu/v6/ao_idx.rb | 17 | ||||
| -rw-r--r-- | lib/sisu/v6/ao_images.rb | 12 | ||||
| -rw-r--r-- | lib/sisu/v6/sysenv.rb | 5 | ||||
| -rw-r--r-- | lib/sisu/v6/utils.rb | 46 | ||||
| -rw-r--r-- | rbuild | 4 | 
19 files changed, 188 insertions, 78 deletions
| @@ -1552,21 +1552,21 @@ TREE  */"Viral Spiral"/, David Bollier* -"Viral Spiral", David Bollier [link: <http://niu/manual/en/manifest/viral_spiral.david_bollier.html>] -      document manifest [link: <http://niu/manual/en/manifest/viral_spiral.david_bollier.html>] -      html, segmented text [link: <http://niu/manual/en/html/viral_spiral.david_bollier/toc.html>] -      html, scroll, document in one [link: <http://niu/manual/en/html/viral_spiral.david_bollier.html>] -      epub [link: <http://niu/manual/en/epub/viral_spiral.david_bollier.epub>] -      pdf, landscape [link: <http://niu/manual/en/pdf/viral_spiral.david_bollier.landscape.a4.pdf>] -      pdf, portrait [link: <http://niu/manual/en/pdf/viral_spiral.david_bollier.landscape.a4.pdf>] -      odf: odt, open document text [link: <http://niu/manual/en/odt/viral_spiral.david_bollier.odt>] -      xhtml scroll [link: <http://niu/manual/en/xhtml/viral_spiral.david_bollier.xhtml>] -      xml, sax [link: <http://niu/manual/en/xml_sax/viral_spiral.david_bollier.sax.xml>] -      xml, dom [link: <http://niu/manual/en/xml_dom/viral_spiral.david_bollier.dom.xml>] -      concordance [link: <http://niu/manual/en/html/viral_spiral.david_bollier/concordance.html>] -      dcc, document content certificate (digests) [link: <http://niu/manual/en/digest/viral_spiral.david_bollier.hash_digest.txt>] -      markup source text [link: <http://niu/manual/en/src/viral_spiral.david_bollier.sst>] -      markup source (zipped) pod [link: <http://niu/manual/en/src/viral_spiral.david_bollier.sst.zip>] +"Viral Spiral", David Bollier [link: <http://www.sisudoc.org/sisu/en/manifest/viral_spiral.david_bollier.manifest.html>] +      document manifest [link: <http://www.sisudoc.org/sisu/en/manifest/viral_spiral.david_bollier.manifest.html>] +      html, segmented text [link: <http://www.sisudoc.org/sisu/en/html/viral_spiral.david_bollier/viral_spiral.david_bollier.toc.html>] +      html, scroll, document in one [link: <http://www.sisudoc.org/sisu/en/html/viral_spiral.david_bollier.html>] +      epub [link: <http://www.sisudoc.org/sisu/en/epub/viral_spiral.david_bollier.epub>] +      pdf, landscape [link: <http://www.sisudoc.org/sisu/en/pdf/viral_spiral.david_bollier.landscape.a4.pdf>] +      pdf, portrait [link: <http://www.sisudoc.org/sisu/en/pdf/viral_spiral.david_bollier.landscape.a4.pdf>] +      odf: odt, open document text [link: <http://www.sisudoc.org/sisu/en/odt/viral_spiral.david_bollier.odt>] +      xhtml scroll [link: <http://www.sisudoc.org/sisu/en/xhtml/viral_spiral.david_bollier.xhtml>] +      xml, sax [link: <http://www.sisudoc.org/sisu/en/xml_sax/viral_spiral.david_bollier.sax.xml>] +      xml, dom [link: <http://www.sisudoc.org/sisu/en/xml_dom/viral_spiral.david_bollier.dom.xml>] +      concordance [link: <http://www.sisudoc.org/sisu/en/html/viral_spiral.david_bollier/concordance.html>] +      dcc, document content certificate (digests) [link: <http://www.sisudoc.org/sisu/en/digest/viral_spiral.david_bollier.hash_digest.txt>] +      markup source text [link: <http://www.sisudoc.org/sisu/en/src/viral_spiral.david_bollier.sst>] +      markup source (zipped) pod [link: <http://www.sisudoc.org/sisu/en/src/viral_spiral.david_bollier.sst.zip>]  GROUPED TEXT  ............ diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 15e4ce0d..d9dc1349 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -31,6 +31,21 @@ 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 + +* ao, html book index linking, follow --strict option + +* utils, code markers & messages, notes/warning/errors, fix + +* 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 4454c3e1..2057fadc 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -21,6 +21,21 @@ 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 + +* ao, html book index linking, follow --strict option + +* utils, code markers & messages, notes/warning/errors, fix + +* 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' 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/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 href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, } +                  idx[:html][@q]=idx[:html][@q] + %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:range]}</a>, }                    idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, }                    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 href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, } +                  idx[:html][@q]=idx[:html][@q] + %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:ocn]}</a>, }                    idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, }                    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] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, } +                      idx[:html][@q]=idx[:html][@q] + %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:range]}</a>, }                        idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, }                        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] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, } +                      idx[:html][@q]=idx[:html][@q] + %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:ocn]}</a>, }                        idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, }                        print z[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on                      else p 'error' 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/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/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_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 href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, } +                  idx[:html][@q]=idx[:html][@q] + %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:range]}</a>, }                    idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, }                    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 href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, } +                  idx[:html][@q]=idx[:html][@q] + %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:ocn]}</a>, }                    idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, }                    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] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, } +                      idx[:html][@q]=idx[:html][@q] + %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:range]}</a>, }                        idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, }                        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] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, } +                      idx[:html][@q]=idx[:html][@q] + %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:ocn]}</a>, }                        idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, }                        print z[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on                      else p 'error' 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/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', 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 @@ -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' | 
