From 4a239cf62c63ddceaa2d95bf61e64400879125d3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 11 Nov 2011 00:14:43 -0500 Subject: sha256 (3.1.4) --- 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 c0955475..63a4c15a 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.4 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.4-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.4.orig.tar.xz - sisu_3.1.4.orig.tar.xz - sisu_3.1.4-1.dsc - sisu_3.1.4-1.debian.tar.gz + 536fc573d83a7c29a2e2fab8ab3fbfeb991503274c8d0816e62fd63b9b22a03e 1644396 sisu_3.1.4.orig.tar.xz + 38366715cc44073cd63e7d75b68d17c04fc9ae7503e59ee02953990b6906aa18 1382 sisu_3.1.4-1.dsc + 5cda46a831865ade0960707d55bdcb97ab2dea7e5b2a573747f31a804308d4be 289700 sisu_3.1.4-1.debian.tar.gz * FileUtils, make more consistent (and explicit) use of * explicit calls (more verbose, easier to find) -- cgit v1.2.3 From b80f7bea09988bebce4a40dc63d69606505cdc9f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Nov 2011 00:02:01 -0500 Subject: v3: 3.1.5 version & changelog "opened" --- data/doc/sisu/CHANGELOG_v3 | 8 ++++++++ data/sisu/v3/v/version.yml | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 63a4c15a..5bd188a9 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.5.orig.tar.xz (2011-11-21:47/1) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.5 +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.5-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.5.orig.tar.xz + sisu_3.1.5.orig.tar.xz + sisu_3.1.5-1.dsc + sisu_3.1.5-1.debian.tar.gz + %% 3.1.4.orig.tar.xz (2011-11-11:45/5) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.4 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.4-1 diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index b96ebc8e..b225a99a 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.1.4 -:date_stamp: 2011w45/5 -:date: "2011-11-11" +:version: 3.1.5 +:date_stamp: 2011w47/1 +:date: "2011-11-21" :project: SiSU -- cgit v1.2.3 From b5c036a6cc00ed4c507d93efd2e2e2053c9786f3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Nov 2011 00:06:15 -0500 Subject: v3: dal_expand_insertions, link shortcut for sisu documents, omit codeblocks --- data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v3/dal_expand_insertions.rb | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 5bd188a9..cc6b805f 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.5.orig.tar.xz sisu_3.1.5-1.dsc sisu_3.1.5-1.debian.tar.gz + * dal_expand_insertions, link shortcut for multiple versions of sisu document, + omit codeblocks + %% 3.1.4.orig.tar.xz (2011-11-11:45/5) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.4 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.4-1 diff --git a/lib/sisu/v3/dal_expand_insertions.rb b/lib/sisu/v3/dal_expand_insertions.rb index cef75432..cfd8fe54 100644 --- a/lib/sisu/v3/dal_expand_insertions.rb +++ b/lib/sisu/v3/dal_expand_insertions.rb @@ -258,8 +258,16 @@ module SiSU_insertions def expand_insertions? data=@data tuned_file,tuned_file_tmp=[],[] + codeblock_=false data.each do |para| + codeblock_=if para =~/^code\{/ + true + elsif para =~/^\}code/ + false + else codeblock_ + end if para !~/^%+\s/ \ + and not codeblock_ \ and para =~/\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.ss[tm]\b)/ txt,cmd,source,linked_doc,note,manifest=nil,nil,nil,nil,nil,nil @u=SiSU_Env::Info_env.new.url -- cgit v1.2.3 From ecd91fe8f79639f2bd3e9a4ec229392108071326 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Nov 2011 00:07:56 -0500 Subject: v3: sisu manual, sisu markup, e.g. of link shortcut for multiple sisu documents --- data/doc/sisu/CHANGELOG_v3 | 3 +++ .../sisu/markup-samples/sisu_manual/sisu_markup.sst | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index cc6b805f..2baf851e 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -24,6 +24,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.5.orig.tar.xz * dal_expand_insertions, link shortcut for multiple versions of sisu document, omit codeblocks + * sisu manual, sisu markup, include example of: link shortcut for multiple + versions of a sisu document in the same directory tree + %% 3.1.4.orig.tar.xz (2011-11-11:45/5) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.1.4 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.1.4-1 diff --git a/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst b/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst index 046b1f2b..62cf013e 100644 --- a/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst +++ b/data/doc/sisu/markup-samples/sisu_manual/sisu_markup.sst @@ -28,7 +28,7 @@ :num_top: 1 :breaks: new=C; break=1 :skin: skin_sisu_manual - :bold: /Gnu|Debian|Ruby|SiSU/ + :bold: /Gnu|Debian|Ruby|SiSU/i @links: { SiSU Homepage }http://www.sisudoc.org/ @@ -694,6 +694,23 @@ text marker *~name note at a heading level the same is automatically achieved by providing names to headings 1, 2 and 3 i.e. 2~[name] and 3~[name] or in the case of auto-heading numbering, without further intervention. +3~ Link shortcut for multiple versions of a sisu document in the same directory tree + +!_ markup example: + +code{ + +!_ /{"Viral Spiral"}/, David Bollier + +{ "Viral Spiral", David Bollier [3sS]}viral_spiral.david_bollier.sst + +}code + + +!_ /{"Viral Spiral"}/, David Bollier + +{ "Viral Spiral", David Bollier [3sS]}viral_spiral.david_bollier.sst + 2~ Grouped Text 3~ Tables -- cgit v1.2.3 From b19886a01a945ea846f51956ec201f9f32e1eca5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Nov 2011 00:11:52 -0500 Subject: v3: param, sisupod_make, sisu markup embedded symbol images regex, case added --- data/doc/sisu/CHANGELOG_v3 | 4 ++++ lib/sisu/v3/dal_syntax.rb | 2 +- lib/sisu/v3/param.rb | 3 ++- lib/sisu/v3/sisupod_make.rb | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 2baf851e..4943a61d 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.5.orig.tar.xz sisu_3.1.5-1.dsc sisu_3.1.5-1.debian.tar.gz + * images, embedded symbol (previously overlooked, pre use of utf-8) + * param, sisu markup image regex match + * sisupod, sisu markup image regex match + * dal_expand_insertions, link shortcut for multiple versions of sisu document, omit codeblocks diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb index 3a943b75..e51316ed 100644 --- a/lib/sisu/v3/dal_syntax.rb +++ b/lib/sisu/v3/dal_syntax.rb @@ -342,7 +342,7 @@ module SiSU_Syntax end end dob.obj.gsub!(/<(https?:\/\/\S+?)>/,'< \1 >') #catch problem markup - dob.obj.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }http://www.jus.uio.no/sisu') #adjustment 2005w30 + dob.obj.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image') dob.obj.gsub!(//,'<:\1>') #escaped special character dob.obj.gsub!(/ /,"#{Mx[:nbsp]}") #escaped special character dob.obj.gsub!(/\\~/,"#{Mx[:gl_o]}#126#{Mx[:gl_c]}") #escaped special character diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index ef8e9389..045fd767 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -966,7 +966,7 @@ module SiSU_Param @lang_code_insert=(@opt.dir_structure_by =~/language/) \ ? '' : ".#{@opt.lng}" - @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/ + @rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m @rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/ @rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg begin @@ -1272,6 +1272,7 @@ module SiSU_Param end end end + para.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image') # embedded symbol (image) if para !~/^%+\s/ \ and para =~@rgx_image @ec[:image] << para.scan(@rgx_image).uniq diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb index b154bc1d..e4423641 100644 --- a/lib/sisu/v3/sisupod_make.rb +++ b/lib/sisu/v3/sisupod_make.rb @@ -160,8 +160,8 @@ module SiSU_Doc end @skin end - def images_extract(f,images) - rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/ + def images_extract(f,images) # consider using param info + rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m if f !~/^%+\s/ \ and f =~rgx_image images << f.scan(rgx_image).uniq @@ -183,6 +183,7 @@ module SiSU_Doc file_array.each do |f| #% work area if f !~/^%+\s/ skin << f.scan(@rgx_skin).uniq.flatten if f =~@rgx_skin + f.gsub!(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image') # embedded symbol (image) if f !~/^%+\s/ \ and f =~@rgx_image images=images_extract(f,images) -- cgit v1.2.3 From 2d9e5eca8ebd1dbe8ce3158588c69bd2d3f8750e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 21 Nov 2011 00:13:47 -0500 Subject: v3: odf:odt v1.2 * includes previously unimplemented hanging indents * done: dal, plaintext, html, epub, xhtml, xml (sax & dom), odt, pdf, sql; not done: man, info --- data/doc/sisu/CHANGELOG_v3 | 7 + lib/sisu/v3/odf.rb | 64 +++----- lib/sisu/v3/odf_format.rb | 397 ++++++++++++++++++++++++++++++--------------- 3 files changed, 294 insertions(+), 174 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 4943a61d..b6ddc8a2 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -25,6 +25,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.5.orig.tar.xz * param, sisu markup image regex match * sisupod, sisu markup image regex match + * odf v1.2 + * includes previously unimplemented hanging indents + + * hanging indent + * done: dal, plaintext, html, epub, xhtml, xml (sax & dom), odt, pdf, sql; + not done: man, info + * dal_expand_insertions, link shortcut for multiple versions of sisu document, omit codeblocks diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index 5a095ba9..b7b747ee 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -178,7 +178,7 @@ module SiSU_ODF end end @@docstart=false - dob.obj=%{#{breakpage}#{dob.obj}#{p_num}} + dob.obj=%{#{breakpage}#{dob.obj}#{p_num}} dob end def image_src(i) @@ -311,8 +311,8 @@ module SiSU_ODF %{#{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}} + and dob.indent != dob.hang + %{#{dob.obj}#{p_num}} else %{#{dob.obj}#{p_num}} end dob @@ -370,7 +370,7 @@ module SiSU_ODF def group_clean(str) str.gsub!(/&nbsp;| |#{Mx[:nbsp]}/,' ') str.gsub!(//,'>') - str.gsub!(/<(text:span text:style-name="Table_\S+?"|\/text:span)>/,'<\1>') #works, not ideal + str.gsub!(/<(text:span text:style-name="Span_\S+?"|\/text:span)>/,'<\1>') #works, not ideal str.gsub!(/#{Mx[:br_line]}/,'
') str.gsub!(/<br(?:\s+\/)?>/,'
') str @@ -568,17 +568,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 @@ -647,43 +647,15 @@ WOK end x=< - - + + #{table} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + WOK x.strip! @@ -712,10 +684,14 @@ WOK def odf #%odf output env=SiSU_Env::SiSU_file.new(@md) env.mkdir - header=SiSU_ODF_format::ODT_head_1_0.new(@md) + header=SiSU_ODF_format::ODT_head_1_2.new(@md) + filename="#{@env.processing_path.odt}/manifest.rdf" + od=File.new(filename,'w+') + od << header.manifest_rdf + od.close filename="#{@env.processing_path.odt}/META-INF/manifest.xml" od=File.new(filename,'w+') - od << header.meta_inf_manifest_xml + od << header.meta_inf_manifest_xml(@md) od.close filename="#{@env.processing_path.odt}/meta.xml" od=File.new(filename,'w+') diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index 5abf5090..5ffe458e 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+)/,'') @@ -200,25 +200,60 @@ module SiSU_ODF_format @dob end end - class ODT_head_1_0 + class ODT_head_1_2 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 + def manifest_rdf + x=< + + + + + + + + + + + + + + + + + +WOK + x.strip! + x.gsub!(/\n+/m,'') unless @md.opt.cmd=~/M/ + x + end + def meta_inf_manifest_xml(md) + images=[' '] + if md.ec[:image].length > 0 + md.ec[:image].each do |i| + images<<< +WOK + end + end + images=images.join('') x=< - - - - - - + + + + #{images} - - + + + + + WOK x.strip! @@ -228,7 +263,7 @@ WOK def meta_xml x=< - + #{@generator} #{@md.generated} @@ -244,77 +279,98 @@ WOK def settings_xml x=< - + 0 0 - 21459 - 22068 + 0 + 0 true false view2 - 3002 - 11008 + 0 + 0 0 0 - 21458 - 22066 + 0 + 0 0 + 2 + true 100 false - true - false - 1 - false + true + false + false + true + true + false + true + false + false + + false + false + false + true + true 0 - false - false + false + false + false + false + true + false + false + false + false + true + true false false - true - - true - true - true - - 0 - false true + false true + false + high-resolution + 1 + 0 + true + + + false + true + + false + true + false true - true + false + true false - false - false - true - - - false - true - false - false - true - false - false + true + true + false true + true true + false + false + + false 0 - false - false - high-resolution - false - true - - true - false + false + false + true + true @@ -326,9 +382,9 @@ WOK def styles_xml x=< - + - + @@ -336,15 +392,15 @@ WOK - + - + - + @@ -353,89 +409,170 @@ WOK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + - + - + WOK -- cgit v1.2.3