From 809034240a1be22cc00cb3b4c1df1dd2facdc8f8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Aug 2014 00:32:27 -0400 Subject: v5: merged v6 libraries * commandline, --act0 to --act9, rc-config with flag:act[0-9] * configurable command line options increased to 0 - 9 (instead of 0 - 5) * use --act0 to --act9 (previous flags -1 to -5; -0 to -9 now available) * default --act0 * rc config with flag:act0 to flag:act9 (previously roman numerals) * legacy roman numeral configuration works (for now) * use opt.act, code internals (simplify, cleaner; remove opt.cmd & opt.mod) * hub, further changes related to use of opt.act; hub file split --- lib/sisu/v5/dp.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v5/dp.rb') diff --git a/lib/sisu/v5/dp.rb b/lib/sisu/v5/dp.rb index 0dde14b8..ef61f6b4 100644 --- a/lib/sisu/v5/dp.rb +++ b/lib/sisu/v5/dp.rb @@ -103,8 +103,7 @@ module SiSU_Param def initialize(opt) @opt=opt @cX||=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]) - @cmd,@mod=opt.cmd,opt.mod - @fns=if @opt.cmd =~/P/ #revisit CHECK + @fns=if @opt.act[:psql][:set] == [:on] #revisit CHECK opt.fns else opt.fns.gsub(/\.ssm$/,'.ssm.sst') end @@ -886,7 +885,7 @@ module SiSU_Param Dir.chdir(@opt.f_pth[:pth]) begin rescue - SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@fns).location do + SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -951,10 +950,10 @@ module SiSU_Param end @concord_make=(@wc_words > @env.concord_max) ? false : true @locale=@sys.locale - @file_encoding=@sys.file_encoding(fns,@opt.cmd) + @file_encoding=@sys.file_encoding(fns,@opt.act) # programs set here for things that affect output appearance only @programs[:pdf]=SiSU_Env::SystemCall.new.program_found?('pdflatex') - if @opt.cmd =~/P/ #if @env.multilingual? + if @opt.act[:psql][:set] == [:ok] m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss @fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3] @flv=@env.document_language_versions_found[:f] @@ -967,7 +966,7 @@ module SiSU_Param @papersize=@env.papersize #'A4' #default size #get first from SiSU_Env:: # @env is probably no longer most appropriate name! as default info is more general @sfx_src=@fns[m,2] if @fns =~ /(?:-|ssm\.)?sst$/ \ - and not @opt.cmd =~/P/ #watch + and not @opt.act[:psql][:set] == [:ok] @env_out_root=@env.path.output @dir_out="#{@env.path.output}/#{@fnb}" @dir_tex=@env.processing_path.tex @@ -1485,6 +1484,9 @@ module SiSU_Param Store.new(self,@env).store #% pstore self rescue + if @opt.act[:harvest][:set]==:on + exit + end end end private @@ -1510,7 +1512,7 @@ module SiSU_Param end @@md=@md=nil rescue - SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do + SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure -- cgit v1.2.3