aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-09-28 21:34:48 -0400
committerRalph Amissah <ralph@amissah.com>2014-09-28 21:34:48 -0400
commit4a794af5dbb150b19d2d36a00c475b3c7f1531da (patch)
tree1078371069bf444f23b733b038d76dfa0ce481ec /lib/sisu/v5
parentqi (quick installer) minor (diff)
v5 v6: xml cosmetic code, minor
Diffstat (limited to 'lib/sisu/v5')
-rw-r--r--lib/sisu/v5/xml_dom.rb29
-rw-r--r--lib/sisu/v5/xml_sax.rb31
2 files changed, 45 insertions, 15 deletions
diff --git a/lib/sisu/v5/xml_dom.rb b/lib/sisu/v5/xml_dom.rb
index 96f92605..7b036567 100644
--- a/lib/sisu/v5/xml_dom.rb
+++ b/lib/sisu/v5/xml_dom.rb
@@ -84,13 +84,24 @@ module SiSU_XML_DOM
end
def read
begin
- @env,@md,@ao_array=@particulars.env,@particulars.md,@particulars.ao_array
+ @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_dom.dir}/#{@md.file.base_filename.xml_dom}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}"
+ @env.program.web_browser \
+ + ' file://' \
+ + @md.file.output_path.xml_dom.dir + '/' \
+ + @md.file.base_filename.xml_dom + "\n\t" \
+ + @env.program.xml_viewer \
+ + ' file://' \
+ + @md.file.output_path.xml_dom.dir + '/' \
+ + @md.file.base_filename.xml_dom
elsif @opt.act[:verbose][:set]==:on
- "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}"
+ @env.program.web_browser \
+ + ' file://' \
+ + @md.file.output_path.xml_dom.dir + '/' \
+ + @md.file.base_filename.xml_dom
else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
end
(@opt.act[:verbose][:set]==:on \
@@ -111,7 +122,9 @@ module SiSU_XML_DOM
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
@opt.fns,
- "file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}"
+ 'file://' \
+ + @md.file.output_path.xml_dom.dir + '/' \
+ + @md.file.base_filename.xml_dom
).flow
end
end
@@ -128,7 +141,8 @@ module SiSU_XML_DOM
private
class Songsheet
def initialize(particulars)
- @env,@md,@ao_array,@particulars=particulars.env,particulars.md,particulars.ao_array,particulars
+ @env, @md, @ao_arr, @particulars=
+ particulars.env,particulars.md,particulars.ao_array,particulars
@file=SiSU_Env::FileOp.new(@md)
end
def songsheet
@@ -154,14 +168,15 @@ module SiSU_XML_DOM
require_relative 'xhtml_shared' # decide use, whether xml rather than xhtml
@@xml={ body: [], open: [], close: [], head: [], sc: [] }
def initialize(particulars)
- @env,@md,@ao_array=particulars.env,particulars.md,particulars.ao_array
+ @env, @md, @ao_arr=
+ particulars.env,particulars.md,particulars.ao_array
@vz=SiSU_Viz::Defaults.new
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
end
def songsheet
pre
- @data=markup(@ao_array)
+ @data=markup(@ao_arr)
post
publish
end
diff --git a/lib/sisu/v5/xml_sax.rb b/lib/sisu/v5/xml_sax.rb
index 17a6b1f4..fca6afa3 100644
--- a/lib/sisu/v5/xml_sax.rb
+++ b/lib/sisu/v5/xml_sax.rb
@@ -83,13 +83,24 @@ module SiSU_XML_SAX
end
def read
begin
- @env,@md,@ao_array=@particulars.env,@particulars.md,@particulars.ao_array
+ @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}"
+ @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}"
+ @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 \
@@ -110,7 +121,9 @@ module SiSU_XML_SAX
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}"
+ 'file://' \
+ + @md.file.output_path.xml_sax.dir + '/' \
+ + @md.file.base_filename.xml_sax
).flow
end
end
@@ -128,7 +141,8 @@ module SiSU_XML_SAX
private
class Songsheet
def initialize(particulars)
- @env,@md,@ao_array,@particulars=particulars.env,particulars.md,particulars.ao_array,particulars
+ @env, @md, @ao_arr, @particulars=
+ particulars.env,particulars.md,particulars.ao_array,particulars
@file=SiSU_Env::FileOp.new(@md)
end
def song
@@ -155,14 +169,15 @@ module SiSU_XML_SAX
require_relative 'xhtml_shared' # decide use, whether xml rather than xhtml
@@xml={ body: [], open: [], close: [], head: [] }
def initialize(particulars)
- @env,@md,@ao_array=particulars.env,particulars.md,particulars.ao_array
+ @env, @md, @ao_arr=
+ particulars.env,particulars.md,particulars.ao_array
@vz=SiSU_Viz::Defaults.new
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
end
def songsheet
pre
- @data=markup(@ao_array)
+ @data=markup(@ao_arr)
post
publish
end
@@ -302,7 +317,7 @@ WOK
@@xml[:body] << %{#{Ax[:tab]*1}<text class="verse">#{Ax[:tab]*1}}
@@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
@@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @@xml[:body] << %{#{Ax[:tab]*0}</object>}
end
def code_structure(dob='')
dob=@trans.markup_group(dob)