aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/composite.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/composite.rb')
-rw-r--r--lib/sisu/v5/composite.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/sisu/v5/composite.rb b/lib/sisu/v5/composite.rb
index 442cfada..822121ae 100644
--- a/lib/sisu/v5/composite.rb
+++ b/lib/sisu/v5/composite.rb
@@ -163,14 +163,18 @@ module SiSU_Assemble
def insertions?
data=@fns_array
tuned_file,imagedir=[],[]
- SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Composite Document',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").grey_title_hi unless @opt.act[:quiet][:set]==:on
data.each do |para|
if para =~/^<<\s+(\S+?\.ss[it])$/ \
or para =~/^<<\{(\S+?\.ss[it])\}$/ \
or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \
or para =~/^r\{(.+?)\}/ #depreciated
loadfile=$1.strip
- SiSU_Screen::Ansi.new(@opt.cmd,'loading:',loadfile).txt_grey if @opt.cmd =~/[MVv]/
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'loading:',loadfile).txt_grey
+ end
tuned_file << if loadfile =~ /(?:https?|file):\/\/\S+?\.ss[ti]$/ # and NetTest
imagedir = /((?:https?|file):\/\/\S+?)\/[^\/]+?\.ss[ti]$/.match(loadfile).captures.join + '/_sisu/image' #watch
require 'uri'
@@ -190,7 +194,7 @@ module SiSU_Assemble
file=insertion(loadfile,insert_array)
file[:prepared]
else
- cX=SiSU_Screen::Ansi.new(@opt.cmd).cX
+ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
para
end
@@ -229,19 +233,23 @@ module SiSU_Assemble
def insertions?
data=@fns_array
tuned_file=[]
- SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',@opt.fno).grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Composite Document',@opt.fno).grey_title_hi unless @opt.act[:quiet][:set]==:on
@ssm=[@opt.fns]
data.each do |para|
if para =~/^<<\s+(\S+?\.ss[it])$/
loadfile=$1.strip
- SiSU_Screen::Ansi.new(@opt.cmd,'loading:',loadfile).txt_grey if @opt.cmd =~/[MVv]/
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'loading:',loadfile).txt_grey
+ end
tuned_file << if loadfile =~ /(?:https?|file):\/\/\S+?\.ss[ti]$/
@ssm << loadfile
elsif loadfile =~ /\.ss[ti]$/ \
and FileTest.file?(loadfile)
@ssm << loadfile
else
- cX=SiSU_Screen::Ansi.new(@opt.cmd).cX
+ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
para
end