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 --- lib/sisu/v3/urls.rb | 99 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 35 deletions(-) (limited to 'lib/sisu/v3/urls.rb') 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 -- cgit v1.2.3