From 86c848ac4cc3422ab72a5931c0aa24e6ef8982b7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 3 Oct 2010 22:38:31 -0400 Subject: a few aliases added (long options) --- lib/sisu/v2/options.rb | 68 +++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3 From 3eaa952ac05221faa8e558aba79811025fdfdb50 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 3 Oct 2010 22:39:25 -0400 Subject: urls, cleaning --- lib/sisu/v2/urls.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib') 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]/ -- cgit v1.2.3 From daf29aa25fe25b1d435ef3c29ad12c5bd44ffe18 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 3 Oct 2010 22:40:31 -0400 Subject: hub, fix breakage when -y (manifest) is run without -m * hub, fix sisu breakage when -y (manifest) is run without the explicit or implicit calling of -m (creation of document abstraction for processing), (e.g. when --source or --sisupod is called on its own). --- lib/sisu/v2/hub.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3 From c7bd43fb216440fa940583fb218446b053f1eea6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Oct 2010 12:10:42 -0400 Subject: dal_images, where image dimensions are set in an object, use those (+changelog & version date) --- lib/sisu/v2/dal_images.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3