aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-28 21:43:59 -0400
committerRalph Amissah <ralph@amissah.com>2013-03-28 21:43:59 -0400
commit71e8f191aac721011fed9cdd453642785fa0e7d6 (patch)
tree2ff09cc22a32a49e75c48469d62483189edbc30f
parentv4: dal, screen_text_color, distinguish doc abstraction, as start of processing (diff)
v4: dbi, import composite files (.ssm) correctly
-rw-r--r--data/doc/sisu/CHANGELOG_v42
-rw-r--r--lib/sisu/v4/dal.rb12
-rw-r--r--lib/sisu/v4/db_import.rb1
3 files changed, 10 insertions, 5 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index 3d2da01b..78b11e9b 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.18.orig.tar.xz
* v4: dal, screen_text_color, distinguish doc abstraction as start of processing
+* v4: dbi, import composite files (.ssm) correctly
+
%% 4.0.17.orig.tar.xz (2013-03-25:12/1)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.17
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.17-1
diff --git a/lib/sisu/v4/dal.rb b/lib/sisu/v4/dal.rb
index f64586ff..47d64ae7 100644
--- a/lib/sisu/v4/dal.rb
+++ b/lib/sisu/v4/dal.rb
@@ -95,12 +95,16 @@ module SiSU_DAL
@@fns=nil
def initialize(opt,fnx=nil)
@opt,@fnx=opt,fnx
- @@fns||@opt.fns
- @make_fns=if @fnx and @fnx =~/\.ss[tmi]$/
- SiSU_Env::InfoFile.new(@fnx)
+ @@fns ||=opt.fns
+ fn_use=if fnx \
+ and fnx =~/\.ss[tmi]$/
+ fnx
+ elsif opt.fns =~/\.ssm$/
+ opt.fns + '.sst'
else
- SiSU_Env::InfoFile.new(@opt.fns)
+ opt.fns
end
+ @make_fns=SiSU_Env::InfoFile.new(fn_use)
@fnm=@make_fns.marshal.dal_metadata
@fnc=@make_fns.marshal.dal_content
@idx_sst=@make_fns.marshal.dal_idx_sst_rel_html_seg
diff --git a/lib/sisu/v4/db_import.rb b/lib/sisu/v4/db_import.rb
index 7a5b4fb6..199d4efa 100644
--- a/lib/sisu/v4/db_import.rb
+++ b/lib/sisu/v4/db_import.rb
@@ -84,7 +84,6 @@ module SiSU_DbImport
@md=SiSU_Param::Parameters.new(@opt).get
@md.fnb
end
- @suffix=@opt.fns[/(?:.+?)(?:\.ssm\.sst|\.-?sst)/,1]
@fnc="#{@dal}/#{@opt.fns}.content.rbm"
@@seg,@@seg_full='','' #create? consider placing field just before clean text as opposed to seg which contains seg(.html) name info seg_full would contain seg info for levels 5 & 6 where available eg seg_full may be 7.3 (level 5) and 7.3.1 (level 6) where seg is 7
@col=Hash.new('')