From 3a263de6877c27071c2a6f3389b6eaf5c2455ede Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Feb 2011 13:19:16 -0500 Subject: sysenv, sisurc.yml & elsewhere as affected, output_dir_structure (conf & tests) * (by_language_code; by_filetype; by_filename) --- CHANGELOG_v3 | 9 ++- conf/sisu/v3/sisurc.yml | 25 +++--- data/doc/sisu/v3/CHANGELOG | 9 ++- lib/sisu/v3/git.rb | 2 +- lib/sisu/v3/html.rb | 4 +- lib/sisu/v3/html_format.rb | 12 +-- lib/sisu/v3/manifest.rb | 4 +- lib/sisu/v3/sysenv.rb | 185 ++++++++++++++++++++++++++------------------- lib/sisu/v3/texpdf.rb | 12 +-- 9 files changed, 153 insertions(+), 109 deletions(-) diff --git a/CHANGELOG_v3 b/CHANGELOG_v3 index c860a538..29b944c3 100644 --- a/CHANGELOG_v3 +++ b/CHANGELOG_v3 @@ -19,6 +19,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.1.orig.tar.gz sisu_3.0.1-1.dsc sisu_3.0.1-1.debian.tar.gz + * sysenv, sisurc.yml and elsewhere as affected, output_dir_structure: + by_language_code; by_filetype; by_filename + * console feedback on selected files being processed, updates & fixes * sysenv & sisurc.yml: libreoffice, default odf reader @@ -87,9 +90,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.0.orig.tar.gz ├── rnc ├── rng └── xsd - [FIX todo: - * post rsync, - * output url paths, + [FIX todo: + * post rsync, + * output url paths, * also processing of url, * processing of sisupod, * search db?, diff --git a/conf/sisu/v3/sisurc.yml b/conf/sisu/v3/sisurc.yml index aedb2a95..f250b71d 100644 --- a/conf/sisu/v3/sisurc.yml +++ b/conf/sisu/v3/sisurc.yml @@ -94,16 +94,21 @@ default: # ocn: true #plaintext: # ocn: true -#% output_strucure: by_language: and/or by_filetype: (else default "bundled" -#output) possible values ~, true, false, (default where not set, false), -#output_structure: by_language: (language code directories with filetype -#subdirectories); by_filetype: (filetype directories output_structure) the -#previous default was by_language: false by_filetype: false. Note that where -#by_language is true, by_filetype is (forced) true. If e.g. using po4a -#by_langauge should be used and set true: -output_structure: - by_language: true - by_filetype: true + +#% output_dir_structure_by: language (language_and_filetype); filetype; or filename (original v1 & v2) +output_dir_structure_by: language + +##% output_strucure: by_language: and/or by_filetype: (else default "bundled" +##output) possible values ~, true, false, (default where not set, false), +##output_structure: by_language: (language code directories with filetype +##subdirectories); by_filetype: (filetype directories output_structure) the +##previous default was by_language: false by_filetype: false. Note that where +##by_language is true, by_filetype is (forced) true. If e.g. using po4a +##by_langauge should be used and set true: +#output_structure: +# by_language: true +# by_filetype: true + #% possible values ~, true, false, or command instruction e.g. editor: 'gvim -c #:R -c :S'. will only ignore if value set to false, absence or nil will not #remove program as should operate without rc file ie in case of ~ will ignore diff --git a/data/doc/sisu/v3/CHANGELOG b/data/doc/sisu/v3/CHANGELOG index 142b53a4..268733fe 100644 --- a/data/doc/sisu/v3/CHANGELOG +++ b/data/doc/sisu/v3/CHANGELOG @@ -19,6 +19,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.1.orig.tar.gz sisu_3.0.1-1.dsc sisu_3.0.1-1.debian.tar.gz + * sysenv, sisurc.yml and elsewhere as affected, output_dir_structure: + by_language_code; by_filetype; by_filename + * console feedback on selected files being processed, updates & fixes * sysenv & sisurc.yml: libreoffice, default odf reader @@ -87,9 +90,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.0.orig.tar.gz ├── rnc ├── rng └── xsd - [FIX todo: - * post rsync, - * output url paths, + [FIX todo: + * post rsync, + * output url paths, * also processing of url, * processing of sisupod, * search db?, diff --git a/lib/sisu/v3/git.rb b/lib/sisu/v3/git.rb index 00cd1e67..b14645c9 100644 --- a/lib/sisu/v3/git.rb +++ b/lib/sisu/v3/git.rb @@ -71,7 +71,7 @@ module SiSU_Git unless @md.i18n[0]==l[:c] p "using: #{@md.i18n[0]} (@make: :language:); filename #{@md.fns} filename language: #{l[:c]}, mismatch" end - if @env.multilingual? + if @env.output_dir_structure.multilingual? m=/((.+?)(?:\~\w{2,3})?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss fnn,fnb,fnt=@opt.fns[m,1],@opt.fns[m,2],@opt.fns[m,3] else m=/(.+?)\.((?:-|ssm\.)?sst|ssm)$/ diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 4fc657e8..bad68cde 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -421,8 +421,8 @@ WOK p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn @file=SiSU_Env::SiSU_file.new(@md) if @md txt_obj=if seg_link=~/sisu_manifest\.html/ - man_link=if @file.by_language? \ - or @file.by_filetype? + man_link=if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? seg_link.gsub(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") else seg_link end diff --git a/lib/sisu/v3/html_format.rb b/lib/sisu/v3/html_format.rb index 15345ca0..76805234 100644 --- a/lib/sisu/v3/html_format.rb +++ b/lib/sisu/v3/html_format.rb @@ -187,8 +187,8 @@ module SiSU_HTML_Format env.widget.search_form('sisusearch',nil,nil,true) end def manifest - manifest_lnk=if @file.by_language? \ - or @file.by_filetype? + manifest_lnk=if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? "#{Xx[:html_relative1]}manifest/#{@file.base_filename.manifest}" else @file.base_filename.manifest end @@ -651,8 +651,8 @@ WOK nxt="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" if nxt=~/sisu_manifest\.html/ @file=SiSU_Env::SiSU_file.new(@md) if @md - if @file.by_language? \ - or @file.by_filetype? + if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? nxt.gsub!(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") end end @@ -713,8 +713,8 @@ WOK } if f_nxt==true if nxt =~/sisu_manifest.html/ @file=SiSU_Env::SiSU_file.new(@md) if @md - if @file.by_language? \ - or @file.by_filetype? + if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? nxt.gsub!(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") end end diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index e7fbcfa9..58b78c76 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -646,8 +646,8 @@ SiSU manifest: #{@md.title.full} #{banner_table} WOK if @env.manifest_minitoc? - if @env.by_language? \ - or @env.by_filetype? + if @env.output_dir_structure.by_language_code? \ + or @env.output_dir_structure.by_filetype? minitoc.gsub!(/