aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3dv/sysenv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3dv/sysenv.rb')
-rw-r--r--lib/sisu/v3dv/sysenv.rb260
1 files changed, 130 insertions, 130 deletions
diff --git a/lib/sisu/v3dv/sysenv.rb b/lib/sisu/v3dv/sysenv.rb
index a7fa3c75..a5658ee1 100644
--- a/lib/sisu/v3dv/sysenv.rb
+++ b/lib/sisu/v3dv/sysenv.rb
@@ -65,7 +65,7 @@ module SiSU_Env
include FileUtils::Verbose
require 'singleton'
@@noyaml=false
- class Info_date
+ class InfoDate
require 'date'
attr_accessor :dt,:t
def initialize
@@ -91,7 +91,7 @@ module SiSU_Env
'2012'
end
end
- class Info_system
+ class InfoSystem
require 'rbconfig'
include Singleton
@@user,@@home,@@hostname,@@pwd,@@sisu_etc,@@host,@@arch,@@rbver,@@dir_arch,@@dir_sitearch,@@dir_bin,@@locale,@@rc,@@sisurc_path,@@ad=ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],Config::CONFIG['sysconfdir'] + '/sisu',Config::CONFIG['host'],Config::CONFIG['arch'],%x{ruby -v}.strip,Config::CONFIG['archdir'],Config::CONFIG['sitearchdir'],Config::CONFIG['bindir'],%x{locale charmap}.strip,nil,nil,{} # %x{ruby -v}.strip # Config::CONFIG['rb_ver']
@@ -241,7 +241,7 @@ module SiSU_Env
def initialize
@user,@home,@hostname,@pwd,@sisu_etc,@host,@arch,@rbver,@dir_arch,@dir_sitearch,@dir_bin,@locale,@default_dir,@rc_path,@yamlrc_path,@ad_path=\
@@user,@@home,@@hostname,@@pwd,@@sisu_etc,@@host,@@arch,@@rbver,@@dir_arch,@@dir_sitearch,@@dir_bin,@@locale,@@default_dir,@@rc_path,@@yamlrc_path,@@ad_path
- #note rbver is duplicated in Info_version
+ #note rbver is duplicated in InfoVersion
end
end
class Load
@@ -280,7 +280,7 @@ module SiSU_Env
load_prog
end
end
- class Get_init < Info_system
+ class GetInit < InfoSystem
include Singleton
@@noyaml=false
@@rc,@@sisurc_path,@@vz,@@tx=nil,nil,nil,nil
@@ -373,16 +373,16 @@ module SiSU_Env
@@ad
end
end
- class Env_call
+ class EnvCall
@@rc,@@fns,@@fnn,@@fnb,@@fnt,@@flv,@@fnz=nil,nil,nil,nil,nil,nil,nil
@@ad={}
attr_accessor :rc,:fnn,:fnb,:fnt,:fnv,:fnz,:ad
def initialize(fns='')
super()
@fns=fns
- @sys=Info_system.instance
- @rc=Get_init.instance.sisu_yaml.rc
- @ad=Get_init.instance.ads
+ @sys=InfoSystem.instance
+ @rc=GetInit.instance.sisu_yaml.rc
+ @ad=GetInit.instance.ads
if @fns \
and @fns != '' \
and @fns !=@@fns
@@ -472,8 +472,8 @@ module SiSU_Env
@fn[:t]=filename[m,2]
end
end
- lng_base=Info_env.new.language_default_set
- lang=SiSU_Env::Standardise_language.new
+ lng_base=InfoEnv.new.language_default_set
+ lang=SiSU_Env::StandardiseLanguage.new
langs=lang.codes
x=[]
if FileTest.file?("#{@fn[:m]}.#{@fn[:t]}")
@@ -483,7 +483,7 @@ module SiSU_Env
end
#x << { f: "#{@fns}", l: lng_base }
langs.each do |l|
- lng=SiSU_Env::Standardise_language.new(l)
+ lng=SiSU_Env::StandardiseLanguage.new(l)
if FileTest.file?("#{@fn[:m]}~#{lng.code}.#{@fn[:t]}")
x << { f: "#{@fn[:m]}~#{lng.code}.#{@fn[:t]}", l: lng.code }
elsif FileTest.file?("#{@fn[:m]}~#{lng.name}.#{@fn[:t]}")
@@ -521,26 +521,26 @@ module SiSU_Env
@fn[:t]=@fns[m,2]
end
end
- lang=SiSU_Env::Standardise_language.new
+ lang=SiSU_Env::StandardiseLanguage.new
langs=lang.codes
x=[]
if FileTest.file?("#{@fn[:m]}.#{@fn[:t]}"); x << "#{@fn[:m]}.#{@fn[:t]}"
end
- dir=SiSU_Env::Info_env.new(@fns)
+ dir=SiSU_Env::InfoEnv.new(@fns)
@m << { m: 'sisu_manifest.html', l: 'English' } #fix later, default language
langs.each do |l|
- lng=SiSU_Env::Standardise_language.new(l)
+ lng=SiSU_Env::StandardiseLanguage.new(l)
fns_c="#{@fn[:m]}~#{lng.code}.#{@fn[:t]}"
fns_l="#{@fn[:m]}~#{lng.name}.#{@fn[:t]}"
if FileTest.file?(fns_c)
- fn_set_lang=SiSU_Env::Standardise_language.new.file_to_language(fns_c) #reconsider file_to_language
+ fn_set_lang=SiSU_Env::StandardiseLanguage.new.file_to_language(fns_c) #reconsider file_to_language
lng=fn_set_lang[:n]
- fn=SiSU_Env::Env_call.new(fns_c).lang(fn_set_lang[:c])
+ fn=SiSU_Env::EnvCall.new(fns_c).lang(fn_set_lang[:c])
@m << { m: fn[:manifest], l: lng }
elsif FileTest.file?(fns_l)
- fn_set_lang=SiSU_Env::Standardise_language.new.file_to_language(fns_l) #reconsider file_to_language
+ fn_set_lang=SiSU_Env::StandardiseLanguage.new.file_to_language(fns_l) #reconsider file_to_language
@fnl=dir.i18n.lang_filename(fn_set_lang[:c])
- fn=SiSU_Env::Env_call.new(fns_l).lang(fn_set_lang[:c])
+ fn=SiSU_Env::EnvCall.new(fns_l).lang(fn_set_lang[:c])
@m << { m: fn[:manifest], l: lng }
end
end
@@ -548,7 +548,7 @@ module SiSU_Env
@m
end
def filename(code,name,suffix)
- #d=SiSU_Env::Info_env.new(@fns)
+ #d=SiSU_Env::InfoEnv.new(@fns)
#fnl=d.i18n.lang_filename(code)
"#{name}#{suffix}"
#if code
@@ -604,12 +604,12 @@ module SiSU_Env
@fn
end
end
- class System_call
+ class SystemCall
@@locale_flag=false
def initialize(input='',output='',cmd='')
@input,@output,@cmd=input,output,cmd
- @prog=SiSU_Env::Info_program.new
- @sys=Info_system.instance
+ @prog=SiSU_Env::InfoProgram.new
+ @sys=InfoSystem.instance
end
def program_found?(program)
found=`whereis #{program}`
@@ -623,7 +623,7 @@ module SiSU_Env
end
def file_encoding(filename,cmd='') #file encoding
program='file'
- fnsp=Info_env.new(filename).source_file_with_path
+ fnsp=InfoEnv.new(filename).source_file_with_path
if program_found?(program)
encoding=%x{file -L #{fnsp}}.strip
encoding.gsub!(/#{fnsp}:(\s+|$)/,'')
@@ -846,11 +846,11 @@ module SiSU_Env
end
end
end
- class Standardise_language
+ class StandardiseLanguage
require_relative 'i18n' # i18n.rb
def initialize(l='')
@language=(l.nil? || l.empty?) \
- ? Info_env.new.language_default_set
+ ? InfoEnv.new.language_default_set
: l
@r=%{(?:#{Px[:lng_lst].join('|')})}
@lang_info=SiSU_i18n::Languages.new
@@ -962,7 +962,7 @@ module SiSU_Env
Px[:lng_lst] # constants.rb
end
end
- class Info_env < Env_call
+ class InfoEnv < EnvCall
require 'pathname'
require 'fileutils'
include FileUtils
@@ -972,7 +972,7 @@ module SiSU_Env
def initialize(fns='',md=nil)
super() #you may not want to re-execute this static info so frequently!
@fns,@md=fns,md
- @env=Env_call.new(fns) if fns
+ @env=EnvCall.new(fns) if fns
fnb=if @md \
and defined? @md.fnb
@md.fnb
@@ -986,7 +986,7 @@ module SiSU_Env
end
if fnb; @@fb ||=fnb
end
- @sys=Info_system.instance
+ @sys=InfoSystem.instance
@fnb ||=@@fb #clean up this... used primarily for zap which is not passed normal parameters
@fixed_websev_root='' # @home
@pwd=@@pwd=Dir.pwd
@@ -1116,7 +1116,7 @@ module SiSU_Env
FileUtils::rm_rf(spp)
end
paths=[]
- flv=Env_call.new(opt.fns).document_language_versions_found
+ flv=EnvCall.new(opt.fns).document_language_versions_found
flv[:f].each {|l| lng_dirs << l[:l] }
lng_dirs.uniq!
lng_dirs.each do |lng|
@@ -1208,9 +1208,9 @@ module SiSU_Env
: false
end
def widget #needs (md) #move
- @rc=SiSU_Env::Get_init.instance.sisu_yaml.rc
- @ad=SiSU_Env::Get_init.instance.ads
- @vz=SiSU_Env::Get_init.instance.skin
+ @rc=SiSU_Env::GetInit.instance.sisu_yaml.rc
+ @ad=SiSU_Env::GetInit.instance.ads
+ @vz=SiSU_Env::GetInit.instance.skin
@flag={ ad: false, md: false, sk: false, rc: false }
def promo?
@flag[:ad]=if @md.flag_promo && @ad[:flag_promo]
@@ -1283,7 +1283,7 @@ module SiSU_Env
end
end
def search_form(type='sisusearch',action=nil,db=nil,table=false)
- rc=SiSU_Env::Get_init.instance.sisu_yaml.rc
+ rc=SiSU_Env::GetInit.instance.sisu_yaml.rc
create_form_sisu=if action \
and db \
and action =~/https?:\/\// \
@@ -1339,7 +1339,7 @@ WOK
form
end
def search_form_static(action=nil,db=nil)
- rc=SiSU_Env::Get_init.instance.sisu_yaml.rc
+ rc=SiSU_Env::GetInit.instance.sisu_yaml.rc
create_form=if rc['search']['sisu']['flag']==true \
and action \
and db \
@@ -1387,8 +1387,8 @@ WOK
self
end
def widget_static
- @rc=SiSU_Env::Get_init.instance.sisu_yaml.rc
- @vz=SiSU_Env::Get_init.instance.skin
+ @rc=SiSU_Env::GetInit.instance.sisu_yaml.rc
+ @vz=SiSU_Env::GetInit.instance.skin
@flag={ ad: false, md: false, sk: false, rc: false }
def search?
flag=if defined? @rc['search'] \
@@ -1435,7 +1435,7 @@ WOK
end
end
def search_form(action=nil,db=nil)
- rc=SiSU_Env::Get_init.instance.sisu_yaml.rc
+ rc=SiSU_Env::GetInit.instance.sisu_yaml.rc
create_form=if defined? rc['search']['sisu']['flag'] \
and rc['search']['sisu']['flag']==true \
and action \
@@ -1626,7 +1626,7 @@ WOK
@sys.home
end
def sisurc_path
- Get_init.instance.sisu_yaml.rc_path
+ GetInit.instance.sisu_yaml.rc_path
end
def pwd
@sys.pwd
@@ -1689,7 +1689,7 @@ WOK
@sys.rc_path
end
def yamlrc
- Get_init.instance.sisu_yaml.rc_path
+ GetInit.instance.sisu_yaml.rc_path
end
def man #check use
(defined? @rc['webserv']['man']) \
@@ -2437,7 +2437,7 @@ WOK
elsif conf; @rc['default']['language'] #3 config: from sisurc.yaml
else defaults[:language] #4 sisu: program default
end #1 document: param gets
- SiSU_Env::Standardise_language.new(l)
+ SiSU_Env::StandardiseLanguage.new(l)
end
#def multilingual
# x=(defined? @rc['output_structure']['multilingual'] \
@@ -2511,7 +2511,7 @@ WOK
end
if f_pod \
&& FileTest.file?(f_pod)
- tree=(SiSU_Env::System_call.new.program_found?('tree')) \
+ tree=(SiSU_Env::SystemCall.new.program_found?('tree')) \
? "tree #{processing_path.processing}/sisupod"
: ''
if FileTest.directory?(processing_path.processing)
@@ -2541,10 +2541,10 @@ WOK
sisupod_processing_path
end
end
- class Info_processing_flag
+ class InfoProcessingFlag
attr_accessor :color,:cf_0,:cf_1,:cf_2,:cf_3,:cf_4,:cf_5
def initialize
- @rc=Get_init.instance.sisu_yaml.rc
+ @rc=GetInit.instance.sisu_yaml.rc
end
def color #processing flag shortcuts
(defined? @rc['flag']['color']) ? @rc['flag']['color'] : false
@@ -2598,7 +2598,7 @@ WOK
end
end
end
- class Info_settings < Info_env
+ class InfoSettings < InfoEnv
def permission?(prog) #program defaults
(defined? @rc['permission_set'][prog]) \
? @rc['permission_set'][prog]
@@ -2610,14 +2610,14 @@ WOK
: false
end
end
- class File_map < Info_env
+ class FileMap < InfoEnv
attr_accessor :local_sisu_source
def initialize(opt='') #watch / REVIEW
super()
@opt=opt #,opt.fns,opt.cmd
@env=(@opt.fns && !(@opt.fns.empty?) \
- ? (SiSU_Env::Info_env.new(@opt.fns))
- : (SiSU_Env::Info_env.new('dummy.sst')))
+ ? (SiSU_Env::InfoEnv.new(@opt.fns))
+ : (SiSU_Env::InfoEnv.new('dummy.sst')))
if @opt.cmd =~/m/; @md=SiSU_Param::Parameters.new(@opt).get
end
ft=[]
@@ -2735,19 +2735,19 @@ WOK
: @source_path
end
end
- class Clean_output
+ class CleanOutput
require 'fileutils'
include FileUtils::Verbose
def initialize(opt)
@opt=opt
- z=File_map.new(@opt)
+ z=FileMap.new(@opt)
@zap=z.local_sisu_source
if @opt.cmd =~ /[hH]/
@zap=Dir.glob(@zap).join(' ')
if @opt.cmd !~ /w/; @zap.gsub!(/#{@source_path}\/concordance.html/,'')
end
end
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
end
def zap
def main_output
@@ -2781,11 +2781,11 @@ WOK
self
end
end
- class Info_remote_host
+ class InfoRemoteHost
def initialize
- @rc=Get_init.instance.sisu_yaml.rc
+ @rc=GetInit.instance.sisu_yaml.rc
end
- def remote_host #see Info_remote remote_host_base_general
+ def remote_host #see InfoRemote remote_host_base_general
r=[]
r=if (defined? @rc['remote'] \
and @rc['remote'].class==Array)
@@ -2829,48 +2829,48 @@ WOK
end
def rhost
def r1
- (defined? SiSU_Env::Info_remote_host.new.remote_host[0][:name]) \
- ? (SiSU_Env::Info_remote_host.new.remote_host[0][:name])
+ (defined? SiSU_Env::InfoRemoteHost.new.remote_host[0][:name]) \
+ ? (SiSU_Env::InfoRemoteHost.new.remote_host[0][:name])
: nil
end
def r2
- (defined? SiSU_Env::Info_remote_host.new.remote_host[1][:name]) \
- ? (SiSU_Env::Info_remote_host.new.remote_host[1][:name])
+ (defined? SiSU_Env::InfoRemoteHost.new.remote_host[1][:name]) \
+ ? (SiSU_Env::InfoRemoteHost.new.remote_host[1][:name])
: nil
end
def r3
- (defined? SiSU_Env::Info_remote_host.new.remote_host[2][:name]) \
- ? (SiSU_Env::Info_remote_host.new.remote_host[2][:name])
+ (defined? SiSU_Env::InfoRemoteHost.new.remote_host[2][:name]) \
+ ? (SiSU_Env::InfoRemoteHost.new.remote_host[2][:name])
: nil
end
def r4
- (defined? SiSU_Env::Info_remote_host.new.remote_host[3][:name]) \
- ? (SiSU_Env::Info_remote_host.new.remote_host[3][:name])
+ (defined? SiSU_Env::InfoRemoteHost.new.remote_host[3][:name]) \
+ ? (SiSU_Env::InfoRemoteHost.new.remote_host[3][:name])
: nil
end
def r5
- (defined? SiSU_Env::Info_remote_host.new.remote_host[4][:name]) \
- ? (SiSU_Env::Info_remote_host.new.remote_host[4][:name])
+ (defined? SiSU_Env::InfoRemoteHost.new.remote_host[4][:name]) \
+ ? (SiSU_Env::InfoRemoteHost.new.remote_host[4][:name])
: nil
end
def r6
- (defined? SiSU_Env::Info_remote_host.new.remote_host[5][:name]) \
- ? (@ls + SiSU_Env::Info_remote_host.new.remote_host[5][:name])
+ (defined? SiSU_Env::InfoRemoteHost.new.remote_host[5][:name]) \
+ ? (@ls + SiSU_Env::InfoRemoteHost.new.remote_host[5][:name])
: nil
end
self
end
end
- class Info_remote < File_map
+ class InfoRemote < FileMap
@@flag_remote=false
require 'socket'
def initialize(opt)
super(opt) #
@opt=opt
- @rc=Get_init.instance.sisu_yaml.rc
+ @rc=GetInit.instance.sisu_yaml.rc
end
def remote_host_base_general
- SiSU_Env::Info_remote_host.new.remote_host
+ SiSU_Env::InfoRemoteHost.new.remote_host
end
def remote_host_base
remote_host_base_general.each do |remote_conn|
@@ -2901,15 +2901,15 @@ WOK
and remote_gen !~/\/\//) \
and @@flag_remote==true \
and @opt.cmd !~/U/
- System_call.new(local_gen,remote_gen).scp
+ SystemCall.new(local_gen,remote_gen).scp
if FileTest.file?("#{local_src}/#{src_txt}")
- System_call.new("#{local_src}/#{src_txt}",remote_src).scp
+ SystemCall.new("#{local_src}/#{src_txt}",remote_src).scp
end
if FileTest.file?("#{local_pod}/#{src_pod}")
- System_call.new("#{local_src}/#{src_pod}",remote_pod).scp
+ SystemCall.new("#{local_src}/#{src_pod}",remote_pod).scp
end
if FileTest.file?("#{local_epub}/#{@opt.fnb}.epub")
- System_call.new("#{local_epub}/#{@opt.fnb}.epub",remote_epub,@opt.cmd).scp
+ SystemCall.new("#{local_epub}/#{@opt.fnb}.epub",remote_epub,@opt.cmd).scp
end
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
@@ -2936,7 +2936,7 @@ WOK
and @@flag_remote==true \
and @opt.cmd !~/U/
puts "begin scp_base: #{local} -> #{remote}"
- System_call.new("#{local}/#{@env.path.style}/",remote).scp
+ SystemCall.new("#{local}/#{@env.path.style}/",remote).scp
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "begin scp_base: #{local} -> #{remote}"
@@ -2954,9 +2954,9 @@ WOK
and @@flag_remote==true \
and @opt.cmd !~/U/
puts "begin scp_base_all: #{local} -> #{remote}"
- System_call.new("#{local}/_sisu/image_sys/",remote).scp
- System_call.new("#{local}/_sisu/image/",remote).scp
- System_call.new("#{local}/#{@env.path.style}/",remote).scp
+ SystemCall.new("#{local}/_sisu/image_sys/",remote).scp
+ SystemCall.new("#{local}/_sisu/image/",remote).scp
+ SystemCall.new("#{local}/#{@env.path.style}/",remote).scp
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "scp_base_all: #{local} -> #{remote}"
@@ -2970,7 +2970,7 @@ WOK
self
end
def images_from_skin
- skin=Info_skin.new(@md).select
+ skin=InfoSkin.new(@md).select
skin_array=nil
skin_images_array=[]
if skin
@@ -3001,7 +3001,7 @@ WOK
and remote_gen !~/\/\//) \
and @@flag_remote==true \
and @opt.cmd !~/U/
-# System_call.new("#{local_src}/#{src_txt}",remote_src,@opt.cmd).rsync
+# SystemCall.new("#{local_src}/#{src_txt}",remote_src,@opt.cmd).rsync
delete_extra_files='--delete' # '--delete-after'
inp=[]
if (@opt.cmd =~/h/ \
@@ -3108,13 +3108,13 @@ WOK
##create file structure without copying files?:
##rsync -av -f"+ */" -f"- *" @f.output_path.base.dir remote:./path/.
#local_dirs=%{-f"+ */" -f"- *" #{@f.output_path.base.dir}/*}
- #System_call.new(local_dirs,remote_gen,@opt.cmd).rsync
+ #SystemCall.new(local_dirs,remote_gen,@opt.cmd).rsync
local=local_gen + ' ' + images + ' ' + images_skin + ' ' + images_system + ' ' + local_css
- System_call.new(local,remote_rel,@opt.cmd).rsync('--relative',@f.output_path.base.dir)
+ SystemCall.new(local,remote_rel,@opt.cmd).rsync('--relative',@f.output_path.base.dir)
rescue
p __LINE__.to_s + ':' + __FILE__
local_dirs=%{--include='*/' --exclude='*' #{@f.output_path.base.dir}}
- System_call.new(local_dirs,remote_gen,@opt.cmd).rsync
+ SystemCall.new(local_dirs,remote_gen,@opt.cmd).rsync
end
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
@@ -3141,9 +3141,9 @@ WOK
and @rc['permission_set']['remote_base_site'] \
and @@flag_remote==true \
and @opt.cmd !~/U/
- System_call.new("#{image_sys}","#{remote_conf}").rsync
- System_call.new("#{images}","#{remote_conf}").rsync
- System_call.new("#{ldest}","#{remote}").rsync
+ SystemCall.new("#{image_sys}","#{remote_conf}").rsync
+ SystemCall.new("#{images}","#{remote_conf}").rsync
+ SystemCall.new("#{ldest}","#{remote}").rsync
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "rsync_base: #{local} -> #{remote}"
@@ -3164,9 +3164,9 @@ WOK
and @opt.cmd !~/U/
delete_extra_files='--delete' # '--delete-after'
puts "begin rsync_base_sync: #{local} -> #{remote}"
- System_call.new("#{local}/_sisu/image_sys/",remote).rsync(delete_extra_files)
- System_call.new("#{local}/_sisu/image/",remote).rsync(delete_extra_files)
- System_call.new("#{local}/#{@env.path.style}/",remote).rsync(delete_extra_files)
+ SystemCall.new("#{local}/_sisu/image_sys/",remote).rsync(delete_extra_files)
+ SystemCall.new("#{local}/_sisu/image/",remote).rsync(delete_extra_files)
+ SystemCall.new("#{local}/#{@env.path.style}/",remote).rsync(delete_extra_files)
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "rsync_base_sync: #{local} -> #{remote}"
@@ -3185,7 +3185,7 @@ WOK
remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/."
if @@flag_remote
delete_extra_files='--delete' # '--delete-after'
- System_call.new(local,remote).rsync(delete_extra_files)
+ SystemCall.new(local,remote).rsync(delete_extra_files)
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "rsync_sitemaps: #{local} -> #{remote}"
@@ -3199,7 +3199,7 @@ WOK
remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/."
if @@flag_remote
delete_extra_files='--delete' # '--delete-after'
- System_call.new(local,remote).rsync(delete_extra_files)
+ SystemCall.new(local,remote).rsync(delete_extra_files)
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "rsync_sitemaps: #{local} -> #{remote}"
@@ -3208,7 +3208,7 @@ WOK
end
end
end
- class Info_version <Info_env
+ class InfoVersion <InfoEnv
include Singleton
require 'rbconfig'
@@lib_path=nil
@@ -3226,11 +3226,11 @@ WOK
%x{ruby -v}.strip
end
end
- class Create_system_link #revisit problems created 2004w41
+ class CreateSystemLink #revisit problems created 2004w41
require 'fileutils'
include FileUtils::Verbose
def initialize
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
end
def images
unless FileTest.directory?("#{@env.path.output}/_sisu")
@@ -3248,12 +3248,12 @@ WOK
#File.symlink("../../man/form", "#{@env.path.output}/man/pdf") unless File.symlink?("#{@env.path.output}/man/pdf")==true
end
end
- class Info_file <Info_env #todo unify with FileOp
+ class InfoFile <InfoEnv #todo unify with FileOp
def initialize(fns)
begin
super(fns)
@fns=fns
- @env=SiSU_Env::Info_env.new(@fns)
+ @env=SiSU_Env::InfoEnv.new(@fns)
m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss
@fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3]
rescue; STDERR.puts SiSU_Screen::Ansi.new(@fns,$!,$@).rescue
@@ -3326,11 +3326,11 @@ WOK
end
end
end
- class FileOp <Info_file #todo unify with Create_file
+ class FileOp <InfoFile #todo unify with CreateFile
def initialize(md,fno='')
begin
@md,@fno=md,fno
- @env=SiSU_Env::Info_env.new(@md.fns)
+ @env=SiSU_Env::InfoEnv.new(@md.fns)
rescue; STDERR.puts SiSU_Screen::Ansi.new(@cmd,$!,$@).rescue
ensure
end
@@ -4726,11 +4726,11 @@ WOK
self
end
end
- class Create_file <Info_env #todo unify with FileOp
+ class CreateFile <InfoEnv #todo unify with FileOp
def initialize(fns)
begin
super(fns)
- @env=SiSU_Env::Info_env.new(fns)
+ @env=SiSU_Env::InfoEnv.new(fns)
rescue; STDERR.puts SiSU_Screen::Ansi.new(@fns,$!,$@).rescue
ensure
end
@@ -4808,13 +4808,13 @@ WOK
File.new("#{@env.processing_path.texinfo}/#{@fnb}.texinfo",'w+')
end
end
- class Clear <Info_env #todo unify with FileOp
+ class Clear <InfoEnv #todo unify with FileOp
def initialize(cmd,fns,operation='')
@cmd=cmd
begin
super(fns)
- @env=SiSU_Env::Info_env.new(fns)
- ver=Info_version.instance
+ @env=SiSU_Env::InfoEnv.new(fns)
+ ver=InfoVersion.instance
if operation.class.inspect =~/SiSU_Param/
@md=operation
end
@@ -4838,25 +4838,25 @@ WOK
end
def param_instantiate
@cX||=SiSU_Screen::Ansi.new(@cmd)
- @@date=Info_date.new
+ @@date=InfoDate.new
@@proc=@@filename_txt=@@filename_texinfo=@@filename_lout_portrait=@@filename_lout_landscape=@@filename_html_scroll=@@filename_html_index=@@filename_html_segtoc=@@filename_semantic=@@filename_rss=@@newfile=@@drr=@@yaml=@@yamladdr=nil
@@publisher='SiSU scribe'
end
end
- class Info_db < Info_env
+ class InfoDb < InfoEnv
@@rc=nil
def initialize
@@pwd ||=Dir.pwd
@pwd=Dir.pwd
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
#m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
#@pwd_stub=@pwd[m,1]
pt=Pathname.new(@pwd)
r=Px[:lng_lst].join('|')
u=/.+?\/([^\/]+)(?:\/(?:#{r})$|$)/
@pwd_stub=pt.realpath.to_s[u,1]
- @rc=@@rc ||=Get_init.instance.sisu_yaml.rc
- @defaults=Info_env.new.defaults
+ @rc=@@rc ||=GetInit.instance.sisu_yaml.rc
+ @defaults=InfoEnv.new.defaults
end
def share_source?
((defined? @rc['db']['share_source']) \
@@ -4943,22 +4943,22 @@ WOK
self
end
end
- class Info_port < Info_env
+ class InfoPort < InfoEnv
def initialize
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
end
def webrick
@env.url.webrick_port
end
end
- class Info_program < Info_env #revisit
+ class InfoProgram < InfoEnv #revisit
attr_accessor :editor,:wc,:tidy,:rexml,:pdflatex,:postgresql,:sqlite
def initialize
- prog=SiSU_Env::Info_env.new.program
+ prog=SiSU_Env::InfoEnv.new.program
@editor,@wc,@tidy,@rexml,@pdflatex,@postgresql,@sqlite=prog.text_editor,prog.wc,prog.tidy,prog.rexml,prog.pdflatex,prog.postgresql,prog.sqlite
end
end
- class Info_skin
+ class InfoSkin
def initialize(md=nil,skin=nil)
@md=md
@d_sk=if skin.class==String ; skin
@@ -4970,7 +4970,7 @@ WOK
@home,@pwd=ENV['HOME'],ENV['PWD']
m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub=@pwd[m,1]
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
end
def select # skin loading logic here
load "#{SiSU_lib}/defaults.rb"
@@ -5016,7 +5016,7 @@ WOK
end
end
end
- class CSS_default
+ class CSS_Default
def html
'html.css'
end
@@ -5042,10 +5042,10 @@ WOK
'harvest.css'
end
end
- class CSS_select < Info_env
+ class CSS_Select < InfoEnv
def initialize(md)
@md=md
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
end
def html
css=if @md.doc_css \
@@ -5053,7 +5053,7 @@ WOK
"#{@md.doc_css}_html.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_html.css")
"#{@env.path.stub_pwd}_html.css"
- else CSS_default.new.html
+ else CSS_Default.new.html
end
end
def html_tables
@@ -5062,7 +5062,7 @@ WOK
"#{@md.doc_css}_html_tables.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_html_tables.css")
"#{@env.path.stub_pwd}_html_tables.css"
- else CSS_default.new.html_tables
+ else CSS_Default.new.html_tables
end
end
def xhtml
@@ -5071,7 +5071,7 @@ WOK
"#{@md.doc_css}_xhtml.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_xhtml.css")
"#{@env.path.stub_pwd}_xhtml.css"
- else CSS_default.new.xhtml
+ else CSS_Default.new.xhtml
end
end
def xml_sax
@@ -5080,7 +5080,7 @@ WOK
"#{@md.doc_css}_xml_sax.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_xml_sax.css")
"#{@env.path.stub_pwd}_xml_sax.css"
- else CSS_default.new.xml_sax
+ else CSS_Default.new.xml_sax
end
end
def xml_dom
@@ -5089,7 +5089,7 @@ WOK
"#{@md.doc_css}_xml_dom.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_xml_dom.css")
"#{@env.path.stub_pwd}_xml_dom.css"
- else CSS_default.new.xml_dom
+ else CSS_Default.new.xml_dom
end
end
def docbook_xml
@@ -5098,7 +5098,7 @@ WOK
"#{@md.doc_css}_xml_dom.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_docbook.css")
"#{@env.path.stub_pwd}_docbook.css"
- else CSS_default.new.docbook_xml
+ else CSS_Default.new.docbook_xml
end
end
def homepage
@@ -5107,15 +5107,15 @@ WOK
"#{@md.doc_css}_homepage.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.stub_pwd}_homepage.css")
"#{@env.path.stub_pwd}_homepage.css"
- else CSS_default.new.homepage
+ else CSS_Default.new.homepage
end
end
end
- class CSS_stylesheet
+ class CSS_Stylesheet
def initialize(md)
@md=md
- @css=CSS_select.new(@md)
- @env=SiSU_Env::Info_env.new
+ @css=CSS_Select.new(@md)
+ @env=SiSU_Env::InfoEnv.new
@file=SiSU_Env::FileOp.new(@md)
end
def html
@@ -5143,15 +5143,15 @@ WOK
%{<?xml-stylesheet type="text/css" href="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_dom}"?>}
end
end
- class Create_site < Info_env
+ class CreateSite < InfoEnv
require_relative 'css' # css.rb
include SiSU_Style
def initialize(cmd)
@cmd=cmd
- @env=SiSU_Env::Info_env.new
+ @env=SiSU_Env::InfoEnv.new
@home,@pwd=ENV['HOME'],ENV['PWD'] #@pwd=Dir.pwd
- @rc=Get_init.instance.sisu_yaml.rc
- @vz=SiSU_Env::Get_init.instance.skin
+ @rc=GetInit.instance.sisu_yaml.rc
+ @vz=SiSU_Env::GetInit.instance.skin
@vz_home=SiSU_Viz::Home.new
end
def homepage
@@ -5240,7 +5240,7 @@ WOK
end
else SiSU_Screen::Ansi.new(@cmd,"modify css is not set or is set to: false").warn if @cmd=~/[MV]/
end
- fn_css=SiSU_Env::CSS_default.new
+ fn_css=SiSU_Env::CSS_Default.new
css=SiSU_Style::CSS.new
path_style="#{@env.path.output}/#{@env.path.style}"
FileUtils::mkdir_p(path_style) unless FileTest.directory?(path_style)