class SiSU_XML_SAX::Source
Public Class Methods
new(opt)
click to toggle source
# File lib/sisu/xml_sax.rb, line 71 def initialize(opt) @opt=opt @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) end
Public Instance Methods
read()
click to toggle source
# File lib/sisu/xml_sax.rb, line 75 def read begin @env, @md, @ao_arr= @particulars.env,@particulars.md,@particulars.ao_array unless @opt.act[:quiet][:set]==:on tool=if (@opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) @env.program.web_browser \ + ' file://' \ + @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax + "\n\t" \ + @env.program.xml_viewer \ + ' file://' \ + @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax elsif @opt.act[:verbose][:set]==:on @env.program.web_browser \ + ' file://' \ + @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end (@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], 'XML SAX', tool ).green_hi_blue : SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], 'XML SAX', tool ).green_title_hi if (@opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], @opt.fns, 'file://' \ + @md.file.output_path.xml_sax.dir + '/' \ + @md.file.base_filename.xml_sax ).flow end end SiSU_XML_SAX::Source::Songsheet.new(@particulars).song rescue SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure #file closed in songsheet SiSU_Env::CreateSite.new(@opt).cp_css Dir.chdir(@opt.f_pth[:pth]) end end