aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/dal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/dal.rb')
-rw-r--r--lib/sisu/v3/dal.rb86
1 files changed, 43 insertions, 43 deletions
diff --git a/lib/sisu/v3/dal.rb b/lib/sisu/v3/dal.rb
index 50cf94f9..bd8d32dd 100644
--- a/lib/sisu/v3/dal.rb
+++ b/lib/sisu/v3/dal.rb
@@ -66,7 +66,7 @@ module SiSU_DAL
include SiSU_Param
require_relative 'dal_doc_objects' # dal_doc_objects.rb
require_relative 'dal_syntax' # dal_syntax.rb
- include SiSU_Syntax
+ include SiSU_DAL_Syntax
require_relative 'dal_doc_str' # dal_doc_str.rb
require_relative 'dal_idx' # dal_idx.rb
require_relative 'dal_numbering' # dal_numbering.rb
@@ -94,9 +94,9 @@ module SiSU_DAL
@opt,@fnx=opt,fnx
@@fns||@opt.fns
@make_fns=if @fnx and @fnx =~/\.ss[tmi]$/
- SiSU_Env::Info_file.new(@fnx)
+ SiSU_Env::InfoFile.new(@fnx)
else
- SiSU_Env::Info_file.new(@opt.fns)
+ SiSU_Env::InfoFile.new(@opt.fns)
end
@fnm=@make_fns.marshal.dal_metadata
@fnc=@make_fns.marshal.dal_content
@@ -106,8 +106,8 @@ module SiSU_DAL
@idx_xhtml=@make_fns.marshal.dal_idx_xhtml
@map_nametags=@make_fns.marshal.dal_map_nametags
@map_ocn_htmlseg=@make_fns.marshal.dal_map_ocn_htmlseg
- SiSU_Env::Create_system_link.new.images
- @env=SiSU_Env::Info_env.new
+ SiSU_Env::CreateSystemLink.new.images
+ @env=SiSU_Env::InfoEnv.new
end
def read #creates dal
begin
@@ -117,9 +117,9 @@ module SiSU_DAL
? @fnx
: @opt.fns
create_dal
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@@fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@@fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get #reads dal, unless does not exist then creates first
@@ -133,9 +133,9 @@ module SiSU_DAL
@@dal_array=[]
end
dal=(@@dal_array.empty?) ? read_fnc : @@dal_array.dup
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get_idx_sst #reads dal idx.sst, #unless does not exist then creates first
@@ -149,9 +149,9 @@ module SiSU_DAL
@@idx_arr[:sst]=[]
end
dal=(@@idx_arr[:sst].empty?) ? read_idx_sst : @@idx_arr[:sst].dup #check
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get_idx_tex #reads dal idx.tex, #unless does not exist then creates first
@@ -165,9 +165,9 @@ module SiSU_DAL
@@idx_arr[:tex]=[]
end
dal=(@@idx_arr[:tex].empty?) ? read_idx_tex : @@idx_arr[:tex].dup #check
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get_idx_html #reads dal idx.html, #unless does not exist then creates first
@@ -181,9 +181,9 @@ module SiSU_DAL
@@idx_arr[:html]=[]
end
dal=(@@idx_arr[:html].empty?) ? read_idx_html : @@idx_arr[:html].dup
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get_idx_xhtml #reads dal idx.xhtml, #unless does not exist then creates first
@@ -197,9 +197,9 @@ module SiSU_DAL
@@idx_arr[:xthml]=[]
end
dal=(@@idx_arr[:xhtml].empty?) ? read_idx_xhtml : @@idx_arr[:xhtml].dup
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get_map_nametags #reads dal map.nametags, #unless does not exist then creates first
@@ -213,9 +213,9 @@ module SiSU_DAL
@@map_arr[:nametags]=[]
end
dal=(@@map_arr[:nametags].empty?) ? read_map_nametags : @@map_arr[:nametags].dup
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
def get_map_ocn_htmlseg #reads dal map.ocn_htmlseg, #unless does not exist then creates first
@@ -229,9 +229,9 @@ module SiSU_DAL
@@map_arr[:ocn_htmlseg]=[]
end
dal=(@@map_arr[:ocn_htmlseg].empty?) ? read_map_ocn_htmlseg : @@map_arr[:ocn_htmlseg].dup
- rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
- Instantiate.new
+ SiSU_DAL::Instantiate.new
end
end
protected
@@ -257,7 +257,7 @@ module SiSU_DAL
meta=nil
dal=SiSU_DAL::Make.new(fn,@md,file_array).song
if @opt.cmd =~/[vM]/
- cf=SiSU_Env::Create_file.new(fn)
+ cf=SiSU_Env::CreateFile.new(fn)
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"~meta/#{@opt.fns}.meta").output if @opt.cmd =~/v/i
SiSU_Screen::Ansi.new(@opt.cmd,"dal -> #{cf.meta}").txt_grey if @opt.cmd =~/M/
end
@@ -340,16 +340,16 @@ module SiSU_DAL
class Output
def initialize(fn,md,data)
@fn,@md,@data=fn,md,data
- @cf=SiSU_Env::Create_file.new(@fn)
- @make=SiSU_Env::Info_file.new(@fn)
- @dir=SiSU_Env::Info_env.new(@fn)
+ @cf=SiSU_Env::CreateFile.new(@fn)
+ @make=SiSU_Env::InfoFile.new(@fn)
+ @dir=SiSU_Env::InfoEnv.new(@fn)
end
def screen_dump(o)
if defined? o.of
print %{OF: #{o.of}; }
end
if defined? o.is
- print %{IS: #{o.is}; }
+ print %{IS: #{o.is.to_s}; }
end
if defined? o.ocn
print %{OCN: #{o.ocn}; }
@@ -386,15 +386,15 @@ module SiSU_DAL
@data.each do |o|
if defined? o.ocn
filename_txt.puts case o.is
- when 'heading'
- "[#{o.is} #{o.lv}~#{o.name} [#{o.ocn}]] #{o.obj}"
- else "[#{o.is} [#{o.ocn}]] #{o.obj}"
+ when :heading
+ "[#{o.is.to_s} #{o.lv}~#{o.name} [#{o.ocn}]] #{o.obj}"
+ else "[#{o.is.to_s} [#{o.ocn}]] #{o.obj}"
end
else
filename_txt.puts case o.is
- when 'meta'
+ when :meta
"[m~#{o.tag}] #{o.obj}"
- else "[#{o.is}] #{o.obj}"
+ else "[#{o.is.to_s}] #{o.obj}"
end
end
end
@@ -402,8 +402,8 @@ module SiSU_DAL
@data.each do |o|
if defined? o.ocn
case o.is
- when 'heading'
- filename_debug.puts "#{o.is} #{o.lv}~#{o.name} odv=#{o.odv} osp=#{o.osp} [#{o.ocn}] -->\n\t#{o.obj}"
+ when :heading
+ filename_debug.puts "#{o.is.to_s} #{o.lv}~#{o.name} odv=#{o.odv} osp=#{o.osp} [#{o.ocn}] -->\n\t#{o.obj}"
end
end
end
@@ -465,7 +465,7 @@ module SiSU_DAL
class Make
def initialize(fn,md,data)
@fn,@md,@data=fn,md,data
- @env=SiSU_Env::Info_env.new(@md.fns)
+ @env=SiSU_Env::InfoEnv.new(@md.fns)
end
def reset
@@flag_vocab=0
@@ -475,15 +475,15 @@ module SiSU_DAL
reset
data=@data
data=data.join.split("\n\n")
- data=SiSU_insertions::Insertions.new(@md,data).expand_insertions? # dal_expand_insertions.rb
- data=SiSU_substitute_and_insert::SI.new(@md,data).substitutions_and_insertions? # dal_substitutions_and_insertions.rb
- data,metadata=SiSU_document_structure_extract::Build.new(@md,data).identify_parts # dal_doc_str.rb
- data=SiSU_Syntax::Markup.new(@md,data).songsheet # dal_syntax.rb
- data,endnote_array=SiSU_character_check::Check.new(data).character_check_and_oldstyle_endnote_array # dal_character_check.rb
- data=SiSU_images::Images.new(@md,data).images # dal_images.rb
- data,tags_map,ocn_html_seg_map=SiSU_numbering::Numbering.new(@md,data).numbering_song # dal_numbering.rb
- data,book_index_rel,book_index_rel_html_seg,html_idx,xhtml_idx=SiSU_book_index::Book_index.new(@md,data,@env).indexing_song if @md.book_idx # dal_idx.rb
- data=SiSU_endnotes::Endnotes.new(@md,data,endnote_array).endnotes # dal_endnotes.rb
+ data=SiSU_DAL_Insertions::Insertions.new(@md,data).expand_insertions? # dal_expand_insertions.rb
+ data=SiSU_DAL_SubstituteAndInsert::SI.new(@md,data).substitutions_and_insertions? # dal_substitutions_and_insertions.rb
+ data,metadata=SiSU_DAL_DocumentStructureExtract::Build.new(@md,data).identify_parts # dal_doc_str.rb
+ data=SiSU_DAL_Syntax::Markup.new(@md,data).songsheet # dal_syntax.rb
+ data,endnote_array=SiSU_DAL_CharacterCheck::Check.new(data).character_check_and_oldstyle_endnote_array # dal_character_check.rb
+ data=SiSU_DAL_Images::Images.new(@md,data).images # dal_images.rb
+ data,tags_map,ocn_html_seg_map=SiSU_DAL_Numbering::Numbering.new(@md,data).numbering_song # dal_numbering.rb
+ data,book_index_rel,book_index_rel_html_seg,html_idx,xhtml_idx=SiSU_DAL_BookIndex::BookIndex.new(@md,data,@env).indexing_song if @md.book_idx # dal_idx.rb
+ data=SiSU_DAL_Endnotes::Endnotes.new(@md,data,endnote_array).endnotes # dal_endnotes.rb
outputdata=data
if @md.opt.cmd =~/[mM]/
SiSU_DAL::Output.new(@fn,@md,outputdata).hard_output