From 8c11f3255ca7520d321d67d10144feeb79e01f62 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 2 Nov 2013 22:29:05 -0400 Subject: v4 v5: version & changelog --- data/doc/sisu/CHANGELOG_v4 | 7 +++++++ data/doc/sisu/CHANGELOG_v5 | 7 +++++++ data/sisu/v4/v/version.yml | 6 +++--- data/sisu/v5/v/version.yml | 6 +++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index a5caddc3..7d1e6ce8 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.2.10.orig.tar.xz (2013-11-02:43/6) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.10 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.10-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.10.orig.tar.xz + sisu_4.2.10.orig.tar.xz + sisu_4.2.10-1.dsc + %% 4.2.9.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.9 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.9-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index dcf26372..2fd9286a 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -23,6 +23,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 5.0.23.orig.tar.xz (2013-11-02:43/6) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.23 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.23-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.23.orig.tar.xz + sisu_5.0.23.orig.tar.xz + sisu_5.0.23-1.dsc + %% 5.0.22.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.22 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.22-1 diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index de25951e..77eee8b8 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.2.9 -:date_stamp: 2013w42/7 -:date: "2013-10-27" +:version: 4.2.10 +:date_stamp: 2013w43/6 +:date: "2013-11-02" :project: SiSU diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index e21a2898..c738413a 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 5.0.22 -:date_stamp: 2013w42/7 -:date: "2013-10-27" +:version: 5.0.23 +:date_stamp: 2013w43/6 +:date: "2013-11-02" :project: SiSU -- cgit v1.2.3 From a89fd60f2b523d3ba26b1a2e198eacf6304e2729 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 2 Nov 2013 22:55:29 -0400 Subject: =?UTF-8?q?v4=20v5:=20constants,=20ocn=20output=20delimiter=20(whe?= =?UTF-8?q?re=20used)=20changed=20to=20=E3=80=8C...=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/doc/sisu/CHANGELOG_v4 | 3 +++ data/doc/sisu/CHANGELOG_v5 | 3 +++ lib/sisu/v4/constants.rb | 1 + lib/sisu/v4/odf_format.rb | 4 ++-- lib/sisu/v5/constants.rb | 1 + lib/sisu/v5/manifest.rb | 7 +------ lib/sisu/v5/odf.rb | 9 +++++---- lib/sisu/v5/odf_format.rb | 4 ++-- lib/sisu/v5/plaintext_format.rb | 14 +------------- lib/sisu/v5/sysenv.rb | 8 ++++---- 10 files changed, 23 insertions(+), 31 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 7d1e6ce8..c81106e5 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.2.10.orig.tar.xz sisu_4.2.10.orig.tar.xz sisu_4.2.10-1.dsc +* constants, ocn output delimiter (where used) changed to 「...」 + (from square brackets [...]) + %% 4.2.9.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.9 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.9-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 2fd9286a..7d6fa055 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.23.orig.tar.xz sisu_5.0.23.orig.tar.xz sisu_5.0.23-1.dsc +* constants, ocn output delimiter (where used) changed to 「...」 + (from square brackets [...]) + %% 5.0.22.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.22 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.22-1 diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb index 478b7277..f95b1dbd 100644 --- a/lib/sisu/v4/constants.rb +++ b/lib/sisu/v4/constants.rb @@ -176,6 +176,7 @@ Rx={ meta: /#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}/, } Dx={ + ocn_o: '「', ocn_c: '」', url_o: '‹', url_c: '›', url_o_xml: '<', url_c_xml: '>', rel_o: '‹', rel_c: '›', diff --git a/lib/sisu/v4/odf_format.rb b/lib/sisu/v4/odf_format.rb index 348ebb62..79f68478 100644 --- a/lib/sisu/v4/odf_format.rb +++ b/lib/sisu/v4/odf_format.rb @@ -69,12 +69,12 @@ module SiSU_ODF_Format end def set_ref_and_display set_ref=@paranum.gsub(/(\d+)/,' ') - disp=@paranum.gsub(/(\d+)/,' [\1]') + disp=@paranum.gsub(/(\d+)/,%{ #{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}}) { display: disp, set_ref: set_ref } end def set_bookmark_and_display set_ref=@paranum.gsub(/(\d+)/,' ') - disp=@paranum.gsub(/(\d+)/,' [\1]') + disp=@paranum.gsub(/(\d+)/,%{ #{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}}) { display: disp, set_ref: set_ref } end def name diff --git a/lib/sisu/v5/constants.rb b/lib/sisu/v5/constants.rb index d89a391a..26130506 100644 --- a/lib/sisu/v5/constants.rb +++ b/lib/sisu/v5/constants.rb @@ -176,6 +176,7 @@ Rx={ meta: /#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}/, } Dx={ + ocn_o: '「', ocn_c: '」', url_o: '‹', url_c: '›', url_o_xml: '<', url_c_xml: '>', rel_o: '‹', rel_c: '›', diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb index 071959c7..3d6a5835 100644 --- a/lib/sisu/v5/manifest.rb +++ b/lib/sisu/v5/manifest.rb @@ -418,12 +418,7 @@ module SiSU_Manifest summarize(id,file,pth,rel,url) end if FileTest.file?(@f.place_file.txt.dir)==true - id=if @md.opt.cmd =~/a/ then 'Plaintext (Unix (UTF-8) with footnotes)' - elsif @md.opt.cmd =~/e/ then 'Plaintext (Unix (UTF-8) with endnotes)' - elsif @md.opt.cmd =~/A/ then 'Plaintext (dos (UTF-8) with footnotes)' - elsif @md.opt.cmd =~/E/ then 'Plaintext (dos (UTF-8) with endnotes)' - else 'Plaintext (UTF-8)' - end + id='Plaintext (UTF-8)' pth=@f.output_path.txt.dir rel=@f.output_path.txt.rel_sm url=@f.output_path.txt.url diff --git a/lib/sisu/v5/odf.rb b/lib/sisu/v5/odf.rb index ae9a09ec..5e277992 100644 --- a/lib/sisu/v5/odf.rb +++ b/lib/sisu/v5/odf.rb @@ -548,10 +548,11 @@ module SiSU_ODF end p_num={ display: '', set_ref: '' } if dob.is !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ - if defined? dob.ocn \ - and dob.ocn.is_a?(Fixnum) - p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_bookmark_and_display - #p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_ref_and_display + if @env.odt_ocn? + if defined? dob.ocn \ + and dob.ocn.is_a?(Fixnum) + p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).set_bookmark_and_display + end end end if dob.is==:heading diff --git a/lib/sisu/v5/odf_format.rb b/lib/sisu/v5/odf_format.rb index d3630df9..28c69c44 100644 --- a/lib/sisu/v5/odf_format.rb +++ b/lib/sisu/v5/odf_format.rb @@ -69,12 +69,12 @@ module SiSU_ODF_Format end def set_ref_and_display set_ref=@paranum.gsub(/(\d+)/,' ') - disp=@paranum.gsub(/(\d+)/,' [\1]') + disp=@paranum.gsub(/(\d+)/,%{ #{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}}) { display: disp, set_ref: set_ref } end def set_bookmark_and_display set_ref=@paranum.gsub(/(\d+)/,' ') - disp=@paranum.gsub(/(\d+)/,' [\1]') + disp=@paranum.gsub(/(\d+)/,%{ #{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}}) { display: disp, set_ref: set_ref } end def name diff --git a/lib/sisu/v5/plaintext_format.rb b/lib/sisu/v5/plaintext_format.rb index 092e69f6..acad8828 100644 --- a/lib/sisu/v5/plaintext_format.rb +++ b/lib/sisu/v5/plaintext_format.rb @@ -68,7 +68,7 @@ module SiSU_Plaintext_Format @paranum=/(\d+)/m.match(paranum.to_s)[1] end def display - @paranum.gsub(/(\d+)/,"\n[\\1]") + @paranum.gsub(/(\d+)/,"\n#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}") end def name #unused @paranum.gsub(/(\d+)/,'\1') @@ -97,18 +97,6 @@ module SiSU_Plaintext_Format def scr_endnote_body "#{@txt} " end - def heading_body1 - end - def heading_body2 - end - def heading_body3 - end - def heading_body4 - end - def heading_body5 - end - def heading_body6 - end end class XML end diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index b23b7f80..f1076c68 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1474,15 +1474,15 @@ module SiSU_Env end def odt_ocn? ((defined? @rc['odt']['ocn']) \ - && @rc['odt']['ocn']==true) \ + && @rc['odt']['ocn']==false) \ ? @rc['odt']['ocn'] - : false + : true end def plaintext_ocn? ((defined? @rc['plaintext']['ocn']) \ - && @rc['plaintext']['ocn']==true) \ + && @rc['plaintext']['ocn']==false) \ ? @rc['plaintext']['ocn'] - : false + : true end def widget #needs (md) #move @rc=SiSU_Env::GetInit.new.sisu_yaml.rc -- cgit v1.2.3 From 89cc9097cfad4241433b2133a89fc02fd1b02936 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 2 Nov 2013 22:57:23 -0400 Subject: v5: plaintext, reorganize --- data/doc/sisu/CHANGELOG_v5 | 3 + lib/sisu/v5/plaintext.rb | 180 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 163 insertions(+), 20 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 7d6fa055..b79254bc 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -33,6 +33,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.23.orig.tar.xz * constants, ocn output delimiter (where used) changed to 「...」 (from square brackets [...]) +* plaintext + * reorganize + %% 5.0.22.orig.tar.xz (2013-10-27:42/7) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.22 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.22-1 diff --git a/lib/sisu/v5/plaintext.rb b/lib/sisu/v5/plaintext.rb index f7c40d7a..b82013aa 100644 --- a/lib/sisu/v5/plaintext.rb +++ b/lib/sisu/v5/plaintext.rb @@ -218,6 +218,129 @@ at: * SiSU #{vz.url_sisu} WOK end + def decorate + def heading_underscore + def l1 + '*' + end + def l2 + '=' + end + def l3 + '~' + end + def l4 + '-' + end + def l5 + '.' + end + def l6 + '.' + end + self + end + def bold + def open + '*' + end + def close + '*' + end + self + end + def italics + def open + '/' + end + def close + '/' + end + self + end + def underscore + def open + '_' + end + def close + '_' + end + self + end + #def emphasis + # def open + # '' + # end + # def close + # '' + # end + # self + #end + def cite + def open + '"' + end + def close + '"' + end + self + end + def insert + def open + '+' + end + def close + '+' + end + self + end + def strike + def open + '-' + end + def close + '-' + end + self + end + def superscript + def open + '^' + end + def close + '^' + end + self + end + def subscript + def open + '[' + end + def close + ']' + end + self + end + def hilite + def open + '*' + end + def close + '*' + end + self + end + def monospace + def open + '#' + end + def close + '#' + end + self + end + self + end def plaintext_structure(dob='',p_num='') #% Used to extract the structure of a document lv=n=n3=nil if dob.is==:heading @@ -253,12 +376,12 @@ WOK times=wrapped.length times=@wrap_width if times > @wrap_width @plaintext[:body] << case lv - when 1; wrapped.upcase << @br << Px[:lv1]*times + p_num << @br*2 - when 2; wrapped.upcase << @br << Px[:lv2]*times + p_num << @br*2 - when 3; wrapped.upcase << @br << Px[:lv3]*times + p_num << @br*2 - when 4; wrapped.upcase << @br << Px[:lv4]*times + p_num << @br*2 - when 5; wrapped.upcase << @br << Px[:lv5]*times + p_num << @br*2 - when 6; wrapped.upcase << @br << Px[:lv6]*times + p_num << @br*2 + when 1; wrapped.upcase << @br << decorate.heading_underscore.l1*times + p_num << @br*2 + when 2; wrapped.upcase << @br << decorate.heading_underscore.l2*times + p_num << @br*2 + when 3; wrapped.upcase << @br << decorate.heading_underscore.l3*times + p_num << @br*2 + when 4; wrapped.upcase << @br << decorate.heading_underscore.l4*times + p_num << @br*2 + when 5; wrapped.upcase << @br << decorate.heading_underscore.l5*times + p_num << @br*2 + when 6; wrapped.upcase << @br << decorate.heading_underscore.l6*times + p_num << @br*2 end else @plaintext[:body] << wrapped + p_num << @br # main text, contents, body KEEP @@ -283,23 +406,23 @@ WOK dob.obj=dob.obj.gsub(/#{Mx[:gr_o]}Th?#{Mx[:tc_p]}.+/um,"#{@br}#{table_message}"). #fix gsub(/.+?#{Mx[:gl_o]}-##{Mx[:gl_c]}/,''). # remove dummy headings (used by html) #check also [~-]# gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/, - "#{Px[:bold_o]}\\1#{Px[:bold_c]}"). + "#{decorate.bold.open}\\1#{decorate.bold.close}"). gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/, - "#{Px[:italics_o]}\\1#{Px[:italics_c]}"). + "#{decorate.italics.open}\\1#{decorate.italics.close}"). gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/, - "#{Px[:underscore_o]}\\1#{Px[:underscore_c]}"). + "#{decorate.underscore.open}\\1#{decorate.underscore.close}"). gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/, - "#{Px[:subscript_o]}\\1#{Px[:subscript_c]}"). + "#{decorate.subscript.open}\\1#{decorate.subscript.close}"). gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/, - "#{Px[:superscript_o]}\\1#{Px[:superscript_c]}"). + "#{decorate.superscript.open}\\1#{decorate.superscript.close}"). gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/, - "#{Px[:insert_o]}\\1#{Px[:insert_c]}"). + "#{decorate.insert.open}\\1#{decorate.insert.close}"). gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/, - "#{Px[:cite_o]}\\1#{Px[:cite_c]}"). + "#{decorate.cite.open}\\1#{decorate.cite.close}"). gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/, - "#{Px[:strike_o]}\\1#{Px[:strike_c]}"). + "#{decorate.strike.open}\\1#{decorate.strike.close}"). gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/, - "#{Px[:monospace_o]}\\1#{Px[:monospace_c]}") + "#{decorate.monospace.open}\\1#{decorate.monospace.close}") unless dob.is==:code dob.obj=dob.obj.gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1'). gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1'). @@ -341,10 +464,6 @@ WOK gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]'). gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]') if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ - #if defined? dob.ocn and dob.ocn.to_s =~/\d+/ - # paranum=dob.ocn.to_s - # @p_num=SiSU_Plaintext_Format::ParagraphNumber.new(paranum) - #end p_num='' if @env.plaintext_ocn? if defined? dob.ocn \ @@ -431,4 +550,25 @@ WOK end end __END__ -!\|#\|&*\|-\|/\|_\|{\|}\|~\|&# + bold_o: '*', bold_c: '*', + #bold_o: '!', bold_c: '!', + #emphasis_o: '*', emphasis_c: '*', + italics_o: '/', italics_c: '/', + underscore_o: '_', underscore_c: '_', + cite_o: '"', cite_c: '"', + insert_o: '+', insert_c: '+', + strike_o: '-', strike_c: '-', + superscript_o: '^', superscript_c: '^', + subscript_o: '[', subscript_c: ']', + hilite_o: '*', hilite_c: '*', + monospace_o: '', monospace_c: '', + po_bold_o: '!{', po_bold_c: '}!', + po_italics_o: '/{', po_italics_c: '}/', + po_underscore_o: '_{', po_underscore_c: '}_', + po_cite_o: '"{', po_cite_c: '}"', + po_insert_o: '+{', po_insert_c: '}+', + po_strike_o: '-{', po_strike_c: '}-', + po_superscript_o: '^{', po_superscript_c: '}^', + po_subscript_o: ',{', po_subscript_c: '},', + po_hilite_o: '*{', po_hilite_c: '}*', + po_monospace_o: '#{', po_monospace_c: '}#', -- cgit v1.2.3