diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-05-28 05:40:31 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-05-28 05:40:31 -0400 |
commit | fb8e410b961e1652392874b4c258e924fc43c6d8 (patch) | |
tree | 7177da2c718173c51f6283e7d3e94c18c593b2c7 /lib/sisu/v3/hub.rb | |
parent | debian/bin: code headers mainly copyright (diff) | |
parent | v3: html_format, minor cleaning (diff) |
Merge tag 'sisu_3.2.10' into debian/sid
Diffstat (limited to 'lib/sisu/v3/hub.rb')
-rw-r--r-- | lib/sisu/v3/hub.rb | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index d1cb48f1..a2902075 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -7,7 +7,8 @@ * Author: Ralph Amissah - * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved. + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010, 2011, 2012 Ralph Amissah, All Rights Reserved. * License: GPL 3 or later: @@ -22,7 +23,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with @@ -33,9 +34,7 @@ <http://www.fsf.org/licensing/licenses/gpl.html> <http://www.gnu.org/licenses/gpl.html> - <http://www.jus.uio.no/sisu/gpl.fsf/toc.html> - <http://www.jus.uio.no/sisu/gpl.fsf/doc.html> - <http://www.jus.uio.no/sisu/gpl.fsf/plain.txt> + <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html> * SiSU uses: * Standard SiSU markup syntax, @@ -47,7 +46,7 @@ <http://www.sisudoc.org> * Download: - <http://www.jus.uio.no/sisu/SiSU/download.html> + <http://www.sisudoc.org/sisu/en/SiSU/download.html> * Ralph Amissah <ralph@amissah.com> @@ -78,7 +77,9 @@ module SiSU @opt.lng='en' end @@pwd=@opt.pth - Dir.chdir(@opt.pth) #watch + @opt.pth=@opt.f_pths[i][:pth] + @opt.lng=@opt.f_pths[i][:lng] + Dir.chdir(@opt.f_pth[:pth]) #watch @env=SiSU_Env::InfoEnv.new(fns) yield end @@ -91,7 +92,7 @@ module SiSU if number_of_files[fn].class == Array number_of_files[fn] << i else - number_of_files = { fn => [i] } + number_of_files.store(fn,[i]) end end files_translated_idx=[] @@ -109,9 +110,11 @@ module SiSU @opt.pth=Dir.pwd @opt.lng='en' elsif @opt.fno =~/\.txz$/ + @opt.pth=@opt.f_pths[i][:pth] + @opt.lng=@opt.f_pths[i][:lng] else - @opt.pth=@opt.paths[i] - @opt.lng=@opt.lngs[i] + @opt.pth=@opt.f_pths[i][:pth] + @opt.lng=@opt.f_pths[i][:lng] end @@pwd=@opt.pth Dir.chdir(@opt.pth) #watch @@ -206,6 +209,9 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on @msg,@msgs='',nil @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") } end + def requires(req) + require_relative req + end def actions if @opt.act[:profile][:set]==:on require 'profile' @@ -322,9 +328,6 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on retry unless @retry_count > 1 ensure end - end - def requires(req) - require_relative req end def each_file_loop_options @opt.files.each_with_index do |fno,i| @@ -333,8 +336,8 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on gsub(/\.ssm$/,'.ssm.sst') @opt.f_pth=@opt.f_pths[i] if @opt.fns !~/\.-sst$/ - @opt.pth=@opt.paths[i] - @opt.lng=@opt.lngs[i] + @opt.pth=@opt.f_pths[i][:pth] + @opt.lng=@opt.f_pths[i][:lng] else @opt.pth=Dir.pwd @opt.lng='en' @@ -355,8 +358,12 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on end end if @opt.act[:share_source][:set]==:on - requires('share_src') # -s share_src.rb - SiSU_Markup::Source.new(@opt).read + if @opt.fno =~/\.ssm$/ + SiSU_Screen::Ansi.new(@opt.cmd,'WARNING: share text source (--source) not available for composite files (.ssm),', 'composite (.ssm) source documents may be shared as a sisupod (--sisupod) (.txz)').warn unless @opt.cmd =~/q/ + else + requires('share_src') # -s share_src.rb + SiSU_Markup::Source.new(@opt).read + end end if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q requires('qrcode') # -Q qrcode.rb |