diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-05-23 22:05:51 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-05-23 22:15:23 -0400 |
commit | 3a07ef3ca212b8858454c84f5bfbf8473c8830e1 (patch) | |
tree | 57041b20082552e105bd40e2709d8f8b20dede7a | |
parent | v3: html, close files; syslink index.html to toc.html (diff) |
v3: options, include markup source "base" path
* used to parse alternative markup source dir structures
-rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 3 | ||||
-rw-r--r-- | lib/sisu/v3/options.rb | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index a3252781..75cbf5d8 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -39,6 +39,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.10.orig.tar.gz * language name matching ('Portuguese Brazil') * indentation + * options, include markup source "base" path, used to parse alternative + markup source dir structures + * manifest * relative paths to "available outputs" (for each dir structure), fix * show language versions published diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index aabbd946..e57bf7fa 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -60,14 +60,17 @@ module SiSU_commandline require "pathname" require_relative 'sysenv' # sysenv.rb + @@base_path=nil class Options - attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what + attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:base_path,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what def initialize(a) @x=a - @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng='','','','','','','','','','' + @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@base_path='','','','','','','','','','','' @f_pths,@files,@paths,@mod,@act=Array.new(5){[]} @env=SiSU_Env::Info_env.new @dir_structure_by=SiSU_Env::Env_call.new.output_dir_structure.by? + @@base_path ||=Dir.pwd + @base_path=@@base_path r=Px[:lng_lst].join('|') r.gsub!(/\|en\|/,'|') @lang_regx=%r{(?:#{r})} |