aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-08-01 18:28:29 -0400
committerRalph Amissah <ralph@amissah.com>2013-08-01 18:28:29 -0400
commit37ee480281f5d28047e593e04e6f9d032ced9083 (patch)
tree3029cc0e8b826c75720c122e07bd55f743968340
parentdebian/changelog (4.1.8-1) (diff)
parentv5: concordance, fix (diff)
Merge tag 'sisu_4.1.9' into debian/sid
SiSU 4.1.9
-rw-r--r--data/doc/sisu/CHANGELOG_v47
-rw-r--r--data/doc/sisu/CHANGELOG_v511
-rw-r--r--data/sisu/v4/v/version.yml6
-rw-r--r--data/sisu/v5/v/version.yml6
-rw-r--r--lib/sisu/v5/concordance.rb35
-rw-r--r--lib/sisu/v5/sysenv.rb59
6 files changed, 65 insertions, 59 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index d98123b8..677c85ee 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -23,6 +23,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2
%% Reverse Chronological:
+%% 4.1.9.orig.tar.xz (2013-08-01:30/4)
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.9
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.9-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.9.orig.tar.xz
+ sisu_4.1.9.orig.tar.xz
+ sisu_4.1.9-1.dsc
+
%% 4.1.8.orig.tar.xz (2013-07-30:30/2)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.8
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.8-1
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index 6ff63e39..b442c4ed 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -23,6 +23,17 @@ v2 branch is removed; it is available in sisu =< 3.3.2
%% Reverse Chronological:
+%% 5.0.9.orig.tar.xz (2013-08-01:30/4)
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.9
+http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.9-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.9.orig.tar.xz
+ sisu_5.0.9.orig.tar.xz
+ sisu_5.0.9-1.dsc
+
+* output structure by :filename or :filetype, multilingual default, fix
+
+* concordance, fix
+
%% 5.0.8.orig.tar.xz (2013-07-30:30/2)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.8
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.8-1
diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml
index b9171cef..cb22fae8 100644
--- a/data/sisu/v4/v/version.yml
+++ b/data/sisu/v4/v/version.yml
@@ -1,5 +1,5 @@
---
-:version: 4.1.8
-:date_stamp: 2013w30/2
-:date: "2013-07-30"
+:version: 4.1.9
+:date_stamp: 2013w30/4
+:date: "2013-08-01"
:project: SiSU
diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml
index 3f34748c..06f247e4 100644
--- a/data/sisu/v5/v/version.yml
+++ b/data/sisu/v5/v/version.yml
@@ -1,5 +1,5 @@
---
-:version: 5.0.8
-:date_stamp: 2013w30/2
-:date: "2013-07-30"
+:version: 5.0.9
+:date_stamp: 2013w30/4
+:date: "2013-08-01"
:project: SiSU
diff --git a/lib/sisu/v5/concordance.rb b/lib/sisu/v5/concordance.rb
index 48ac1aac..96f293f2 100644
--- a/lib/sisu/v5/concordance.rb
+++ b/lib/sisu/v5/concordance.rb
@@ -239,25 +239,13 @@ WOK
%{<a href="doc#{@md.lang_code_insert}#{Sfx[:html]}\##{wordlocation}">#{wordlocation}</a>; }
end
def location_seg(wordlocation,show) ##fix
- case wordlocation
- when /@rxp_t1|@rxp_t2|@rxp_t3/
- fnh={
- fn: 'doc',
- lng: @md.lang_code_insert
- }
- fn=@md.file.base_filename.html_seg(fnh)
- %{[<a href="#{fn}##{show}">H</a>]#{show}, }
- else
- if not wordlocation.nil? \
- and wordlocation =~ /(.+?)\#(\d+)/
- seg,loc=/(.+?)\#(\d+)/.match(wordlocation)[1,2]
- fnh={
- fn: seg,
- lng: @md.lang_code_insert
- }
- fn=@md.file.base_filename.html_seg(fnh)
- word_location_seg=%{#{fn}##{loc}}
- %{<a href="#{word_location_seg}">#{show}</a>, }
+ unless wordlocation.nil?
+ wl=wordlocation.gsub(/(.+?)\#(\d+)/,"\\1#{@md.lang_code_insert}#{Sfx[:html]}#\\2")
+ case wordlocation
+ when /#{@rxp_t1}|@rxp_t2}|#{@rxp_t3}/
+ %{[<a href="doc#{@md.lang_code_insert}#{Sfx[:html]}##{show}">H</a>]#{show}, }
+ when /(.+?)\#(\d+)/
+ %{<a href="#{wl}">#{show}</a>, }
end
end
end
@@ -327,10 +315,11 @@ WOK
end
@freq[word] +=1
@word_map[word] ||= []
- if line !~@rxp_lv1 \
- and line !~@rxp_lv2 \
- and line !~@rxp_lv3 #fix @rxp_lv # Mx[:lv_o]
- @word_map[word] << location_seg("#{@seg}\##{ocn}",ocn)
+ if line !~ /#{@rxp_lv1}|#{@rxp_lv2}|#{@rxp_lv3}/
+ loc_=%{#{location_seg("#{@seg}\##{ocn}",ocn).to_s}}
+ unless loc_.empty?
+ @word_map[word] << loc_
+ end
else
@word_map[word] << case line
when @rxp_lv1; location_seg('T1',ocn) #fix @rxp_lv # Mx[:lv_o]
diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb
index 9ddc763e..5ea84832 100644
--- a/lib/sisu/v5/sysenv.rb
+++ b/lib/sisu/v5/sysenv.rb
@@ -442,8 +442,9 @@ module SiSU_Env
@fnn,@fnb,@fnt,@flv,@fnz=@@fnn,@@fnb,@@fnt,@@flv,@@fnz
end
def default_language?
- if @rc
- if defined? @rc['language_default'] \
+ if @rc \
+ && defined? @rc['language_default']
+ if (@rc['language_default'].is_a?(String)) \
&& (@rc['language_default'] =~/#{Px[:lng_lst_rgx]}/)
@rc['language_default']
else
@@ -454,11 +455,12 @@ module SiSU_Env
end
end
def mono_multi_lingual?
- if @rc
- if defined? @rc['lingual'] \
+ if @rc \
+ && defined? @rc['lingual']
+ if (@rc['lingual'].is_a?(String)) \
&& (@rc['lingual'] =~/mono(?:lingual)?/)
:mono
- elsif defined? @rc['lingual'] \
+ elsif (@rc['lingual'].is_a?(String)) \
&& (@rc['lingual'] =~/multi(?:lingual)?/)
:multi
else
@@ -470,31 +472,28 @@ module SiSU_Env
def output_dir_structure
def by?
output_structure=:filename #set default output structure
- if @rc
- output_structure=if defined? @rc['output_dir_structure_by']
- output_structure=if (@rc['output_dir_structure_by'] =~/dump/) \
- or ((defined? @rc['output_structure']['dump']) \
- && @rc['output_structure']['dump'] ==true)
- :dump
- elsif (@rc['output_dir_structure_by'] =~/redirect/) \
- or ((defined? @rc['output_structure']['redirect']) \
- && @rc['output_structure']['redirect'] ==true)
- :redirect
- elsif (@rc['output_dir_structure_by'] =~/language/) \
- or ((defined? @rc['output_structure']['by_language']) \
- && @rc['output_structure']['by_language'] ==true)
- :language
- elsif (@rc['output_dir_structure_by'] =~/filetype/) \
- or ((defined? @rc['output_structure']['by_filetype']) \
- && @rc['output_structure']['by_filetype'] ==true)
- :filetype
- elsif (@rc['output_dir_structure_by'] =~/filename/) \
- or ((defined? @rc['output_structure']['by_filename']) \
- && @rc['output_structure']['by_filename'] ==true)
- :filename
- else #set default
- :language
- end
+ if @rc \
+ && defined? @rc['output_dir_structure_by']
+ output_structure=if (@rc['output_dir_structure_by'] =~/dump/) \
+ or ((defined? @rc['output_structure']['dump']) \
+ && @rc['output_structure']['dump'] ==true)
+ :dump
+ elsif (@rc['output_dir_structure_by'] =~/redirect/) \
+ or ((defined? @rc['output_structure']['redirect']) \
+ && @rc['output_structure']['redirect'] ==true)
+ :redirect
+ elsif (@rc['output_dir_structure_by'] =~/language/) \
+ or ((defined? @rc['output_structure']['by_language']) \
+ && @rc['output_structure']['by_language'] ==true)
+ :language
+ elsif (@rc['output_dir_structure_by'] =~/filetype/) \
+ or ((defined? @rc['output_structure']['by_filetype']) \
+ && @rc['output_structure']['by_filetype'] ==true)
+ :filetype
+ elsif (@rc['output_dir_structure_by'] =~/filename/) \
+ or ((defined? @rc['output_structure']['by_filename']) \
+ && @rc['output_structure']['by_filename'] ==true)
+ :filename
else #set default
:language
end