From 0dad10b285fac297395d4382cda03a12dacf50a4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 3 Oct 2011 21:39:31 -0400 Subject: sha256 (3.1.0) --- data/doc/sisu/CHANGELOG_v3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 8c9faace..7bb79dfe 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -17,9 +17,9 @@ v3 branch once stable will supersede & replace current stable v2 branch http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.0 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.0-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.0.orig.tar.xz - sisu_3.1.0.orig.tar.xz - sisu_3.1.0-1.dsc - sisu_3.1.0-1.debian.tar.gz + eed0a01904037a0b6b4e8776a94ce4332e68510b28fe6f06139c960cef5d0020 1182984 sisu_3.1.0.orig.tar.xz + 5d23dc3bd703f62e5a7ae21f7020a7d3d5a4a32affddbdecc7142f75d56d1a5b 1382 sisu_3.1.0-1.dsc + 5a71292ab5cc1617d60591e02e99987f3b2953a9b73d06530142e304b26ccef6 289011 sisu_3.1.0-1.debian.tar.gz * bin/sisu, default sisu version 3 -- cgit v1.2.3 From a29324fc2e9d09a3c65f151720a322f2a6f1e43f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 15 Oct 2011 13:54:06 -0400 Subject: v2 v3: 3.1.1 version & changelog "opened" --- data/doc/sisu/CHANGELOG_v2 | 4 ++++ data/doc/sisu/CHANGELOG_v3 | 8 ++++++++ data/sisu/v2/v/version.yml | 4 ++-- data/sisu/v3/v/version.yml | 6 +++--- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2 index eab6996e..4d8064d4 100644 --- a/data/doc/sisu/CHANGELOG_v2 +++ b/data/doc/sisu/CHANGELOG_v2 @@ -12,6 +12,10 @@ Reverse Chronological: %% STABLE Branch +%% 2.9.10 (2011-10-15:41/6) [see 3.1.1.orig.tar.xz] +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.1 +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.1-1 + %% 2.9.9 (2011-10-03:40/1) [see 3.1.0.orig.tar.xz] http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.0 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.0-1 diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 7bb79dfe..601ae628 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -13,6 +13,14 @@ Reverse Chronological: %% Development branch UNSTABLE v3 branch once stable will supersede & replace current stable v2 branch +%% 3.1.1.orig.tar.xz (2011-10-15:41/6) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.1 +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.1-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.1.orig.tar.xz + sisu_3.1.1.orig.tar.xz + sisu_3.1.1-1.dsc + sisu_3.1.1-1.debian.tar.gz + %% 3.1.0.orig.tar.xz (2011-10-03:40/1) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.0 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.0-1 diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml index 62e59e16..f44e16bd 100644 --- a/data/sisu/v2/v/version.yml +++ b/data/sisu/v2/v/version.yml @@ -1,5 +1,5 @@ --- :version: 2.9.9 -:date_stamp: 2011w40/1 -:date: "2011-10-03" +:date_stamp: 2011w41/6 +:date: "2011-10-15" :project: SiSU diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index 8510a9e5..65cf8c21 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.1.0 -:date_stamp: 2011w40/1 -:date: "2011-10-03" +:version: 3.1.1 +:date_stamp: 2011w41/6 +:date: "2011-10-15" :project: SiSU -- cgit v1.2.3 From fadbc35f0ebaa4cb98798379cd714edfac513372 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 15 Oct 2011 13:55:14 -0400 Subject: v3: manifest, odt url lnk, fix --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/manifest.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 601ae628..d7f87570 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.1.orig.tar.xz sisu_3.1.1-1.dsc sisu_3.1.1-1.debian.tar.gz + * manifest, odt url lnk, fix + %% 3.1.0.orig.tar.xz (2011-10-03:40/1) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.0 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.0-1 diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index d1e01f58..c49dd0a0 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -334,7 +334,7 @@ module SiSU_Manifest img=%{ODF/ODT } pth=@f.output_path.odt.dir rel=@f.output_path.odt.rel_sm - url=@f.output_path.odf.url + url=@f.output_path.odt.url id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt summarize(id,file,pth,rel,url,img) end -- cgit v1.2.3 From 6d46257531b1384a3bff974e039b70f7a45c3ecc Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 15 Oct 2011 13:57:29 -0400 Subject: v2 v3: odf:odt v1.0: make odt header easier to track; remove binary blob * make odt header changes easier to track (this commit maintains rough equivalence to sisu-3.1.0 headers) * sysenv, builds odf:odt directory structure instead of binary blob * get rid of odf:odt (binary changeset) blob zipfile (containing odf:odt directory structure) --- data/doc/sisu/CHANGELOG_v2 | 4 + data/doc/sisu/CHANGELOG_v3 | 4 + data/sisu/v2/odf/odt.zip | Bin 5577 -> 0 bytes data/sisu/v3/odf/odt.zip | Bin 5577 -> 0 bytes lib/sisu/v2/odf.rb | 159 ++++++++++++++++------------ lib/sisu/v2/odf_format.rb | 251 +++++++++++++++++++++++++++++++++++++++++++++ lib/sisu/v2/sysenv.rb | 33 +++--- lib/sisu/v3/odf.rb | 163 +++++++++++++++++------------ lib/sisu/v3/odf_format.rb | 250 ++++++++++++++++++++++++++++++++++++++++++++ lib/sisu/v3/sysenv.rb | 25 +++-- 10 files changed, 737 insertions(+), 152 deletions(-) delete mode 100644 data/sisu/v2/odf/odt.zip delete mode 100644 data/sisu/v3/odf/odt.zip diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2 index 4d8064d4..8291cad0 100644 --- a/data/doc/sisu/CHANGELOG_v2 +++ b/data/doc/sisu/CHANGELOG_v2 @@ -16,6 +16,10 @@ Reverse Chronological: http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.1 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.1-1 + * odf:odt v1.0 + * make odt header changes easier to track + * get rid of (binary changeset) blob + %% 2.9.9 (2011-10-03:40/1) [see 3.1.0.orig.tar.xz] http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.0 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.0-1 diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index d7f87570..ba08ca73 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.1.orig.tar.xz sisu_3.1.1-1.dsc sisu_3.1.1-1.debian.tar.gz + * odf:odt v1.0 + * make odt header changes easier to track + * get rid of (binary changeset) blob + * manifest, odt url lnk, fix %% 3.1.0.orig.tar.xz (2011-10-03:40/1) diff --git a/data/sisu/v2/odf/odt.zip b/data/sisu/v2/odf/odt.zip deleted file mode 100644 index 47c6008e..00000000 Binary files a/data/sisu/v2/odf/odt.zip and /dev/null differ diff --git a/data/sisu/v3/odf/odt.zip b/data/sisu/v3/odf/odt.zip deleted file mode 100644 index 81df6e6c..00000000 Binary files a/data/sisu/v3/odf/odt.zip and /dev/null differ diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index b6ec4c1b..2880cdfe 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -81,7 +81,6 @@ module SiSU_ODF def read begin @env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array - @env.odf_structure opendoc=@md.fn[:odf] path=@env.path.output_tell unless @opt.cmd =~/q/ @@ -456,6 +455,7 @@ module SiSU_ODF def markup(data) # Used for major markup instructions safe_characters=/[^a-zA-Z0-9}{\/?,."';:)(><\-_&!@%~#\]\[*=$| \n+`#{Mx[:tc_p]}]/u dir=SiSU_Env::Info_env.new(@md.fns) + dir.path.odf_bld @data_mod,@endnotes,@level,@cont,@copen,@odf_contents_close=Array.new(6){[]} @rcdc=false (0..6).each { |x| @cont[x]=@level[x]=false } @@ -550,30 +550,35 @@ module SiSU_ODF end def pre table=if @md.flag_tables - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + x=< + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x else '' end breakpage=if @md.pagenew \ @@ -581,45 +586,50 @@ module SiSU_ODF ' fo:break-before="page"' else '' end - @@odf[:head]<<%{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{table}#{@br}} + - %{#{@br}} + - %{#{@br}} + # P1 - %{#{@br}} + # P1 - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + # P1 - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{} + x=< + + + +#{table} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + @@odf[:head] << x end def post end @@ -642,6 +652,27 @@ module SiSU_ODF end def odf #%odf output SiSU_Env::SiSU_file.new(@md).mkdir + header=SiSU_ODF_format::ODT_head.new(@md) + filename="#{@env.path.odf}/META-INF/manifest.xml" + od=File.new(filename,'w+') + od << header.meta_inf_manifest_xml + od.close + filename="#{@env.path.odf}/meta.xml" + od=File.new(filename,'w+') + od << header.meta_xml + od.close + filename="#{@env.path.odf}/settings.xml" + od=File.new(filename,'w+') + od << header.settings_xml + od.close + filename="#{@env.path.odf}/styles.xml" + od=File.new(filename,'w+') + od << header.styles_xml + od.close + filename="#{@env.path.odf}/mimetype" + od=File.new(filename,'w+') + od << header.mimetype + od.close filename="#{@env.path.odf}/content.xml" od=File.new(filename,'w+') @content.each do |para| # this is a hack diff --git a/lib/sisu/v2/odf_format.rb b/lib/sisu/v2/odf_format.rb index 77b5bbbc..1b5f2e9b 100644 --- a/lib/sisu/v2/odf_format.rb +++ b/lib/sisu/v2/odf_format.rb @@ -197,6 +197,257 @@ module SiSU_ODF_format @dob end end + class ODT_head + def initialize(md) + @md=md + @generator="#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" + end + def meta_inf_manifest_xml + x=< + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def meta_xml + x=< + + + #{@generator} + #{@md.generated} + #{@md.generated} + en-US + 4 + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def settings_xml + x=< + + + + 0 + 0 + 21459 + 22068 + true + false + + + view2 + 3002 + 11008 + 0 + 0 + 21458 + 22066 + 0 + 100 + false + + + + + true + false + 1 + false + 0 + false + false + false + false + true + + true + true + true + + 0 + false + true + true + true + true + false + false + false + true + + + + false + true + false + false + true + false + false + true + true + 0 + false + false + high-resolution + false + true + + true + false + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def styles_xml + x=< + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def mimetype + x=<<\-_&!@%~#\]\[*=$| \n+`#{Mx[:tc_p]}]/u dir=SiSU_Env::Info_env.new(@md.fns) + dir.path.odt_bld @data_mod,@endnotes,@level,@cont,@copen,@odf_contents_close=Array.new(6){[]} @rcdc=false (0..6).each { |x| @cont[x]=@level[x]=false } @@ -611,30 +611,35 @@ module SiSU_ODF end def pre table=if @md.flag_tables - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + x=< + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x else '' end breakpage=if @md.pagenew \ @@ -642,45 +647,50 @@ module SiSU_ODF ' fo:break-before="page"' else '' end - @@odf[:head]<<%{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{table}#{@br}} + - %{#{@br}} + - %{#{@br}} + # P1 - %{#{@br}} + # P1 - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + # P1 - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{#{@br}} + - %{} + x=< + + + +#{table} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + @@odf[:head] << x end def post end @@ -704,6 +714,27 @@ module SiSU_ODF def odf #%odf output env=SiSU_Env::SiSU_file.new(@md) env.mkdir + header=SiSU_ODF_format::ODT_head_1_0.new(@md) + filename="#{@env.processing_path.odt}/META-INF/manifest.xml" + od=File.new(filename,'w+') + od << header.meta_inf_manifest_xml + od.close + filename="#{@env.processing_path.odt}/meta.xml" + od=File.new(filename,'w+') + od << header.meta_xml + od.close + filename="#{@env.processing_path.odt}/settings.xml" + od=File.new(filename,'w+') + od << header.settings_xml + od.close + filename="#{@env.processing_path.odt}/styles.xml" + od=File.new(filename,'w+') + od << header.styles_xml + od.close + filename="#{@env.processing_path.odt}/mimetype" + od=File.new(filename,'w+') + od << header.mimetype + od.close env.make_path(@env.processing_path.odt) env.make_path(@md.file.output_path.odt.dir) filename="#{@env.processing_path.odt}/content.xml" @@ -714,9 +745,9 @@ module SiSU_ODF od.close opendoc=@md.fn[:odf] mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir) - if FileTest.directory?(@env.processing_path.odf) + if FileTest.directory?(@env.processing_path.odt) pwd=Dir.pwd - Dir.chdir(@env.processing_path.odf) + Dir.chdir(@env.processing_path.odt) system(" zip -qr #{opendoc} * mv #{opendoc} #{@md.file.place_file.odt.dir} diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index 8736d7d1..7a9b267d 100644 --- a/lib/sisu/v3/odf_format.rb +++ b/lib/sisu/v3/odf_format.rb @@ -200,6 +200,256 @@ module SiSU_ODF_format @dob end end + class ODT_head_1_0 + def initialize(md) + @md=md + @generator="#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" + end + def meta_inf_manifest_xml + x=< + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def meta_xml + x=< + + + #{@generator} + #{@md.generated} + #{@md.generated} + en-US + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def settings_xml + x=< + + + + 0 + 0 + 21459 + 22068 + true + false + + + view2 + 3002 + 11008 + 0 + 0 + 21458 + 22066 + 0 + 100 + false + + + + + true + false + 1 + false + 0 + false + false + false + false + true + + true + true + true + + 0 + false + true + true + true + true + false + false + false + true + + + + false + true + false + false + true + false + false + true + true + 0 + false + false + high-resolution + false + true + + true + false + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def styles_xml + x=< + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def mimetype + x=< Date: Sat, 15 Oct 2011 13:59:07 -0400 Subject: v3: odf:odt, make odt style names more easily recognizable --- data/doc/sisu/CHANGELOG_v3 | 1 + lib/sisu/v3/odf.rb | 90 +++++++++++++++++++++++----------------------- lib/sisu/v3/odf_format.rb | 32 ++++++++--------- 3 files changed, 62 insertions(+), 61 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index ba08ca73..e8d609e9 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -24,6 +24,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.1.orig.tar.xz * odf:odt v1.0 * make odt header changes easier to track * get rid of (binary changeset) blob + * make odt style names more easily recognizable * manifest, odt url lnk, fix diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index e268b873..3bd59e81 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -158,8 +158,8 @@ module SiSU_ODF url=@md.fnb fn=@md.fn[:manifest] manifest="#{@env.url.root}/#{@md.fnb}/#{@md.fn[:manifest]}" - @@odf[:tail] << %{Available document outputs:
<#{manifest}>
} - @@odf[:tail] << %{\nSiSU: <www.jus.uio.no/sisu> and <www.sisudoc.org>} + @@odf[:tail] << %{Available document outputs:
<#{manifest}>
} + @@odf[:tail] << %{\nSiSU: <www.jus.uio.no/sisu> and <www.sisudoc.org>} @@odf[:tail] << "\n
" end def heading(dob,p_num='') @@ -175,12 +175,12 @@ module SiSU_ODF unless @@docstart breakpage=if (@md.pagenew or @md.pagebreak) \ and (@md.pagenew =~ m or @md.pagebreak =~m) - ' ' + ' ' else '' end end @@docstart=false - dob.obj=%{#{breakpage}#{dob.obj}#{p_num}} + dob.obj=%{#{breakpage}#{dob.obj}#{p_num}} dob end def image_src(i) @@ -222,7 +222,7 @@ module SiSU_ODF and w.to_s =~/\d/ @@img_count +=1 %{#{c}} #anchor-type: as-char or paragraph or char or ... - else %{[image omitted]} + else %{[image omitted]} end end def image(dob) @@ -310,12 +310,12 @@ module SiSU_ODF dob.obj= if dob.is=='para' \ and dob.indent.to_s =~/[0-9]/ \ and dob.indent == dob.hang - %{#{dob.obj}#{p_num}} + %{#{dob.obj}#{p_num}} elsif dob.is=='para' \ and dob.hang.to_s =~/[0-9]/ \ and dob.indent != dob.hang # NOT yet implemented - %{#{dob.obj}#{p_num}} - else %{#{dob.obj}#{p_num}} + %{#{dob.obj}#{p_num}} + else %{#{dob.obj}#{p_num}} end dob end @@ -372,7 +372,7 @@ module SiSU_ODF def group_clean(str) str.gsub!(/&nbsp;| |#{Mx[:nbsp]}/,' ') str.gsub!(//,'>') - str.gsub!(/<(text:span text:style-name="T[1-5]"|\/text:span)>/,'<\1>') #works, not ideal + str.gsub!(/<(text:span text:style-name="Table_\S+?"|\/text:span)>/,'<\1>') #works, not ideal str.gsub!(/#{Mx[:br_line]}/,'
') str.gsub!(/<br(?:\s+\/)?>/,'
') str @@ -381,10 +381,10 @@ module SiSU_ODF parray=[] dob.obj.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/).each do |parablock| parablock=group_clean(parablock) - parray << %{#{parablock}} if parablock =~/\S+/ + parray << %{#{parablock}} if parablock =~/\S+/ end dob.obj=parray.join \ - + %{#{p_num}} \ + + %{#{p_num}} \ + '' dob end @@ -404,10 +404,10 @@ module SiSU_ODF parablock.gsub!(/<(text:p text:style-name="Footnote")>/,'<\1>') parablock.gsub!(/<(\/?text:(?:note-citation|note-body|note|p))>/,'<\1>') parablock=footnote(parablock) - parray << %{#{parablock}} if parablock =~/\S+/ + parray << %{#{parablock}} if parablock =~/\S+/ end dob.obj=parray.join \ - + %{#{p_num}} \ + + %{#{p_num}} \ + '' dob end @@ -427,10 +427,10 @@ module SiSU_ODF parablock.gsub!(/<(text:p text:style-name="Footnote")>/,'<\1>') parablock.gsub!(/<(\/?text:(?:note-citation|note-body|note|p))>/,'<\1>') parablock=footnote(parablock) - parray << %{#{parablock}} if parablock =~/\S+/ + parray << %{#{parablock}} if parablock =~/\S+/ end dob.obj=parray.join \ - + %{#{p_num}} \ + + %{#{p_num}} \ + '' dob end @@ -443,10 +443,10 @@ module SiSU_ODF parablock.gsub!(/^\s*$/,'
') parablock.gsub!(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/, '\1') #http ftp matches escaped, no decoration - parray << %{#{parablock}} if parablock =~/\S+/ + parray << %{#{parablock}} if parablock =~/\S+/ end dob.obj=parray.join \ - + %{#{p_num}} \ + + %{#{p_num}} \ + '' end dob @@ -570,17 +570,17 @@ module SiSU_ODF dob.obj.gsub!(/©/,'©') #too arbitrary dob.obj.gsub!(/.+?<-#>/,'') # remove dummy headings (used by html) #check dob.obj.gsub!(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/, - '\1') + '\1') dob.obj.gsub!(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/, - '\1') + '\1') dob.obj.gsub!(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/, - '\1') + '\1') dob.obj.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/, - '\1') + '\1') dob.obj.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/, - '\1') + '\1') dob.obj.gsub!(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/, - '\1') + '\1') dob.obj.gsub!(/­/u,'-') dob.obj.gsub!(/ /u, ' ') # space identify dob.obj.gsub!(/ /u, ' ') # space identify @@ -653,33 +653,33 @@ WOK #{table} - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index 7a9b267d..5abf5090 100644 --- a/lib/sisu/v3/odf_format.rb +++ b/lib/sisu/v3/odf_format.rb @@ -65,7 +65,7 @@ module SiSU_ODF_format @paranum=/(\d+)/m.match(paranum.to_s)[1] end def display - @paranum.gsub(/(\d+)/,' [\1]') + @paranum.gsub(/(\d+)/,' [\1]') end def name @paranum.gsub(/(\d+)/,'') @@ -142,13 +142,13 @@ module SiSU_ODF_format end def table_close(tablefoot='') '' \ - + %{#{@p_num}} + + %{#{@p_num}} end def table_tag_cell(str,i) txt_name_cell=if i==0 \ and @dob.head_ - 'Table_20_Heading' - else 'P7' + 'Table_Heading' + else 'P_table_cell' end str.gsub!(/^~$/,'') # tilde / empty cell %{#{@br}} + @@ -165,8 +165,8 @@ module SiSU_ODF_format def table_tag_row_dump(str,i) txt_name_row=if i==0 \ and @dob.head_ - 'Table_20_Heading' - else 'P7' + 'Table_Heading' + else 'P_table_cell' end %{#{@br}} + %{#{@br}} + @@ -353,29 +353,29 @@ WOK - + - + - + - + - + - + - + - + @@ -455,12 +455,12 @@ WOK @md,@t_o=md,t_o end def br_page - @t_o.obj=' ' + @t_o.obj=' ' @t_o end def obj_sep #center later sep='--- ' - @t_o.obj=%{#{sep*20}} + @t_o.obj=%{#{sep*20}} @t_o end end -- cgit v1.2.3