aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/xml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/xml.rb')
-rw-r--r--lib/sisu/v2/xml.rb22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/sisu/v2/xml.rb b/lib/sisu/v2/xml.rb
index 7c95f1ce..d3ff280e 100644
--- a/lib/sisu/v2/xml.rb
+++ b/lib/sisu/v2/xml.rb
@@ -80,14 +80,18 @@ module SiSU_XML_SAX
def read
begin
@env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array
- path=@env.path.output_tell
- loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:sax]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}"
- else ''
+ unless @opt.cmd =~/q/
+ path=@env.path.output_tell
+ loc=@env.url.output_tell
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:sax]}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}"
+ else @opt.fns
+ end
+ @opt.cmd=~/[MVvz]/ \
+ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize \
+ : SiSU_Screen::Ansi.new(@opt.cmd,'XML SAX',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:sax]}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:sax]}").flow if @opt.cmd =~/[MV]/
SiSU_XML_SAX::Source::Songsheet.new(@particulars).song
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
@@ -422,8 +426,8 @@ WOK
if @prog.tidy !=false #note values can be other than true
if @md.cmd =~/[VM]/
unless @md.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure')
- tell.colorize
+ SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure').colorize
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','','')
tell.grey_open
end
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags