diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/dal_images.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v2/hub.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v2/options.rb | 68 | ||||
-rw-r--r-- | lib/sisu/v2/urls.rb | 13 |
4 files changed, 48 insertions, 45 deletions
diff --git a/lib/sisu/v2/dal_images.rb b/lib/sisu/v2/dal_images.rb index 0b6d2b1e..ed537f22 100644 --- a/lib/sisu/v2/dal_images.rb +++ b/lib/sisu/v2/dal_images.rb @@ -83,7 +83,7 @@ module SiSU_images unless dob.is =~/^table/ dob.obj.strip! if dob.obj =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/ - if dob.obj !~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+\s+/ + if dob.obj !~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+/ m=/#{Mx[:lnk_o]}\s*(\S+\.(?:png|jpg|gif))/ if imagemagick_ imgs=dob.obj.scan(m).flatten diff --git a/lib/sisu/v2/hub.rb b/lib/sisu/v2/hub.rb index 4b06a45c..9c4fb714 100644 --- a/lib/sisu/v2/hub.rb +++ b/lib/sisu/v2/hub.rb @@ -291,7 +291,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ flag=SiSU_Env::Info_processing_flag.new extra='' if @opt.cmd !~/[mn]/ - extra+=if @opt.cmd =~/[abeghHhIiJjNOoptTwXxz]/ \ + extra+=if @opt.cmd =~/[abegHhIiNOopTtwXxyz]/ \ and @opt.cmd !~/[mn]/ 'm' #% add dal elsif ((@opt.cmd =~/[Dd]/ \ @@ -303,18 +303,20 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ end end if @opt.cmd !~/y/ - extra+=if @opt.cmd =~/[abehHhIiJjNopsSstwXxz]/ \ + extra+=if @opt.cmd =~/[abeHhIiNopsSstwXxz]/ \ and @opt.cmd !~/y/ - 'y' #% add manifest + 'ym' #% add manifest elsif (@opt.cmd =~/[Dd]/ \ or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/) \ and @opt.files[0] !~/^remove$/ \ and @opt.cmd !~/y/ - 'y' #% add manifest + 'ym' #% add manifest else '' end end @opt.cmd=@opt.cmd + extra + opt=@opt.cmd.scan(/CC|\S/) + @opt.cmd=opt.uniq.join if @opt.cmd =~/[vVM]/ #% version information if @opt.cmd =~/V/ \ and @opt.files.empty? #% environment diff --git a/lib/sisu/v2/options.rb b/lib/sisu/v2/options.rb index bff78cd4..72db8207 100644 --- a/lib/sisu/v2/options.rb +++ b/lib/sisu/v2/options.rb @@ -125,46 +125,46 @@ module SiSU_commandline unless m.empty? m.each do |m| case m - when /^(?:--color-toggle)$/; c=c+'c' - when /^(?:--configure)$/; c=c+'C' # issue should be CC - when /^(?:--dal|--machine|--middle)$/; c=c+'m' - when /^(?:--txt|--text|--plaintext)$/; c=c+'t' - when /^(?:--html)$/; c=c+'h' - when /^(?:--epub)$/; c=c+'e' - when /^(?:--od[ft])$/; c=c+'o' - when /^(?:--pdf)$/; c=c+'p' - when /^(?:--concordance|--wordmap)$/; c=c+'w' - when /^(?:--manpage)$/; c=c+'i' - when /^(?:--texinfo)$/; c=c+'I' - when /^(?:--xhtml)$/; c=c+'b' - when /^(?:--xml-sax)$/; c=c+'x' - when /^(?:--xml-dom)$/; c=c+'X' - when /^(?:--digest)$/; c=c+'N' - when /^(?:--termsheet)$/; c=c+'T' - when /^(?:--manifest)$/; c=c+'my' - when /^(?:--sqlite)$/; c=c+'d' - when /^(?:--pg|--psql)$/; c=c+'D' - when /^(?:--remote|--rsync)$/; c=c+'R' - when /^(?:--scp)$/; c=c+'r' - when /^(?:--source)$/; c=c+'s' - when /^(?:--sisupod)$/; c=c+'S' - when /^(?:--git)$/; c=c+'g' - when /^(?:--urls)$/; c=c+'U' - when /^(?:--zap|--delete)$/; c=c+'Z' - when /^(?:--sample-search-form)$/; c=c+'F' - when /^(?:--webserv|--webrick)$/; c=c+'W' - when /^(?:--maintenance)$/; c=c+'M' - when /^(?:--verbose[=-]3)$/; c=c+'VM' - when /^(?:--verbose[=-]2|--Verbose|--VERBOSE)$/; c=c+'V' - when /^(?:--verbose(?:[=-]1)?)$/; c=c+'v' - when /^(?:--verbose[=-]0|--quiet|--silent)$/; c=c+'q' + when /^(?:--color-toggle)$/; c=c+'c' + when /^(?:--configure)$/; c=c+'CC' + when /^(?:--dal?|--machine|--abstraction|--abs)$/; c=c+'m' + when /^(?:--txt|--text|--plaintext)$/; c=c+'t' + when /^(?:--html)$/; c=c+'h' + when /^(?:--epub)$/; c=c+'e' + when /^(?:--od[ft])$/; c=c+'o' + when /^(?:--pdf)$/; c=c+'p' + when /^(?:--concordance|--wordmap)$/; c=c+'w' + when /^(?:--manpage)$/; c=c+'i' + when /^(?:--texinfo)$/; c=c+'I' + when /^(?:--xhtml)$/; c=c+'b' + when /^(?:--xml-sax)$/; c=c+'x' + when /^(?:--xml-dom)$/; c=c+'X' + when /^(?:--digest)$/; c=c+'N' + when /^(?:--termsheet)$/; c=c+'T' + when /^(?:--manifest)$/; c=c+'y' + when /^(?:--sqlite)$/; c=c+'d' + when /^(?:--pg|--pg?sql|--postgresql)$/; c=c+'D' + when /^(?:--remote|--rsync)$/; c=c+'R' + when /^(?:--scp)$/; c=c+'r' + when /^(?:--source)$/; c=c+'s' + when /^(?:--sisupod|--pod)$/; c=c+'S' + when /^(?:--git)$/; c=c+'g' + when /^(?:--urls)$/; c=c+'U' + when /^(?:--zap|--delete)$/; c=c+'Z' + when /^(?:--sample-search-form)$/; c=c+'F' + when /^(?:--webserv|--webrick)$/; c=c+'W' + when /^(?:--maintenance)$/; c=c+'M' + when /^(?:--verbose[=-]3)$/; c=c+'VM' + when /^(?:--verbose[=-]2|--Verbose|--VERBOSE)$/; c=c+'V' + when /^(?:--verbose(?:[=-]1)?)$/; c=c+'v' + when /^(?:--verbose[=-]0|--quiet|--silent)$/; c=c+'q' else @mod << m end end end unless c.empty? c.gsub!(/-/,'') - c.scan(/./) {|x| ca << x} + c.scan(/CC|\S/) {|x| ca << x} @cmd= '-' + ca.uniq.join end unless w.empty? ; @what=w diff --git a/lib/sisu/v2/urls.rb b/lib/sisu/v2/urls.rb index 951a787a..d2493edd 100644 --- a/lib/sisu/v2/urls.rb +++ b/lib/sisu/v2/urls.rb @@ -207,21 +207,22 @@ module SiSU_urls if x=~/^D/ \ and @opt.cmd =~/D/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result - @opt.cmd.gsub!(/D[iu]/,'') + @opt.cmd.gsub!(/D/,'') 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 - @opt.cmd.gsub!(/d[iu]/,'') + @opt.cmd.gsub!(/d/,'') end if x=~/^e/ \ and @opt.cmd =~/e/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@env.path.output}/epub/#{y}").result + @opt.cmd.gsub!(/e/,'') end if x=~/^i/ \ and @opt.cmd =~/i/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_viewer} #{@env.path.manpage}/#{@fnb}.1").result - @opt.cmd.gsub!(/I/,'') + @opt.cmd.gsub!(/i/,'') end if x=~/^P/ \ and @opt.cmd =~/P/ @@ -231,15 +232,15 @@ module SiSU_urls if x=~/^s/ \ and @opt.cmd =~/s/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/src/#{y}").result - @opt.cmd.gsub!(/I/,'') + @opt.cmd.gsub!(/s/,'') end if x=~/^S/ \ - and @opt.cmd =~/[sS]/ + and @opt.cmd =~/S/ 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 SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result - @opt.cmd.gsub!(/I/,'') + @opt.cmd.gsub!(/S/,'') end end urls_maintenance(@opt,x,y) if @opt.cmd =~/[MV]/ |