aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/hub.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/hub.rb')
-rw-r--r--lib/sisu/v6/hub.rb60
1 files changed, 41 insertions, 19 deletions
diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/v6/hub.rb
index 736fa8bc..94d0eb8e 100644
--- a/lib/sisu/v6/hub.rb
+++ b/lib/sisu/v6/hub.rb
@@ -75,7 +75,8 @@ module SiSU
begin
require 'uri'
rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('uri NOT FOUND (LoadError)')
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('uri NOT FOUND (LoadError)')
end
class HubMaster
def initialize(argv)
@@ -159,7 +160,11 @@ module SiSU
end
end
if files_translated_idx.flatten.length > 1
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Manifest re-run on (currently generated) translated files',"").grey_title_hi unless @opt.act[:quiet][:set] ==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Manifest re-run on (currently generated) translated files',
+ ''
+ ).grey_title_hi unless @opt.act[:quiet][:set] ==:on
files_translated_idx.flatten.each do |i|
@opt.fns=@opt.files[i]
@opt.f_pth=@opt.f_pths[i]
@@ -191,22 +196,26 @@ module SiSU
@@n_do=0
end
def remote_put_base_site_rsync # -CR
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
+ if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).rsync_base
end
def remote_put_base_site_rsync_match # -CCRZ
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
+ if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).rsync_base_sync
end
def remote_put_base_site # -Cr
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
+ if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).scp_base
end
def remote_put_base_site_all # -CCr
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) if @opt.act[:maintenance][:set] ==:on
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
+ if @opt.act[:maintenance][:set] ==:on
require_relative 'remote' # remote.rb
SiSU_Remote::Put.new(@opt).scp_base_all
end
@@ -217,7 +226,10 @@ module SiSU
def termsheet # -t
system("sisu_termsheet #{@opt.cmd} #{@opt.fns}\n")
@@n_do=@@n_do+1
- SiSU_Screen::Ansi.new(@opt.cmd,@@n_do,'Termsheet(s) processed').term_sheet_title unless @opt.act[:quiet][:set] ==:on
+ SiSU_Screen::Ansi.new(
+ @opt.cmd,@@n_do,
+ 'Termsheet(s) processed'
+ ).term_sheet_title unless @opt.act[:quiet][:set] ==:on
end
def webrick # -W
prt=SiSU_Env::InfoEnv.new(@fns).port.webrick_port
@@ -254,7 +266,8 @@ module SiSU
require 'fileutils'
include FileUtils
rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('fileutils NOT FOUND (LoadError)')
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('fileutils NOT FOUND (LoadError)')
end
@@env=nil
attr_accessor :op
@@ -262,7 +275,9 @@ module SiSU
@opt=opt
@@env=@env=SiSU_Env::InfoEnv.new
@msg,@msgs='',nil
- @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") }
+ @tell=lambda {
+ SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}")
+ }
end
def remove_skipped_files_if_any_from_processing_files_array
if @remove_faulty_markup_files_array.length > 0
@@ -272,7 +287,8 @@ module SiSU
def print_error_message_if_files_skipped
if @remove_faulty_markup_files_array.length > 0
puts '---'
- STDERR.puts 'ERROR with file(s), did not process: ' + @remove_faulty_markup_files_array.join(',')
+ STDERR.puts 'ERROR with file(s), did not process: ' +
+ @remove_faulty_markup_files_array.join(',')
end
end
def do_loops
@@ -288,7 +304,8 @@ module SiSU
def do_each_file_loop_options
@opt.files.each_with_index do |fno,i|
@opt.fno=fno
- @opt.fns=fno.gsub(/(?:https?|file):\/\/\S+\/(\S+)\.sst$/,'\1.-sst').
+ @opt.fns=fno.
+ gsub(/(?:https?|file):\/\/\S+\/(\S+)\.sst$/,'\1.-sst').
gsub(/\.ssm$/,'.ssm.sst')
@opt.f_pth=@opt.f_pths[i]
if @opt.fns !~/\.-sst$/
@@ -307,7 +324,7 @@ module SiSU
$process_document = :ok
unless @opt.act[:po4a][:set]==:on # --po4a, -P
if @opt.fno =~ /\.ssm$/
- require_relative 'composite' # composite.rb #pre-processing
+ require_relative 'ao_composite' # ao_composite.rb #pre-processing
SiSU_Assemble::Composite.new(@opt).read
end
require_relative 'ao' # -m ao.rb
@@ -357,7 +374,7 @@ module SiSU
end
end
if @opt.act[:concordance][:set]==:on #% --concordance, -w
- require_relative 'concordance' # concordance.rb
+ require_relative 'html_concordance' # html_concordance.rb
SiSU_Concordance::Source.new(@opt).read
end
if @opt.act[:epub][:set]==:on #% --epub, -e
@@ -492,7 +509,8 @@ module SiSU
ensure
path_pod=@env.processing_path.processing_sisupod(@opt).paths
unless @opt.act[:maintenance][:set]==:on
- FileUtils::rm_rf("#{path_pod[:sisupod]}/*") if FileTest.directory?(path_pod[:sisupod])
+ FileUtils::rm_rf("#{path_pod[:sisupod]}/*") \
+ if FileTest.directory?(path_pod[:sisupod])
end
end
end
@@ -518,7 +536,7 @@ module SiSU
case @opt.fns
when /\.(termsheet.rb)$/
SiSU::Operations.new(@opt).termsheet
- else #print "not processed --> ", fns, "\n"
+ else #print "not processed --> ", fns, "\n"
end
else SiSU::Operations.new(@opt).not_found
end
@@ -528,13 +546,13 @@ module SiSU
if @opt.act[:psql][:set]==:on #% --pg, -D DB postgresql
require_relative 'dbi'
OptionLoopFiles.new(@opt).loop_files_on_given_option do
- SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb
+ SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb
end
end
if @opt.act[:sqlite][:set]==:on #% --sqlite, -d DB sqlite
require_relative 'dbi'
OptionLoopFiles.new(@opt).loop_files_on_given_option do
- SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb
+ SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb
end
end
if @opt.act[:manifest][:set]==:on #% --manifest, -y
@@ -579,7 +597,10 @@ module SiSU
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],' ' + File.dirname(__FILE__)).grey
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + File.dirname(__FILE__)
+ ).grey
end
end
if @opt.act[:ao][:set]==:on \
@@ -676,7 +697,8 @@ module SiSU
begin
require 'profile'
rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('profile NOT FOUND (LoadError)')
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('profile NOT FOUND (LoadError)')
end
end
action_on_file_ =if @opt.act[:rsync][:set]==:on \