aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/urls.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-05-03 19:09:54 -0400
committerRalph Amissah <ralph@amissah.com>2010-05-03 19:09:54 -0400
commit67e49a2b278b1512fb39a33a779f68a1389f9849 (patch)
treeb53682f4508b7a2a4a0c3042592b4f9f53f83975 /lib/sisu/v2/urls.rb
parentdal_numbering, heading auto-numbering, a fix (diff)
ansi, screen info related, arranging
Diffstat (limited to 'lib/sisu/v2/urls.rb')
-rw-r--r--lib/sisu/v2/urls.rb59
1 files changed, 19 insertions, 40 deletions
diff --git a/lib/sisu/v2/urls.rb b/lib/sisu/v2/urls.rb
index 6595c139..917b6fec 100644
--- a/lib/sisu/v2/urls.rb
+++ b/lib/sisu/v2/urls.rb
@@ -140,10 +140,7 @@ module SiSU_urls
if x =~/^m/ \
and @opt.cmd=~/m/ \
and x=~/^[#{opt.cmd}]/
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.dal}/#{@opt.fns}.meta")
- tell.maintenance if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.dal}/#{@opt.fns}.meta").maintenance if @opt.cmd =~/[MVv]/
end
if x=~/^([hHw])/ \
and @opt.cmd=~/[hHw]/ \
@@ -173,16 +170,10 @@ module SiSU_urls
if x=~/^e/ \
and @opt.cmd=~/e/ \
and x=~/^[#{@opt.cmd}]/
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.epub}/OPS/toc.xhtml")
- tell.maintenance if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.epub}/OPS/toc.xhtml").maintenance if @opt.cmd =~/[MVv]/
end
if x !~/^[me]/
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{tool} #{@env.path.output}/#{@fnb}/#{y}")
- tell.maintenance if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{tool} #{@env.path.output}/#{@fnb}/#{y}").maintenance if @opt.cmd =~/[MVv]/
end
@opt.cmd.gsub!(/#{m}/,'')
end
@@ -193,8 +184,7 @@ module SiSU_urls
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi \
: SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).green_title_hi
- if @opt.cmd =~/[MVv]/; SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow if @opt.cmd =~/[MVv]/
end
m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub="#{@env.url.output_tell}"[m,1]
@@ -206,49 +196,41 @@ module SiSU_urls
and @opt.cmd=~/[abchHNopwxXyY]/ \
and x=~/^[#{@opt.cmd}]/
m=$1
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}").result
@opt.cmd.gsub!(/#{m}/,'')
end
if x=~/^I/ \
and @opt.cmd =~/I/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -").result
@opt.cmd.gsub!(/I/,'')
end
if x=~/^D/ \
and @opt.cmd =~/D/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y)
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result
@opt.cmd.gsub!(/D[iu]/,'')
end
if x=~/^d/ \
and @opt.cmd =~/d/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}").result
@opt.cmd.gsub!(/d[iu]/,'')
end
if x=~/^e/ \
and @opt.cmd =~/e/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@env.path.output}/epub/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@env.path.output}/epub/#{y}").result
end
if x=~/^i/ \
and @opt.cmd =~/i/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_generator} #{@env.path.manpage}/#{@fnb}.1 |most")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_generator} #{@env.path.manpage}/#{@fnb}.1 |most").result
@opt.cmd.gsub!(/I/,'')
end
if x=~/^P/ \
and @opt.cmd =~/P/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} Profile","#{@pwd_stub}::#{@opt.fns}",y)
- tell.result
+ 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/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/src/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/src/#{y}").result
@opt.cmd.gsub!(/I/,'')
end
if x=~/^S/ \
@@ -256,8 +238,7 @@ module SiSU_urls
zipfile=if @opt.fns =~/\.ssm\.sst$/; y.gsub(/(?:\~\S{2,3})?(\.ssm\.sst\.zip)$/,'.ssm.zip')
else y.gsub(/(?:\~\S{2,3})?(\.sst\.zip)$/,'\1')
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result
@opt.cmd.gsub!(/I/,'')
end
end
@@ -267,11 +248,9 @@ module SiSU_urls
end
end
def urls_all
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'URLs')
- tell.grey_title_hi if @opt.cmd =~/[MVv]/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}")
- tell.flow if @opt.cmd =~/[MVv]/
+ if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow
end
@u.each do |x,y|
tell=case x
@@ -289,9 +268,9 @@ module SiSU_urls
when /^i/
SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_generator} #{@env.path.manpage}/#{@fnb}.1 |most")
end
- unless @opt.cmd =~/q/
- tellx.result if tellx and @opt.cmd =~/[MVv]/
- tell.result if tell and @opt.cmd =~/[MVv]/
+ if @opt.cmd =~/[MVv]/
+ tellx.result if tellx
+ tell.result if tell
end
tellx=nil
end