aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/conf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/conf.rb')
-rw-r--r--lib/sisu/v6/conf.rb73
1 files changed, 54 insertions, 19 deletions
diff --git a/lib/sisu/v6/conf.rb b/lib/sisu/v6/conf.rb
index c2333191..8795d8d3 100644
--- a/lib/sisu/v6/conf.rb
+++ b/lib/sisu/v6/conf.rb
@@ -86,46 +86,81 @@ module SiSU_Initialize
def initialize(opt)
@opt=opt
@env=SiSU_Env::InfoEnv.new(@opt.fns)
- @suffix,@path={},{}
- @suffix[:rnc]='rnc'
- @suffix[:rng]='rng'
- @suffix[:xsd]='xsd'
- @path[:xml]= @env.path.output + '/_sisu/xml'
- @path[:xsd]= @env.path.output + '/_sisu/xml/xsd'
- @path[:rnc]= @env.path.output + '/_sisu/xml/rnc'
- @path[:rng]= @env.path.output + '/_sisu/xml/rng'
+ @suffix={
+ rnc: 'rnc',
+ rng: 'rng',
+ xsd: 'xsd',
+ }
+ @path={
+ xml: @env.path.output + '/_sisu/xml',
+ xsd: @env.path.output + '/_sisu/xml/xsd',
+ rnc: @env.path.output + '/_sisu/xml/rnc',
+ rng: @env.path.output + '/_sisu/xml/rng',
+ style: @env.path.output + '/' + @env.path.style,
+ }
@pwd,@home=Dir.pwd,@env.path.home
end
def make_homepage
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'invert','Make homepage','').colorize unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'invert',
+ 'Make homepage',
+ ''
+ ).colorize unless @opt.act[:quiet][:set]==:on
SiSU_Env::CreateSite.new(@opt.cmd).homepage
end
def cp_local_images
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'invert','Copy images','').colorize unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'invert',
+ 'Copy images',
+ ''
+ ).colorize unless @opt.act[:quiet][:set]==:on
SiSU_Env::CreateSite.new(@opt.cmd).cp_local_images
SiSU_Env::CreateSite.new(@opt.cmd).cp_webserver_images_local #this should not have been necessary
SiSU_Env::CreateSite.new(@opt.cmd).cp_base_images #base images (nav etc.) used by all html
end
def cp_external_images
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'invert','Copy external images','').colorize if @opt.act[:verbose_plus][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'invert',
+ 'Copy external images',
+ ''
+ ).colorize if @opt.act[:verbose_plus][:set]==:on
SiSU_Env::CreateSite.new(@opt.cmd).cp_external_images
end
def cp_webserver_images
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'invert','Copy webserver/output file images','').colorize unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'invert',
+ 'Copy webserver/output file images',
+ ''
+ ).colorize unless @opt.act[:quiet][:set]==:on
SiSU_Env::CreateSite.new(@opt.cmd).cp_webserver_images
end
def css
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'invert','Configuring CSSs','').colorize unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'invert',
+ 'Configuring CSSs',
+ ''
+ ).colorize unless @opt.act[:quiet][:set]==:on
SiSU_Env::CreateSite.new(@opt.cmd).cp_css
end
def dtd
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'invert','Configuring DTDs','').colorize unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'invert',
+ 'Configuring DTDs',
+ ''
+ ).colorize unless @opt.act[:quiet][:set]==:on
@rxng=SiSU_Relaxng::RelaxNG.new
- @path.each { |d| FileUtils::mkdir_p(d[1]) unless FileTest.directory?(d[1]) }
+ @path.each { |d| FileUtils::mkdir_p(d[1]) \
+ unless FileTest.directory?(d[1]) }
#ugly code, sort later
if @rxng.methods.join =~/[^_]dtd_sax\b/
if @rxng.dtd_sax.length > 200
- dtd=File.new("#{@env.path.output}/#{@env.path.style}/#{@rxng.rng_name.output_sax}",'w')
+ dtd=File.new("#{@path[:style]}/#{@rxng.rng_name.output_sax}",'w')
dtd << @rxng.dtd_sax
dtd.close
else trang_rnc_model_output_sax
@@ -134,7 +169,7 @@ module SiSU_Initialize
end
if @rxng.methods.join =~/[^_]dtd_dom\b/
if @rxng.dtd_dom.length > 200
- dtd=File.new("#{@env.path.output}/#{@env.path.style}/#{@rxng.rng_name.output_dom}",'w')
+ dtd=File.new("#{@path[:style]}/#{@rxng.rng_name.output_dom}",'w')
dtd << @rxng.dtd_dom
dtd.close
else trang_rnc_model_output_dom
@@ -143,7 +178,7 @@ module SiSU_Initialize
end
if @rxng.methods.join =~/[^_]dtd_node\b/
if @rxng.dtd_node.length > 200
- dtd=File.new("#{@env.path.output}/#{@env.path.style}/#{@rxng.rng_name.input_node}",'w')
+ dtd=File.new("#{@path[:style]}/#{@rxng.rng_name.input_node}",'w')
dtd << @rxng.dtd_node
dtd.close
else trang_rnc_model_input_node
@@ -152,7 +187,7 @@ module SiSU_Initialize
end
if @rxng.methods.join =~/[^_]dtd_xhtml\b/
if @rxng.dtd_xhtml.length > 200
- dtd=File.new("#{@env.path.output}/#{@env.path.style}/#{@rxng.rng_name.output_xhtml}",'w')
+ dtd=File.new("#{@path[:style]}/#{@rxng.rng_name.output_xhtml}",'w')
dtd << @rxng.dtd_xhtml
dtd.close
else trang_rnc_model_output_xhtml