aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/sisu/v3/options.rb3
-rw-r--r--lib/sisu/v3/sysenv.rb9
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb
index 110ebd85..30f857f6 100644
--- a/lib/sisu/v3/options.rb
+++ b/lib/sisu/v3/options.rb
@@ -61,12 +61,13 @@ module SiSU_commandline
require "pathname"
require_relative 'sysenv' # sysenv.rb
class Options
- attr_accessor :cmd,:mod,:act,: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,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what
def initialize(a)
@a=a
@cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng='','','','','','','','','',''
@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?
r=Px[:lng_lst].join('|')
#r.gsub!(/\|en\|/,'|')
@lang_regx=%r{(?:#{r})}
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index c22f878c..6d010c76 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -440,6 +440,15 @@ module SiSU_Env
def multilingual?
by_language_code?
end
+ def by?
+ by=if by_language_code?
+ 'language'
+ elsif by_filetype?
+ 'filetype'
+ else
+ 'filename'
+ end
+ end
self
end
def document_language_versions_found #REVISIT