aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/xhtml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/xhtml.rb')
-rw-r--r--lib/sisu/v2/xhtml.rb22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/sisu/v2/xhtml.rb b/lib/sisu/v2/xhtml.rb
index 80eb76d5..f142f3ce 100644
--- a/lib/sisu/v2/xhtml.rb
+++ b/lib/sisu/v2/xhtml.rb
@@ -80,14 +80,18 @@ module SiSU_XHTML
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[:xhtml]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- 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[:xhtml]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}"
+ else @opt.fns
+ end
+ @opt.cmd=~/[MVvz]/ \
+ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize \
+ : SiSU_Screen::Ansi.new(@opt.cmd,'XHTML',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:xhtml]}").flow if @opt.cmd =~/[MV]/
SiSU_XHTML::Source::Songsheet.new(@particulars).song
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
@@ -381,8 +385,8 @@ WOK
if @prog.tidy !=false
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