aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/dal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/dal.rb')
-rw-r--r--lib/sisu/v5/dal.rb29
1 files changed, 19 insertions, 10 deletions
diff --git a/lib/sisu/v5/dal.rb b/lib/sisu/v5/dal.rb
index 0a2a35b1..0c245599 100644
--- a/lib/sisu/v5/dal.rb
+++ b/lib/sisu/v5/dal.rb
@@ -268,10 +268,12 @@ module SiSU_DAL
protected
def create_dal
dal_array=[]
- unless @opt.cmd =~/q/
- tell=(@opt.cmd=~/[vVM]/) \
- ? SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction')
- : SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}")
+ unless @opt.act[:quiet][:set]==:on
+ tell=(@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],'Document Abstraction')
+ : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}")
tell.blue_title_hi
end
fn=(@fnx && @fnx =~/\.ss[tmi]$/) \
@@ -284,10 +286,16 @@ module SiSU_DAL
@md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract
meta=nil
dal=SiSU_DAL::Make.new(fn,@md,file_array).song
- if @opt.cmd =~/[vM]/
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
cf=SiSU_Env::CreateFile.new(fn)
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"~meta/#{@opt.fns}.meta").output if @opt.cmd =~/v/i
- SiSU_Screen::Ansi.new(@opt.cmd,"dal -> #{cf.meta}").txt_grey if @opt.cmd =~/M/
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on)
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],@opt.fns,"~meta/#{@opt.fns}.meta").output
+ elsif @opt.act[:maintenance][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"dal -> #{cf.meta}").txt_grey
+ end
end
dal.each {|s| dal_array << s}
dal_array
@@ -383,7 +391,7 @@ module SiSU_DAL
end
end
def hard_output
- if @md.opt.cmd =~/M/
+ if @md.opt.act[:maintenance][:set]==:on
filename_meta=@cf.metaverse.file_meta
@data.each {|o| filename_meta.puts o.inspect.sub(/:0x[0-9a-f]{8}\s/,': ')} #to make diffing easier
filename_txt=@cf.metaverse.file_txt
@@ -430,7 +438,7 @@ module SiSU_DAL
end
def idx_html_hard_output
if @md.book_idx \
- and @md.opt.cmd =~/M/
+ and @md.opt.act[:maintenance][:set]==:on
filename_meta=@cf.file_meta_idx_html
if @data.is_a?(Array)
@data.each {|s| p s.inspect + "\n" unless s.is_a?(String)}
@@ -488,7 +496,8 @@ module SiSU_DAL
data,book_index_rel,book_index_rel_html_seg,html_idx,xhtml_idx=SiSU_DAL_BookIndex::BookIndex.new(@md,data,@env).indexing_song if @md.book_idx # dal_idx.rb
data=SiSU_DAL_Endnotes::Endnotes.new(@md,data,endnote_array).endnotes # dal_endnotes.rb
outputdata=data
- if @md.opt.cmd =~/[mM]/
+ if (@md.opt.act[:dal][:set]==:on \
+ || @md.opt.act[:maintenance][:set]==:on)
SiSU_DAL::Output.new(@fn,@md,outputdata).hard_output
SiSU_DAL::Output.new(@fn,@md,outputdata).make_marshal_content
SiSU_DAL::Output.new(@fn,@md,metadata).make_marshal_metadata