From 9f4166c72780c7dfd9d8aec31646555229a2fb52 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Feb 2011 12:58:51 -0500 Subject: console feedback on selected files being processed, updates & fixes --- CHANGELOG_v3 | 2 + data/doc/sisu/v3/CHANGELOG | 2 + lib/sisu/v3/digests.rb | 4 +- lib/sisu/v3/epub.rb | 5 +-- lib/sisu/v3/html.rb | 7 ++-- lib/sisu/v3/manifest.rb | 4 +- lib/sisu/v3/odf.rb | 4 +- lib/sisu/v3/plaintext.rb | 4 +- lib/sisu/v3/texpdf.rb | 4 +- lib/sisu/v3/urls.rb | 99 ++++++++++++++++++++++++++++++---------------- lib/sisu/v3/xhtml.rb | 7 ++-- lib/sisu/v3/xml.rb | 6 +-- lib/sisu/v3/xml_dom.rb | 6 +-- 13 files changed, 93 insertions(+), 61 deletions(-) diff --git a/CHANGELOG_v3 b/CHANGELOG_v3 index 07d2928e..c860a538 100644 --- a/CHANGELOG_v3 +++ b/CHANGELOG_v3 @@ -19,6 +19,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.1.orig.tar.gz sisu_3.0.1-1.dsc sisu_3.0.1-1.debian.tar.gz + * console feedback on selected files being processed, updates & fixes + * sysenv & sisurc.yml: libreoffice, default odf reader %% 3.0.0.orig.tar.gz (2011-02-07:06/1) diff --git a/data/doc/sisu/v3/CHANGELOG b/data/doc/sisu/v3/CHANGELOG index 4139a8d5..142b53a4 100644 --- a/data/doc/sisu/v3/CHANGELOG +++ b/data/doc/sisu/v3/CHANGELOG @@ -19,6 +19,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.1.orig.tar.gz sisu_3.0.1-1.dsc sisu_3.0.1-1.debian.tar.gz + * console feedback on selected files being processed, updates & fixes + * sysenv & sisurc.yml: libreoffice, default odf reader %% 3.0.0.orig.tar.gz (2011-02-07:06/1) diff --git a/lib/sisu/v3/digests.rb b/lib/sisu/v3/digests.rb index 38b79ae1..26e91528 100644 --- a/lib/sisu/v3/digests.rb +++ b/lib/sisu/v3/digests.rb @@ -76,12 +76,12 @@ module SiSU_Digest_view @env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVv]/) \ - ? "#{@env.program.text_editor} #{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}" \ + ? "#{@env.program.text_editor} file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}" \ : @opt.fns @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}").flow if @opt.cmd =~/[MV]/ end SiSU_Digest_view::Source::Scroll.new(@particulars).songsheet SiSU_Env::Info_skin.new(@md).select diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb index 0da90712..22c42980 100644 --- a/lib/sisu/v3/epub.rb +++ b/lib/sisu/v3/epub.rb @@ -85,14 +85,13 @@ module SiSU_EPUB @env=@particulars.env loc=@env.path.url.output_tell unless @opt.cmd =~/q/ - tool=if @opt.cmd =~/z/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub" - elsif @opt.cmd =~/[MVv]/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub" + tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.epub_viewer} #{@md.file.output_path.epub}/#{@md.file.base_filename.epub}" else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{loc}/epub/#{@fnb}.epub").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.epub}/#{@md.file.base_filename.epub}").flow if @opt.cmd =~/[MV]/ end @env.path.epub_bld #(@md) @env.path.epub_cp_images(@md) diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index ade1a801..4fc657e8 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -87,14 +87,13 @@ module SiSU_HTML @env=@particulars.env loc=@env.url.output_tell unless @opt.cmd =~/q/ - tool=if @opt.cmd =~/z/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}" - elsif @opt.cmd =~/[MVv]/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}" - else @opt.fns + tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}" + else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@fnb}/#{@md.fn[:index]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/ end SiSU_Env::Info_skin.new(@md).select data=nil diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index c9fb8e04..e7fbcfa9 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -82,9 +82,9 @@ module SiSU_Manifest SiSU_Env::Info_skin.new(@md).select xbrowser=@env.program.web_browser browser=@env.program.console_web_browser - webserv_url=@env.path.url.output_tell +# webserv_url=@env.path.url.output_tell #fix in sysenv unless @opt.cmd =~/q/ - url_html="#{webserv_url}/#{@md.fnb}/#{@md.fn[:manifest]}" + url_html="file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',@opt.fns).green_title_hi diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index 8a1c5322..ce696fdd 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -86,12 +86,12 @@ module SiSU_ODF path=@env.path.output_tell unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVv]/) \ - ? "#{@env.program.odf_viewer} #{path}/#{@md.fnb}/#{opendoc}" \ + ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}" \ : @opt.fns @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{opendoc}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").flow if @opt.cmd =~/[MV]/ end SiSU_ODF::Source::Scroll.new(@particulars).songsheet SiSU_Env::Info_skin.new(@md).select diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb index 004705f3..8b910642 100644 --- a/lib/sisu/v3/plaintext.rb +++ b/lib/sisu/v3/plaintext.rb @@ -84,12 +84,12 @@ module SiSU_Plaintext unless @opt.cmd =~/q/ path=env.path.output_tell tool=(@opt.cmd =~/[MVv]/) \ - ? "#{env.program.text_editor} #{path}/#{md.fnb}/#{md.fn[:plain]}" \ + ? "#{env.program.text_editor} #{md.file.output_path.txt}/#{md.file.base_filename.txt}" \ : @opt.fns @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{md.fnb}/#{md.fn[:plain]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{md.file.output_path.txt}/#{md.file.base_filename.txt}").flow if @opt.cmd =~/[MV]/ end dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here wrap_width=if defined? md.make.plaintext_wrap \ diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 8b0ba8c6..df03647c 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -106,8 +106,8 @@ module SiSU_TeX SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns).green_title_hi unless @opt.cmd =~/q/ if @opt.cmd =~/[MVv]/ path=@env.url.output_tell - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_l]}").flow - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_p]}").flow + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").flow + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").flow end @md=@particulars.md $flag=@md.cmd #introduced to pass 0 for no object citation numbers... to texpdf_format diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb index c2b694a2..5cc69e7b 100644 --- a/lib/sisu/v3/urls.rb +++ b/lib/sisu/v3/urls.rb @@ -192,54 +192,54 @@ module SiSU_urls @u.each do |x,y| if @opt.fns =~ @m_regular if @opt.cmd =~/[MVv]/ - if x=~/^([bcNwxXY])/ \ - and @opt.cmd=~/[bcNwxXY]/ \ - and x=~/^[#{@opt.cmd}]/ - m=$1 - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}").result + if (x=~/^a/ and @opt.cmd =~/a/) \ + or (x=~/^t/ and @opt.cmd =~/t/) + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.txt}/#{@md.file.base_filename.txt}").result end - if x=~/^[y]/ \ - and @opt.cmd =~/[y]/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result + if x=~/^b/ \ + and @opt.cmd =~/b/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}").result end - if x=~/^[at]/ \ - and @opt.cmd =~/[at]/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.txt}/#{@md.file.base_filename.txt}").result +# if x=~/^[c]/ \ +# and @opt.cmd =~/[c]/ +# SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result +# end + if x=~/^D/ \ + and @opt.cmd =~/D/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result end - if x=~/^h/ \ - and @opt.cmd =~/h/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_scroll}/#{@md.file.base_filename.html_scroll}").result - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").result + if x=~/^d/ \ + and @opt.cmd =~/d/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}").result end if x=~/^e/ \ and @opt.cmd =~/e/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@md.file.output_path.epub}/#{@md.file.base_filename.epub}").result end - if x=~/^o/ \ - and @opt.cmd =~/o/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").result - end - if x=~/^p/ \ - and @opt.cmd =~/p/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").result - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").result + if x=~/^h/ \ + and @opt.cmd =~/h/ + if x =~/scroll/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_scroll}/#{@md.file.base_filename.html_scroll}").result + else + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").result + end end if x=~/^I/ \ and @opt.cmd =~/I/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -").result end - if x=~/^D/ \ - and @opt.cmd =~/D/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result - end - if x=~/^d/ \ - and @opt.cmd =~/d/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}").result - end if x=~/^i/ \ and @opt.cmd =~/i/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_viewer} #{@env.path.manpage}/#{@fnb}.1").result end + if x=~/^N/ \ + and @opt.cmd =~/N/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}").result + end + if x=~/^o/ \ + and @opt.cmd =~/o/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").result + end if x=~/^P/ \ and @opt.cmd =~/P/ if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ @@ -250,15 +250,19 @@ module SiSU_urls end #@opt.cmd.gsub!(/P/,'') end + if x=~/^p/ \ + and @opt.cmd =~/p/ + if x =~/portrait/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").result + else + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").result + end + end #if x=~/^P/ \ #and @opt.cmd =~/P/ # SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} Profile","#{@pwd_stub}::#{@opt.fns}",y).result # @opt.cmd.gsub!(/P/,'') #end - if x=~/^s/ \ - and @opt.cmd =~/s/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.src}/#{y}").result - end if x=~/^S/ \ and @opt.cmd =~/S/ zipfile=if @opt.fns =~/\.ssm\.sst$/; y.gsub(/(?:\~\S{2,3})?(\.ssm\.sst\.zip)$/,'.ssm.zip') @@ -266,6 +270,31 @@ module SiSU_urls end SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result end + if x=~/^s/ \ + and @opt.cmd =~/s/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.src}/#{y}").result + end + if x=~/^w/ \ + and @opt.cmd =~/w/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_concordance}/#{@md.file.base_filename.html_concordance}").result + end + if x=~/^X/ \ + and @opt.cmd =~/X/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}").result + end + if x=~/^x/ \ + and @opt.cmd =~/x/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}").result + end + if x=~/^Y/ \ + and @opt.cmd =~/Y/ #BROKEN + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.sitemap}/#{@md.file.base_filename.sitemap}").result + end + + if x=~/^y/ \ + and @opt.cmd =~/y/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result + end end urls_maintenance(@opt,x,y) if @opt.cmd =~/[MV]/ end diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index 94243c48..8710f2da 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -83,14 +83,15 @@ module SiSU_XHTML 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]}" + + tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}" + elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.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]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"/#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}").flow if @opt.cmd =~/[MV]/ end SiSU_XHTML::Source::Songsheet.new(@particulars).song rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index f0e62de9..5dfd6e7b 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -83,14 +83,14 @@ module SiSU_XML_SAX 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]}" + tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}" + elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_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]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_SAX::Source::Songsheet.new(@particulars).song rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index b4feb949..0fe44836 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -81,14 +81,14 @@ module SiSU_XML_DOM 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[:dom]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:dom]}" - elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}" + tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}" + elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}" else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML DOM',tool).colorize \ : SiSU_Screen::Ansi.new(@opt.cmd,'XML DOM',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:dom]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_DOM::Source::Songsheet.new(@particulars).songsheet rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error -- cgit v1.2.3