diff options
| author | Ralph Amissah <ralph@amissah.com> | 2014-07-04 13:50:24 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2014-07-04 13:51:40 -0400 | 
| commit | a6a74342e3a57a9a9fa33b6d51a5a9aab0541d17 (patch) | |
| tree | e11d5bb60b954edac2ccce17adce2b01546888f3 | |
| parent | debian/changelog (5.4.3-1) (diff) | |
| parent | v5 v6: ao, fix, re: seg numbering, fixed width, leading zeros (new in 5.4.3) (diff) | |
Merge tag 'sisu_5.4.4' into debian/sid
SiSU 5.4.4
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 10 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v6 | 10 | ||||
| -rw-r--r-- | data/sisu/v5/v/version.yml | 6 | ||||
| -rw-r--r-- | data/sisu/v6/v/version.yml | 6 | ||||
| -rw-r--r-- | lib/sisu/v5/ao_numbering.rb | 45 | ||||
| -rw-r--r-- | lib/sisu/v6/ao_numbering.rb | 45 | ||||
| -rw-r--r-- | rbuild | 4 | 
7 files changed, 86 insertions, 40 deletions
| diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index ec8eb24f..2e3e84f8 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -31,6 +31,16 @@ v2 branch is removed; it is available in sisu =< 3.3.2  %% Reverse Chronological: +%% 5.4.4.orig.tar.xz (2014-07-04:26/5) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.4.4 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.4.4-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.4.4.orig.tar.xz +  sisu_5.4.4.orig.tar.xz +  sisu_5.4.4-1.dsc + +* ao, fix, re seg numbering, fixed width, leading zeros (introduced in 5.4.3) +  provisional fix (check related issues against 5.4.2) +  %% 5.4.3.orig.tar.xz (2014-07-01:26/2)  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.4.3  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.4.3-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index ada19da7..f9d9a62d 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -21,6 +21,16 @@ v2 branch is removed; it is available in sisu =< 3.3.2  %% Reverse Chronological: +%% 6.0.10.orig.tar.xz (2014-07-04:26/5) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.10 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.10-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.10.orig.tar.xz +  sisu_6.0.10.orig.tar.xz +  sisu_6.0.10-1.dsc + +* ao, fix, re seg numbering, fixed width, leading zeros (introduced in 6.0.9) +  provisional fix (check related issues against 5.4.2) +  %% 6.0.9.orig.tar.xz (2014-07-01:26/2)  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.9  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.9-1 diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index b6d8dfa8..ef86ff92 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@  ---  :project: SiSU -:version: 5.4.3 -:date_stamp: 2014w26/2 -:date: "2014-07-01" +:version: 5.4.4 +:date_stamp: 2014w26/5 +:date: "2014-07-04" diff --git a/data/sisu/v6/v/version.yml b/data/sisu/v6/v/version.yml index fb9cc955..fa44ea93 100644 --- a/data/sisu/v6/v/version.yml +++ b/data/sisu/v6/v/version.yml @@ -1,5 +1,5 @@  ---  :project: SiSU -:version: 6.0.9 -:date_stamp: 2014w26/2 -:date: "2014-07-01" +:version: 6.0.10 +:date_stamp: 2014w26/5 +:date: "2014-07-04" diff --git a/lib/sisu/v5/ao_numbering.rb b/lib/sisu/v5/ao_numbering.rb index c4b6558f..9fbaaab5 100644 --- a/lib/sisu/v5/ao_numbering.rb +++ b/lib/sisu/v5/ao_numbering.rb @@ -81,15 +81,19 @@ module SiSU_AO_Numbering        end      end      def numbering_song -      data=@data -      data=number_plaintext_para(data) -      data=auto_number_heading_ie_title(data.compact) #tr issue -      data=ocn(data.compact) #watch -      data=xml(data.compact) -      data=minor_numbering(data.compact) -      data,tags_map,ocn_html_seg_map=name_para_seg_filename(data) -      data=set_heading_top(data) unless @md.set_heading_top -      [data,tags_map,ocn_html_seg_map] +      begin +        data=@data +        data=number_plaintext_para(data) +        data=auto_number_heading_ie_title(data.compact) #tr issue +        data=ocn(data.compact) #watch +        data=xml(data.compact) +        data=minor_numbering(data.compact) +        data,tags_map,ocn_html_seg_map=name_para_seg_filename(data) +        data=set_heading_top(data) unless @md.set_heading_top +        [data,tags_map,ocn_html_seg_map] +      ensure +        @@segments_count=0 +      end      end      def set_tags(tags,tag)        tags=if not tag.empty? \ @@ -190,7 +194,10 @@ module SiSU_AO_Numbering                  if dob.ln==no1                    dob.name="#{title_no}" if not dob.name                    dob.tags=set_tags(dob.tags,title_no) -                  tag=dob.obj.gsub(/(Article|Clause|Section|Chapter)\s+/,"\\1_#{title_no}").downcase +                  tag=dob.obj. +                    gsub(/(Article|Clause|Section|Chapter)\s+/, +                      "\\1_#{title_no}"). +                    downcase                    tag=heading_tag_clean(tag)                    dob.tags=set_tags(dob.tags,tag)                    dob.obj=(dob.obj =~/(Article|Clause|Section)\s+/) \ @@ -293,7 +300,7 @@ module SiSU_AO_Numbering        @tuned_file=@tuned_file.flatten      end      def leading_zeros_fixed_width_number(possible_seg_name) -      if possible_seg_name =~/^([\d]+?\.|[\d]+)$/m          #!~/[.,:-]+/ +      if possible_seg_name =~/^([0-9]+?\.|[0-9]+)$/m          #!~/[.,:-]+/          possible_seg_name=possible_seg_name.            gsub(/\.$/,'')          nl=possible_seg_name.to_s.length @@ -308,15 +315,20 @@ module SiSU_AO_Numbering            possible_seg_name.to_s        end      end -    def auto_seg_name(possible_seg_name) -      if possible_seg_name =~/^([\d]+?\.|[\d]+)$/m          #!~/[.,:-]+/ +    def auto_seg_name(possible_seg_name,heading_num_is) +      if possible_seg_name =~/^[0-9]+?\.$/m                                  #!~/[.,:-]+/ +        possible_seg_name=possible_seg_name. +          gsub(/\.$/,'') +      end +      if possible_seg_name =~/^[0-9]+$/m \ +      and possible_seg_name.to_i <= heading_num_is.to_i          leading_zeros_fixed_width_number(possible_seg_name)        elsif possible_seg_name =~/^[\d.,:-]+$/m          possible_seg_name=possible_seg_name.            gsub(/(?:[:,-]|\W)/,'.').            gsub(/\.$/,'')          #Mx[:auto_seg_prefix] + possible_seg_name -      else possible_seg_name +      else possible_seg_name.to_s        end      end      def name_para_seg_filename(data)                                                   #segment naming, remaining @@ -347,6 +359,7 @@ module SiSU_AO_Numbering          if dob.is==:heading \          && dob.ln \          and dob.ln.to_s =~/^[456]/ +          heading_num_is=/^\d+:(\d+);\d/m.match(dob.node)[1]            if dob.ln==4 \            and not dob.name \            and not @md.set_heading_seg @@ -356,7 +369,7 @@ module SiSU_AO_Numbering            and dob.obj =~/^\s*(?:\S+\s+)?([\d.,:-]+)/m      #heading starts with a recognised numeric or word followed by a recognised numeric construct, use that as name              possible_seg_name=$1              possible_seg_name= -              auto_seg_name(possible_seg_name) +              auto_seg_name(possible_seg_name,heading_num_is)              possible_seg_name=possible_seg_name.                gsub(/(?:[:,-]|\W)/,'.').                gsub(/\.$/,'') @@ -381,7 +394,7 @@ module SiSU_AO_Numbering            if dob.ln==4 \            and not dob.name                                 #if still no segment name, provide a numerical one              possible_seg_name= -              auto_seg_name(art_filename_auto) +              auto_seg_name(art_filename_auto,heading_num_is)              if @md.seg_names.is_a?(Array) \              and not @md.seg_names.include?(possible_seg_name)               dob.name=possible_seg_name diff --git a/lib/sisu/v6/ao_numbering.rb b/lib/sisu/v6/ao_numbering.rb index d6faf3a6..755db795 100644 --- a/lib/sisu/v6/ao_numbering.rb +++ b/lib/sisu/v6/ao_numbering.rb @@ -81,15 +81,19 @@ module SiSU_AO_Numbering        end      end      def numbering_song -      data=@data -      data=number_plaintext_para(data) -      data=auto_number_heading_ie_title(data.compact) #tr issue -      data=ocn(data.compact) #watch -      data=xml(data.compact) -      data=minor_numbering(data.compact) -      data,tags_map,ocn_html_seg_map=name_para_seg_filename(data) -      data=set_heading_top(data) unless @md.set_heading_top -      [data,tags_map,ocn_html_seg_map] +      begin +        data=@data +        data=number_plaintext_para(data) +        data=auto_number_heading_ie_title(data.compact) #tr issue +        data=ocn(data.compact) #watch +        data=xml(data.compact) +        data=minor_numbering(data.compact) +        data,tags_map,ocn_html_seg_map=name_para_seg_filename(data) +        data=set_heading_top(data) unless @md.set_heading_top +        [data,tags_map,ocn_html_seg_map] +      ensure +        @@segments_count=0 +      end      end      def set_tags(tags,tag)        tags=if not tag.empty? \ @@ -190,7 +194,10 @@ module SiSU_AO_Numbering                  if dob.ln==no1                    dob.name="#{title_no}" if not dob.name                    dob.tags=set_tags(dob.tags,title_no) -                  tag=dob.obj.gsub(/(Article|Clause|Section|Chapter)\s+/,"\\1_#{title_no}").downcase +                  tag=dob.obj. +                    gsub(/(Article|Clause|Section|Chapter)\s+/, +                      "\\1_#{title_no}"). +                    downcase                    tag=heading_tag_clean(tag)                    dob.tags=set_tags(dob.tags,tag)                    dob.obj=(dob.obj =~/(Article|Clause|Section)\s+/) \ @@ -293,7 +300,7 @@ module SiSU_AO_Numbering        @tuned_file=@tuned_file.flatten      end      def leading_zeros_fixed_width_number(possible_seg_name) -      if possible_seg_name =~/^([\d]+?\.|[\d]+)$/m          #!~/[.,:-]+/ +      if possible_seg_name =~/^([0-9]+?\.|[0-9]+)$/m          #!~/[.,:-]+/          possible_seg_name=possible_seg_name.            gsub(/\.$/,'')          nl=possible_seg_name.to_s.length @@ -308,15 +315,20 @@ module SiSU_AO_Numbering            possible_seg_name.to_s        end      end -    def auto_seg_name(possible_seg_name) -      if possible_seg_name =~/^([\d]+?\.|[\d]+)$/m          #!~/[.,:-]+/ +    def auto_seg_name(possible_seg_name,heading_num_is) +      if possible_seg_name =~/^[0-9]+?\.$/m                                  #!~/[.,:-]+/ +        possible_seg_name=possible_seg_name. +          gsub(/\.$/,'') +      end +      if possible_seg_name =~/^[0-9]+$/m \ +      and possible_seg_name.to_i <= heading_num_is.to_i          leading_zeros_fixed_width_number(possible_seg_name)        elsif possible_seg_name =~/^[\d.,:-]+$/m          possible_seg_name=possible_seg_name.            gsub(/(?:[:,-]|\W)/,'.').            gsub(/\.$/,'')          #Mx[:auto_seg_prefix] + possible_seg_name -      else possible_seg_name +      else possible_seg_name.to_s        end      end      def name_para_seg_filename(data)                                                   #segment naming, remaining @@ -347,6 +359,7 @@ module SiSU_AO_Numbering          if dob.is==:heading \          && dob.ln \          and dob.ln.to_s =~/^[456]/ +          heading_num_is=/^\d+:(\d+);\d/m.match(dob.node)[1]            if dob.ln==4 \            and not dob.name \            and not @md.set_heading_seg @@ -356,7 +369,7 @@ module SiSU_AO_Numbering            and dob.obj =~/^\s*(?:\S+\s+)?([\d.,:-]+)/m      #heading starts with a recognised numeric or word followed by a recognised numeric construct, use that as name              possible_seg_name=$1              possible_seg_name= -              auto_seg_name(possible_seg_name) +              auto_seg_name(possible_seg_name,heading_num_is)              possible_seg_name=possible_seg_name.                gsub(/(?:[:,-]|\W)/,'.').                gsub(/\.$/,'') @@ -381,7 +394,7 @@ module SiSU_AO_Numbering            if dob.ln==4 \            and not dob.name                                 #if still no segment name, provide a numerical one              possible_seg_name= -              auto_seg_name(art_filename_auto) +              auto_seg_name(art_filename_auto,heading_num_is)              if @md.seg_names.is_a?(Array) \              and not @md.seg_names.include?(possible_seg_name)               dob.name=possible_seg_name @@ -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.4.3' -SiSU_version_next_unstable   = '6.0.9' +SiSU_version_next_stable     = '5.4.4' +SiSU_version_next_unstable   = '6.0.10'  #% rake file  SiSU_version_generic_next_stable     = '5.4.x'  SiSU_version_generic_next_unstable   = '6.0.x' | 
