diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-02-16 18:11:35 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-02-16 18:11:35 -0500 |
commit | 4f364a330d70715125ada9a3818ce9575be6db38 (patch) | |
tree | c3ce9e651014dfff1610a23510527ceadb10eea0 /lib/sisu/v3/urls.rb | |
parent | debian/changelog 3.0.0-1 (diff) | |
parent | changelogs, gitweb urls: debian release tags (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v3/urls.rb')
-rw-r--r-- | lib/sisu/v3/urls.rb | 99 |
1 files changed, 64 insertions, 35 deletions
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 |