From 9de3fc4c9c20bd6c26c24ef4ed44a1d4a3a371ee Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 5 Apr 2012 15:02:47 -0400 Subject: sha256 (3.2.2) --- 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 1509ec43..b878c615 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.2.2 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.2-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.2.orig.tar.xz - sisu_3.2.2.orig.tar.xz - sisu_3.2.2-1.dsc - sisu_3.2.2-1.debian.tar.gz + 29b758af4880df9a2b3cd158400a75bcf9fbd6f5c73fd9841cfbdf39b38289c0 1681412 sisu_3.2.2.orig.tar.xz + 31fd5742603e111f7bd6258dbda3866d0aa154424cdb8e0753487aae1e2c96c5 1382 sisu_3.2.2-1.dsc + fcaa11575e82983ca3cc9b72c4affa7cc2086556cb3ea3e7a9df81f69f754ca3 294818 sisu_3.2.2-1.debian.tar.gz * v3: reporting * urls -- cgit v1.2.3 From 0e9a8b0cf4dd4b7cd6bab5f2b9b56af035320377 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 15 Apr 2012 00:20:19 -0400 Subject: v3: 3.2.3 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 b878c615..c328ee3e 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.2.3.orig.tar.xz (2012-04-15:15/7) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.3 +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.3-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.3.orig.tar.xz + sisu_3.2.3.orig.tar.xz + sisu_3.2.3-1.dsc + sisu_3.2.3-1.debian.tar.gz + %% 3.2.2.orig.tar.xz (2012-04-05:14/4) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.2 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.2-1 diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index 0b0e9d69..95f7aaf1 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.2.2 -:date_stamp: 2012w14/4 -:date: "2012-04-05" +:version: 3.2.3 +:date_stamp: 2012w15/7 +:date: "2012-04-15" :project: SiSU -- cgit v1.2.3 From 0013ec9d66de5341a419585909d722009fc33381 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 15 Apr 2012 00:26:26 -0400 Subject: v3: param, dal_syntax, document header (simple regex) substitution list * $ and curly braces are escaped (within sisu) to allow the following: @make:\n :substitute: /${linux-distro}/,'Debian' /${stable}/,'Squeeze' \ /${testing}/,'Wheezy' * changes are not made within text object types: code-blocks, tables or metadata (document headers). Marked up document remains self-referential. * Note: the substitution list must be written on a single line, without line-breaks. * [Substitutions possibility requested by Debian-live, live-manual (Ben Armstrong & Daniel Baumann)] --- data/doc/sisu/CHANGELOG_v3 | 11 ++++++++ lib/sisu/v3/dal_syntax.rb | 65 +++++++++++++++++++++++++++++++++++++++------- lib/sisu/v3/hub.rb | 2 +- lib/sisu/v3/param.rb | 20 ++++++++++++++ 4 files changed, 87 insertions(+), 11 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index c328ee3e..7c1dccca 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,17 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.3.orig.tar.xz sisu_3.2.3-1.dsc sisu_3.2.3-1.debian.tar.gz +* v3: param, dal_syntax, document header (simple regex) substitution list + added, note $ and curly braces are escaped to allow the following: + @make:\n :substitute: /${linux-distro}/,'Debian' /${stable}/,'Squeeze' \ + /${testing}/,'Wheezy' + changes are not made within text object types: code-blocks, tables or + metadata (document headers). Marked up document remains self-referential. + Note: the substitution list must be written on a single line, without + line-breaks. + [Substitutions possibility requested by Debian-live, live-manual (Ben + Armstrong & Daniel Baumann)] + %% 3.2.2.orig.tar.xz (2012-04-05:14/4) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.2 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.2-1 diff --git a/lib/sisu/v3/dal_syntax.rb b/lib/sisu/v3/dal_syntax.rb index 73bb6a64..102e44cd 100644 --- a/lib/sisu/v3/dal_syntax.rb +++ b/lib/sisu/v3/dal_syntax.rb @@ -124,6 +124,9 @@ module SiSU_DAL_Syntax @data.each do |dob| dob=breaks(dob) dob=if @md.sem_tag then sem(dob) else dob end #revisit + dob=line_actions(dob) + dob=paragraph_set(dob) + dob=substitutions(dob) dob=wordlist_italics(dob) dob=wordlist_bold(dob) dob=bodymarkup(dob) @@ -203,6 +206,57 @@ module SiSU_DAL_Syntax gsub(/^\/_\s+(.*)?\s*$/, "#{Mx[:fa_italics_o]}\\1#{Mx[:fa_italics_c]}") end + def line_actions(dob) + dob.obj=if (dob.is !=:heading \ + && dob.is !=:heading_insert \ + && dob.is !=:comment \ + && dob.is !=:meta) \ + and dob.obj =~ /^!_\s+/ + embolden(dob.obj) + elsif dob.obj =~ /^\/_\s+/ + italicise(dob.obj) + else dob.obj + end + dob + end + def paragraph_set(dob) + dob.obj=if dob.is !=:meta \ + && dob.is !=:heading \ + && dob.is !=:heading_insert \ + && dob.is !=:code \ + && dob.is !=:comment \ + && dob.is !=:table + dob.obj.gsub(/\n/m,' '). + gsub(/ \s+/m,' ') + else dob.obj + end + dob + end + def substitutions(dob) + dob=dob.dup + dob=if defined? @md.make.substitute[:match_and_replace] \ + and @md.make.substitute[:match_and_replace].class == Array + dob=if dob.is !=:meta \ + && dob.is !=:heading_insert \ + && dob.is !=:code \ + && dob.is !=:comment \ + && dob.is !=:table + if dob.obj =~/#{@md.make.substitute[:matches]}/ + @md.make.substitute[:match_and_replace].each do |x| + dob.obj=if x[:case_s]==:i + dob.obj.gsub(/#{x[:match]}/mi,x[:replace]) + else + dob.obj.gsub(/#{x[:match]}/m,x[:replace]) + end + end + end + dob + else dob + end + dob + else dob + end + end def wordlist_bold(dob) dob=dob.dup if (defined? @md.make.bold[:str] \ @@ -239,20 +293,11 @@ module SiSU_DAL_Syntax else dob.obj end else - dob.obj=if (dob.is !=:heading \ - && dob.is !=:heading_insert \ - && dob.is !=:comment \ - && dob.is !=:meta) \ - and dob.obj =~ /^!_\s+/ - embolden(dob.obj) - elsif dob.is==:heading \ + dob.obj=if dob.is==:heading \ and dob.ln.to_s =~/[7-9]/ embolden(dob.obj) else dob.obj end - if dob.obj =~ /\/_\s+/ - dob.obj=italicise(dob.obj) - end end dob end diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index 5f256314..7466efde 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -173,7 +173,7 @@ module SiSU Dir.chdir(@opt.pth) #watch env=SiSU_Env::InfoEnv.new(fns) if @req !~/(?:urls|remote)$/ - if @opt.cmd.inspect =~/-P/\ + if @opt.cmd.inspect =~/-P/ \ and @req =~ /^po4a$/ require_relative 'composite' # composite.rb #pre-processing SiSU_Po4a::Source.new(@opt).read # -P po4a.rb diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 5563f780..60f5345b 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -803,6 +803,26 @@ module SiSU_Param else nil end end + def substitute + m=@h['substitute'] + z=if m + w=m.scan(/\/(.+?)\/(i?,)\s*'(.+?)'(?:\s+|\s*;\s*|$)/) + arr_hash=[] + matches='' + w.each do |x| + c=(x[1] =~/[i],/) ? :i : :s + matches=matches + x[0].gsub(/([${}])/,'\\\\\1') + '|' + arr_hash << { + match: x[0].gsub(/([${}])/,'\\\\\1'), + replace: x[2], + case_s: c + } + end + matches.chop! + { match_and_replace: arr_hash, matches: matches } + else nil + end + end def plaintext_wrap if @h['plaintext_wrap'].to_s =~/\d\d+/ \ and @h['plaintext_wrap'].to_i > 19 \ -- cgit v1.2.3 From 8fefa22fe8f15a2f4a92304763427a68beb170c7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 15 Apr 2012 00:34:31 -0400 Subject: v3: vim syntax highlighting, document header added (@make:) :substitute: --- data/doc/sisu/CHANGELOG_v3 | 3 +++ data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 7c1dccca..dc52f514 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -32,6 +32,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.3.orig.tar.xz [Substitutions possibility requested by Debian-live, live-manual (Ben Armstrong & Daniel Baumann)] +* v3: vim syntax highlighting, document header added :substitute: (under + @make:) + %% 3.2.2.orig.tar.xz (2012-04-05:14/4) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.2 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.2-1 diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim index 71d72d3a..5176d79d 100644 --- a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,7 +1,7 @@ " SiSU Vim syntax file " SiSU Maintainer: Ralph Amissah -" SiSU Markup: SiSU (sisu-3.2.0) -" Last Change: 2012-03-06 +" SiSU Markup: SiSU (sisu-3.2.3) +" Last Change: 2012-04-15 " URL: "(originally looked at Ruby Vim by Mirko Nasato) @@ -46,7 +46,7 @@ if !exists("sisu_no_identifiers") syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" - syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|substitute\|omit\|plaintext_wrap\|texpdf_font_mono\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" syn match sisu_sub_header_notes "^\s\+:\(abstract\|comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" "% "semantic markers: (ignore) -- cgit v1.2.3