From df67ee1079d074dc2af54aa87187c6538e73d5d7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 10 Jan 2012 22:50:12 -0500 Subject: v3dv: class names, use more CamelCase --- lib/sisu/v3dv/cgi_pgsql.rb | 8 +- lib/sisu/v3dv/cgi_sql_common.rb | 56 ++--- lib/sisu/v3dv/cgi_sqlite.rb | 4 +- lib/sisu/v3dv/character_encoding.rb | 4 +- lib/sisu/v3dv/composite.rb | 16 +- lib/sisu/v3dv/concordance.rb | 28 +-- lib/sisu/v3dv/conf.rb | 36 +-- lib/sisu/v3dv/css.rb | 2 +- lib/sisu/v3dv/dal.rb | 36 +-- lib/sisu/v3dv/dal_doc_objects.rb | 20 +- lib/sisu/v3dv/dal_doc_str.rb | 120 +++++----- lib/sisu/v3dv/dal_expand_insertions.rb | 4 +- lib/sisu/v3dv/dal_hash_digest.rb | 6 +- lib/sisu/v3dv/dal_idx.rb | 10 +- lib/sisu/v3dv/dal_images.rb | 8 +- lib/sisu/v3dv/dal_metadata.rb | 6 +- lib/sisu/v3dv/dal_numbering.rb | 4 +- lib/sisu/v3dv/dal_substitutions_and_insertions.rb | 2 +- lib/sisu/v3dv/dal_syntax.rb | 6 +- lib/sisu/v3dv/db_columns.rb | 4 +- lib/sisu/v3dv/db_create.rb | 8 +- lib/sisu/v3dv/db_dbi.rb | 10 +- lib/sisu/v3dv/db_drop.rb | 4 +- lib/sisu/v3dv/db_import.rb | 56 ++--- lib/sisu/v3dv/db_load_tuple.rb | 8 +- lib/sisu/v3dv/db_remove.rb | 2 +- lib/sisu/v3dv/db_select.rb | 8 +- lib/sisu/v3dv/dbi.rb | 4 +- lib/sisu/v3dv/defaults.rb | 16 +- lib/sisu/v3dv/digests.rb | 14 +- lib/sisu/v3dv/embedded.rb | 18 +- lib/sisu/v3dv/epub.rb | 104 ++++----- lib/sisu/v3dv/epub_concordance.rb | 24 +- lib/sisu/v3dv/epub_format.rb | 48 ++-- lib/sisu/v3dv/epub_segments.rb | 80 +++---- lib/sisu/v3dv/epub_tune.rb | 16 +- lib/sisu/v3dv/errors.rb | 4 +- lib/sisu/v3dv/git.rb | 6 +- lib/sisu/v3dv/harvest.rb | 4 +- lib/sisu/v3dv/harvest_authors.rb | 12 +- lib/sisu/v3dv/harvest_topics.rb | 12 +- lib/sisu/v3dv/help.rb | 26 +-- lib/sisu/v3dv/html.rb | 112 +++++----- lib/sisu/v3dv/html_format.rb | 50 ++--- lib/sisu/v3dv/html_minitoc.rb | 32 +-- lib/sisu/v3dv/html_promo.rb | 8 +- lib/sisu/v3dv/html_scroll.rb | 12 +- lib/sisu/v3dv/html_segments.rb | 84 +++---- lib/sisu/v3dv/html_table.rb | 2 +- lib/sisu/v3dv/html_tune.rb | 16 +- lib/sisu/v3dv/hub.rb | 20 +- lib/sisu/v3dv/manifest.rb | 30 +-- lib/sisu/v3dv/manpage.rb | 22 +- lib/sisu/v3dv/manpage_format.rb | 6 +- lib/sisu/v3dv/modify.rb | 224 +++++++++---------- lib/sisu/v3dv/odf.rb | 20 +- lib/sisu/v3dv/odf_format.rb | 12 +- lib/sisu/v3dv/options.rb | 8 +- lib/sisu/v3dv/param.rb | 36 +-- lib/sisu/v3dv/param_identify_markup.rb | 2 +- lib/sisu/v3dv/particulars.rb | 24 +- lib/sisu/v3dv/plaintext.rb | 20 +- lib/sisu/v3dv/plaintext_format.rb | 6 +- lib/sisu/v3dv/po4a.rb | 40 ++-- lib/sisu/v3dv/po4a_set.rb | 10 +- lib/sisu/v3dv/qrcode.rb | 32 +-- lib/sisu/v3dv/remote.rb | 18 +- lib/sisu/v3dv/rexml.rb | 6 +- lib/sisu/v3dv/screen_text_color.rb | 2 +- lib/sisu/v3dv/share_src.rb | 2 +- lib/sisu/v3dv/share_src_kdissert.rb | 2 +- lib/sisu/v3dv/shared_html.rb | 2 +- lib/sisu/v3dv/shared_html_lite.rb | 8 +- lib/sisu/v3dv/shared_markup_alt.rb | 6 +- lib/sisu/v3dv/shared_metadata.rb | 16 +- lib/sisu/v3dv/shared_txt.rb | 2 +- lib/sisu/v3dv/shared_xhtml.rb | 2 +- lib/sisu/v3dv/shared_xml.rb | 6 +- lib/sisu/v3dv/sisupod_make.rb | 12 +- lib/sisu/v3dv/sitemaps.rb | 12 +- lib/sisu/v3dv/sst_convert_markup.rb | 10 +- lib/sisu/v3dv/sst_do_inline_footnotes.rb | 24 +- lib/sisu/v3dv/sst_from_xml.rb | 2 +- lib/sisu/v3dv/sst_identify_markup.rb | 36 +-- lib/sisu/v3dv/sst_to_s_xml_sax.rb | 36 +-- lib/sisu/v3dv/sysenv.rb | 260 +++++++++++----------- lib/sisu/v3dv/termsheet.rb | 4 +- lib/sisu/v3dv/texinfo.rb | 22 +- lib/sisu/v3dv/texinfo_format.rb | 12 +- lib/sisu/v3dv/texpdf.rb | 94 ++++---- lib/sisu/v3dv/texpdf_format.rb | 62 +++--- lib/sisu/v3dv/update.rb | 10 +- lib/sisu/v3dv/urls.rb | 14 +- lib/sisu/v3dv/webrick.rb | 10 +- lib/sisu/v3dv/wikispeak.rb | 40 ++-- lib/sisu/v3dv/xhtml.rb | 26 +-- lib/sisu/v3dv/xhtml_table.rb | 4 +- lib/sisu/v3dv/xml.rb | 30 +-- lib/sisu/v3dv/xml_dom.rb | 30 +-- lib/sisu/v3dv/xml_fictionbook.rb | 6 +- lib/sisu/v3dv/xml_format.rb | 60 ++--- lib/sisu/v3dv/xml_scaffold.rb | 4 +- lib/sisu/v3dv/xml_tables.rb | 12 +- lib/sisu/v3dv/zap.rb | 6 +- 104 files changed, 1301 insertions(+), 1301 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3dv/cgi_pgsql.rb b/lib/sisu/v3dv/cgi_pgsql.rb index 41c95536..48d49774 100644 --- a/lib/sisu/v3dv/cgi_pgsql.rb +++ b/lib/sisu/v3dv/cgi_pgsql.rb @@ -63,11 +63,11 @@ module SiSU_CGI_PgSQL class SearchPgSQL < CGI_Common def initialize(opt,webserv) @opt,@webserv=opt,webserv - @env=SiSU_Env::Info_env.new('',opt) - @sys=SiSU_Env::System_call.new + @env=SiSU_Env::InfoEnv.new('',opt) + @sys=SiSU_Env::SystemCall.new @image_src="#{@env.url.webserv_cgi}/_sisu/image_sys" @common=SiSU_CGI_SQL::CGI_Common.new(@webserv,@opt,@image_src,@env) - @db=SiSU_Env::Info_db.new + @db=SiSU_Env::InfoDb.new @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by}_pgsql.cgi" end def pgsql @@ -140,7 +140,7 @@ module SiSU_CGI_PgSQL end def search_statement <<-'WOK_SQL' - class Dbi_search_string + class DBI_SearchString def initialize(l,t,q,cse=false) @l,@t,@q,@c=l,t,q,cse end diff --git a/lib/sisu/v3dv/cgi_sql_common.rb b/lib/sisu/v3dv/cgi_sql_common.rb index 15adf2f5..59844d2b 100644 --- a/lib/sisu/v3dv/cgi_sql_common.rb +++ b/lib/sisu/v3dv/cgi_sql_common.rb @@ -230,7 +230,7 @@ module SiSU_CGI_SQL end def search_request <<-'WOK_SQL' - class Search_request #% search_for + class SearchRequest #% search_for attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename def initialize(search_field='',q='') @search_field,@q=search_field,q @@ -326,7 +326,7 @@ module SiSU_CGI_SQL end def search_statement_common <<-'WOK_SQL' - class Dbi_search_statement + class DBI_SearchStatement attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format,:sql_offset,:sql_limit def initialize(conn,search_for,q,c) @conn=conn @@ -336,114 +336,114 @@ module SiSU_CGI_SQL #@offset+=@@limit search={ :text => [], :endnotes => [] } cse=(c =~/\S/) ? true : false - st=Dbi_search_string.new('doc_objects.clean',search_for.text1,q['s1'],cse).string - se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1'],cse).string + st=DBI_SearchString.new('doc_objects.clean',search_for.text1,q['s1'],cse).string + se=DBI_SearchString.new('endnotes.clean',search_for.text1,q['s1'],cse).string @text_search_flag=st[:flag] if st[:flag] search[:text] << st[:search] search[:endnotes] << se[:search] end - st=Dbi_search_string.new('metadata_and_text.fulltext',search_for.fulltext,q['ft'],cse).string + st=DBI_SearchString.new('metadata_and_text.fulltext',search_for.fulltext,q['ft'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_keywords',search_for.keywords,q['key'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_keywords',search_for.keywords,q['key'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.title',search_for.title,q['ti'],cse).string + st=DBI_SearchString.new('metadata_and_text.title',search_for.title,q['ti'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.creator_author',search_for.author,q['au'],cse).string + st=DBI_SearchString.new('metadata_and_text.creator_author',search_for.author,q['au'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_topic_register',search_for.topic_register,q['tr'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_topic_register',search_for.topic_register,q['tr'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_subject',search_for.subject,q['sj'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_subject',search_for.subject,q['sj'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.notes_description',search_for.description,q['dsc'],cse).string + st=DBI_SearchString.new('metadata_and_text.notes_description',search_for.description,q['dsc'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.publisher',search_for.publisher,q['pb'],cse).string + st=DBI_SearchString.new('metadata_and_text.publisher',search_for.publisher,q['pb'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.creator_editor',search_for.editor,q['cntr'],cse).string + st=DBI_SearchString.new('metadata_and_text.creator_editor',search_for.editor,q['cntr'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.creator_contributor',search_for.contributor,q['cntr'],cse).string + st=DBI_SearchString.new('metadata_and_text.creator_contributor',search_for.contributor,q['cntr'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.date_published',search_for.date,q['dt'],cse).string + st=DBI_SearchString.new('metadata_and_text.date_published',search_for.date,q['dt'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_type',search_for.type,q['ty'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_type',search_for.type,q['ty'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_identifier',search_for.identifier,q['id'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_identifier',search_for.identifier,q['id'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.original_source',search_for.source,q['src'],cse).string + st=DBI_SearchString.new('metadata_and_text.original_source',search_for.source,q['src'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.language_document_char',search_for.language,q['lang'],cse).string + st=DBI_SearchString.new('metadata_and_text.language_document_char',search_for.language,q['lang'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_relation',search_for.relation,q['rel'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_relation',search_for.relation,q['rel'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.classify_coverage',search_for.coverage,q['cov'],cse).string + st=DBI_SearchString.new('metadata_and_text.classify_coverage',search_for.coverage,q['cov'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.rights_all',search_for.rights,q['cr'],cse).string + st=DBI_SearchString.new('metadata_and_text.rights_all',search_for.rights,q['cr'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.notes_comment',search_for.comment,q['co'],cse).string + st=DBI_SearchString.new('metadata_and_text.notes_comment',search_for.comment,q['co'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.notes_abstract',search_for.abstract,q['ab'],cse).string + st=DBI_SearchString.new('metadata_and_text.notes_abstract',search_for.abstract,q['ab'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] end - st=Dbi_search_string.new('metadata_and_text.src_filename',search_for.filename,q['fns'],cse).string + st=DBI_SearchString.new('metadata_and_text.src_filename',search_for.filename,q['fns'],cse).string if st[:flag] search[:text] << st[:search] search[:endnotes] << st[:search] @@ -539,7 +539,7 @@ module SiSU_CGI_SQL WOK_SQL end def tail - v=SiSU_Env::Info_version.instance.get_version + v=SiSU_Env::InfoVersion.instance.get_version <<-WOK_SQL def tail <<-'WOK' @@ -703,7 +703,7 @@ module SiSU_CGI_SQL def main2 <<-'WOK_SQL' search_field=cgi['find'] if cgi['find'] # =~/\S+/ - @search_for=Search_request.new(search_field,q) #.analyze #% search_for + @search_for=SearchRequest.new(search_field,q) #.analyze #% search_for #% searches #Canned_search.new(@base,@search_for.text1,cgi) if @search_for.text1=~/\S+/ or @search_for.fulltext=~/\S+/ or @search_for.author=~/\S+/ or @search_for.topic_register=~/\S+/ #and search_field =~/\S/ @@ -819,7 +819,7 @@ module SiSU_CGI_SQL @search[:endnotes]<<%{endnotes.clean~*'#{CGI.unescape(s1)}'} end #% dbi_request - dbi_statement=Dbi_search_statement.new(@conn,@search_for,q,checked_case) + dbi_statement=DBI_SearchStatement.new(@conn,@search_for,q,checked_case) @text_search_flag=false @text_search_flag=dbi_statement.text_search_flag s_contents=dbi_statement.contents diff --git a/lib/sisu/v3dv/cgi_sqlite.rb b/lib/sisu/v3dv/cgi_sqlite.rb index 0286736b..166bda77 100644 --- a/lib/sisu/v3dv/cgi_sqlite.rb +++ b/lib/sisu/v3dv/cgi_sqlite.rb @@ -63,7 +63,7 @@ module SiSU_CGI_SQLite class SearchSQLite < CGI_Common def initialize(opt,webserv) @opt,@webserv=opt,webserv - @env=SiSU_Env::Info_env.new('',opt) + @env=SiSU_Env::InfoEnv.new('',opt) @image_src="#{@env.url.webserv_cgi}/_sisu/image_sys" @common=SiSU_CGI_SQL::CGI_Common.new(@webserv,@opt,@image_src,@env) @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by}_sqlite.cgi" @@ -137,7 +137,7 @@ module SiSU_CGI_SQLite end def search_statement <<-'WOK_SQL' - class Dbi_search_string + class DBI_SearchString def initialize(l,t,q,cse=false) @l,@t,@q=l,t,q end diff --git a/lib/sisu/v3dv/character_encoding.rb b/lib/sisu/v3dv/character_encoding.rb index f576b461..1931c466 100644 --- a/lib/sisu/v3dv/character_encoding.rb +++ b/lib/sisu/v3dv/character_encoding.rb @@ -73,7 +73,7 @@ module SiSU_CharacterEncode @ce_tbl=@db.create_table.documents(:character_encoding, :glyph,:String, :dec,:Integer, :hex,:String, :rb,:String, :html,:String, :html_name,:String, :tex,:String, :tex_licr,:String, :tex_alt,:String, :name,:String) end def db - x=Character_encoding.new.table + x=CharacterEncoding.new.table #x.each {|y| puts y[2].inspect} x.each do |c| #puts "#{c[0]}, #{c[1]}, #{c[2]}, #{c[3]}, #{c[4]}, #{c[5]}, #{c[6]}, #{c[7]}, #{c[8]}, #{c[9]}" @@ -138,7 +138,7 @@ module SiSU_CharacterEncode end end end - class Character_encoding + class CharacterEncoding def table x=[] #:glyph, :dec,:hex, :rb, :xml , :html_name, :tex, :tex_licr, :tex_alt, :name diff --git a/lib/sisu/v3dv/composite.rb b/lib/sisu/v3dv/composite.rb index 95be6d1e..abfba7a2 100644 --- a/lib/sisu/v3dv/composite.rb +++ b/lib/sisu/v3dv/composite.rb @@ -59,9 +59,9 @@ =end module SiSU_Assemble require_relative 'sysenv' # sysenv.rb - class Remote_image + class RemoteImage def initialize - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new end def image(dir) images=[] @@ -82,7 +82,7 @@ module SiSU_Assemble end output_path="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image_external" FileUtils::mkdir_p(output_path) unless FileTest.directory?(output_path) - SiSU_Env::System_call.new("#{path}/*",output_path,'q').rsync + SiSU_Env::SystemCall.new("#{path}/*",output_path,'q').rsync end def download_doc_skin(doc_skin) #first element in array is source url path="#{@env.processing_path.processing}/external_document/skin/doc" @@ -104,14 +104,14 @@ module SiSU_Assemble @@imager={} def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new end def read begin @fns_array=IO.readlines(@opt.fns,'') assembled=insertions? write(assembled) - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -232,18 +232,18 @@ module SiSU_Assemble tuned_file end end - class Composite_file_list + class CompositeFileList @@imager={} def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new end def read begin @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm') #FIX earlier, hub @fns_array=IO.readlines(@opt.fns,'') files=insertions? - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end diff --git a/lib/sisu/v3dv/concordance.rb b/lib/sisu/v3dv/concordance.rb index a1720de9..2e14ab14 100644 --- a/lib/sisu/v3dv/concordance.rb +++ b/lib/sisu/v3dv/concordance.rb @@ -70,7 +70,7 @@ module SiSU_Concordance class Source def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) end def read begin @@ -95,23 +95,23 @@ module SiSU_Concordance SiSU_Screen::Ansi.new(@md.opt.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.cmd =~/q/ SiSU_Concordance::Source::Words.new(@particulars).songsheet end - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end private - class Doc_title + class DocTitle include SiSU_Viz #revisit, both requires (html & shared_xml) needed for stand alone operation (sisu -w [filename]) require_relative 'shared_xml' # shared_xml.rb require_relative 'html' # html.rb def initialize(particulars) @particulars,@md=particulars,particulars.md - @data=SiSU_HTML::Source::Html_environment.new(particulars).tuned_file_instructions + @data=SiSU_HTML::Source::HTML_Environment.new(particulars).tuned_file_instructions @file=SiSU_Env::FileOp.new(@md) - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin txt_path=%{#{@md.dir_out}} - SiSU_Env::Info_skin.new(@md).select + SiSU_Env::InfoSkin.new(@md).select @fnb=@md.fnb @lex_button=%{SiSU home -->} @doc_details =<' < @@ -185,11 +185,11 @@ WOK def initialize(particulars) @particulars=particulars begin - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array @file=SiSU_Env::FileOp.new(@md) @freq=Hash.new(0) - @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern + @dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern @rxp_lv1=/^#{Mx[:lv_o]}1:/ #fix @rxp_lv # Mx[:lv_o] @rxp_lv2=/^#{Mx[:lv_o]}2:/ #fix @rxp_lv # Mx[:lv_o] @rxp_lv3=/^#{Mx[:lv_o]}3:/ #fix @rxp_lv # Mx[:lv_o] @@ -203,7 +203,7 @@ WOK @alph=SiSU_i18n::Alphabet.new(@md.opt.lng).hash_arrays @alphlst=SiSU_i18n::Alphabet.new(@md.opt.lng).hash_strings @rgx_scanlist=%r{#{Mx[:fa_italics_o]}[#{@alphlst[:l]}#{@alphlst[:u]}0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[#{@alphlst[:l]}#{@alphlst[:u]}0-9"\s]{2,12}#{Mx[:fa_bold_c]}|(?:https?|file)://\S+|<\S+?>|[#{@alphlst[:l]}#{@alphlst[:u]}]+|\w+}mi - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error end end def songsheet @@ -211,7 +211,7 @@ WOK FileUtils::mkdir_p(@file.output_path.html_concordance.dir) unless FileTest.directory?(@file.output_path.html_concordance.dir) @file_concordance=File.open(@file.place_file.html_concordance.dir,'w') map_para - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure @file_concordance.close end @@ -315,7 +315,7 @@ WOK end scr='Full Text scroll: doc#  ' seg='' - head=SiSU_Concordance::Source::Doc_title.new(@particulars).create + head=SiSU_Concordance::Source::DocTitle.new(@particulars).create head.gsub!(/#{Xx[:html_relative2]}/m,@file.path_rel_links.html_seg_2) head.gsub!(/#{Xx[:html_relative1]}/m,@file.path_rel_links.html_seg_1) @file_concordance << head diff --git a/lib/sisu/v3dv/conf.rb b/lib/sisu/v3dv/conf.rb index 194e5cbd..5eb1b116 100644 --- a/lib/sisu/v3dv/conf.rb +++ b/lib/sisu/v3dv/conf.rb @@ -81,7 +81,7 @@ module SiSU_Initialize require_relative 'sysenv' # sysenv.rb def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) @suffix,@path={},{} @suffix[:rnc]='rnc' @suffix[:rng]='rng' @@ -94,26 +94,26 @@ module SiSU_Initialize end def make_homepage SiSU_Screen::Ansi.new(@opt.cmd,'invert','Make homepage','').colorize unless @opt.cmd =~/q/ - SiSU_Env::Create_site.new(@opt.cmd).homepage + SiSU_Env::CreateSite.new(@opt.cmd).homepage end def cp_local_images SiSU_Screen::Ansi.new(@opt.cmd,'invert','Copy images','').colorize unless @opt.cmd =~/q/ - SiSU_Env::Create_site.new(@opt.cmd).cp_local_images - SiSU_Env::Create_site.new(@opt.cmd).cp_webserver_images_local #this should not have been necessary - SiSU_Env::Create_site.new(@opt.cmd).cp_base_images #base images (nav etc.) used by all html + 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.cmd,'invert','Copy external images','').colorize if @opt.cmd =~/V/ - SiSU_Env::Create_site.new(@opt.cmd).cp_external_images + SiSU_Env::CreateSite.new(@opt.cmd).cp_external_images end def cp_webserver_images SiSU_Screen::Ansi.new(@opt.cmd,'invert','Copy webserver/output file images','').colorize unless @opt.cmd =~/q/ - SiSU_Env::Create_site.new(@opt.cmd).cp_webserver_images - SiSU_Env::Create_system_link.new.images + SiSU_Env::CreateSite.new(@opt.cmd).cp_webserver_images + SiSU_Env::CreateSystemLink.new.images end def css SiSU_Screen::Ansi.new(@opt.cmd,'invert','Configuring CSSs','').colorize unless @opt.cmd =~/q/ - SiSU_Env::Create_site.new(@opt.cmd).cp_css + SiSU_Env::CreateSite.new(@opt.cmd).cp_css end def dtd SiSU_Screen::Ansi.new(@opt.cmd,'invert','Configuring DTDs','').colorize unless @opt.cmd =~/q/ @@ -167,10 +167,10 @@ module SiSU_Initialize rnc << @rxng.rnc_model_output_sax rnc.close #xsd - schema=SiSU_Env::System_call.new(rnc_src,xsd_file) + schema=SiSU_Env::SystemCall.new(rnc_src,xsd_file) schema.relaxng(@opt.cmd) #rng - schema=SiSU_Env::System_call.new(rnc_src,rng_file) + schema=SiSU_Env::SystemCall.new(rnc_src,rng_file) schema.relaxng(@opt.cmd) #rnc FileUtils::cp(rnc_src,rnc_file) @@ -186,10 +186,10 @@ module SiSU_Initialize rnc << @rxng.rnc_model_output_dom rnc.close #xsd - schema=SiSU_Env::System_call.new(rnc_src,xsd_file) + schema=SiSU_Env::SystemCall.new(rnc_src,xsd_file) schema.relaxng(@opt.cmd) #rng - schema=SiSU_Env::System_call.new(rnc_src,rng_file) + schema=SiSU_Env::SystemCall.new(rnc_src,rng_file) schema.relaxng(@opt.cmd) #rnc FileUtils::cp(rnc_src,rnc_file) @@ -205,10 +205,10 @@ module SiSU_Initialize rnc << @rxng.rnc_model_output_xhtml rnc.close #xsd - schema=SiSU_Env::System_call.new(rnc_src,xsd_file) + schema=SiSU_Env::SystemCall.new(rnc_src,xsd_file) schema.relaxng(@opt.cmd) #rng - schema=SiSU_Env::System_call.new(rnc_src,rng_file) + schema=SiSU_Env::SystemCall.new(rnc_src,rng_file) schema.relaxng(@opt.cmd) #rnc FileUtils::cp(rnc_src,rnc_file) @@ -220,7 +220,7 @@ module SiSU_Initialize rnc=File.new(rnc_file,'w') rnc << @rxng.rnc_model_output_sax rnc.close - schema=SiSU_Env::System_call.new(rnc_file,dtd_file) + schema=SiSU_Env::SystemCall.new(rnc_file,dtd_file) schema.relaxng(@opt.cmd) end def trang_rnc_model_input_dom @@ -229,7 +229,7 @@ module SiSU_Initialize rnc=File.new(rnc_file,'w') rnc << @rxng.rnc_model_output_dom rnc.close - schema=SiSU_Env::System_call.new(rnc_file,dtd_file) + schema=SiSU_Env::SystemCall.new(rnc_file,dtd_file) schema.relaxng(@opt.cmd) end def trang_rnc_model_input_node @@ -239,7 +239,7 @@ module SiSU_Initialize rnc=File.new(rnc_file,'w') rnc << @rxng.rnc_model_input_node rnc.close - schema=SiSU_Env::System_call.new(rnc_file,dtd_file) + schema=SiSU_Env::SystemCall.new(rnc_file,dtd_file) schema.relaxng(@opt.cmd) end end diff --git a/lib/sisu/v3dv/css.rb b/lib/sisu/v3dv/css.rb index 348c89e7..522aae7e 100644 --- a/lib/sisu/v3dv/css.rb +++ b/lib/sisu/v3dv/css.rb @@ -61,7 +61,7 @@ module SiSU_Style require_relative 'defaults' # defaults.rb class CSS def initialize - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def fonts @vz.font_fonts diff --git a/lib/sisu/v3dv/dal.rb b/lib/sisu/v3dv/dal.rb index 15f916ca..a8527e6d 100644 --- a/lib/sisu/v3dv/dal.rb +++ b/lib/sisu/v3dv/dal.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,7 +117,7 @@ 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 end @@ -133,7 +133,7 @@ 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 end @@ -149,7 +149,7 @@ 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 end @@ -165,7 +165,7 @@ 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 end @@ -181,7 +181,7 @@ 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 end @@ -197,7 +197,7 @@ 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 end @@ -213,7 +213,7 @@ 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 end @@ -229,7 +229,7 @@ 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 end @@ -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,9 +340,9 @@ 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 @@ -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 @@ -482,7 +482,7 @@ module SiSU_DAL data,endnote_array=SiSU_CharacterCheck::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_BookIndex::Book_index.new(@md,data,@env).indexing_song if @md.book_idx # dal_idx.rb + data,book_index_rel,book_index_rel_html_seg,html_idx,xhtml_idx=SiSU_BookIndex::BookIndex.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 outputdata=data if @md.opt.cmd =~/[mM]/ diff --git a/lib/sisu/v3dv/dal_doc_objects.rb b/lib/sisu/v3dv/dal_doc_objects.rb index 904c8448..11ccb0d0 100644 --- a/lib/sisu/v3dv/dal_doc_objects.rb +++ b/lib/sisu/v3dv/dal_doc_objects.rb @@ -62,7 +62,7 @@ module SiSU_DocumentStructure obj=h ? h : o end end - class Object_metadata + class ObjectMetadata attr_accessor :is,:of,:tags,:obj,:digest def initialize @tags={} @@ -78,7 +78,7 @@ module SiSU_DocumentStructure self end end - class Object_meta + class ObjectMeta attr_accessor :obj,:is,:of,:tag,:digest,:tmp def initialize @is=@obj=@tag=@digest=@digest=@tmp=nil @@ -95,7 +95,7 @@ module SiSU_DocumentStructure self end end - class Object_heading + class ObjectHeading attr_accessor :obj,:is,:tags,:of,:lv,:ln,:toc_,:name,:idx,:ocn,:odv,:osp,:node,:parent,:ocn_,:note_,:autonum_,:digest,:tmp def initialize @of='para' @@ -166,7 +166,7 @@ module SiSU_DocumentStructure self end end - class Object_para + class ObjectPara attr_accessor :obj,:is,:tags,:of,:name,:idx,:bullet_,:indent,:hang,:ocn,:odv,:osp,:parent,:note_,:image_,:ocn_,:digest,:tmp def initialize @of='para' @@ -222,7 +222,7 @@ module SiSU_DocumentStructure self end end - class Object_block_txt + class ObjectBlockTxt attr_accessor :obj,:is,:of,:tags,:idx,:ocn,:odv,:osp,:parent,:note_,:number_,:ocn_,:digest,:tmp def initialize @of='block' @@ -326,7 +326,7 @@ module SiSU_DocumentStructure self end end - class Object_table + class ObjectTable attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:hang,:size,:ocn,:number,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp def initialize @of='block' @@ -356,7 +356,7 @@ module SiSU_DocumentStructure self end end - class Object_image + class ObjectImage attr_accessor :obj,:is,:of,:lv,:idx,:size,:ocn,:parent,:note_,:ocn_,:digest,:tmp def initialize @of='image' @@ -384,7 +384,7 @@ module SiSU_DocumentStructure self end end - class Object_structure + class ObjectStructure attr_accessor :obj,:tag,:node,:lv,:ln,:status,:is,:of,:tmp def initialize @of='structure' @@ -403,7 +403,7 @@ module SiSU_DocumentStructure self end end - class Object_comment + class ObjectComment attr_accessor :obj,:is,:of,:tmp def initialize @of='comment' @@ -418,7 +418,7 @@ module SiSU_DocumentStructure self end end - class Object_layout + class ObjectLayout attr_accessor :obj,:is,:of,:tmp def initialize @of='layout' diff --git a/lib/sisu/v3dv/dal_doc_str.rb b/lib/sisu/v3dv/dal_doc_str.rb index 92be87fb..e51320cb 100644 --- a/lib/sisu/v3dv/dal_doc_str.rb +++ b/lib/sisu/v3dv/dal_doc_str.rb @@ -70,8 +70,8 @@ module SiSU_DocumentStructureExtract def initialize(md,data) @md,@data=md,data Instantiate.new - @pb=SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_page]) - @pbn=SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_page_new]) + @pb=SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_page]) + @pbn=SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new]) end def ln_get(lv) ln=case lv @@ -173,7 +173,7 @@ module SiSU_DocumentStructureExtract when /^%+\s/ #comment t_o=if t_o=~/^%+\s+(.+)/ h={obj: $1} - SiSU_DocumentStructure::Object_comment.new.comment(h) + SiSU_DocumentStructure::ObjectComment.new.comment(h) else nil end when /^:?([A-C1-6])\~/ #heading / lv @@ -184,19 +184,19 @@ module SiSU_DocumentStructureExtract note=endnote_test?(obj) obj,tags=extract_tags(obj) h={ lv: lv, ln: ln, obj: obj, idx: idx, tags: tags } - SiSU_DocumentStructure::Object_heading.new.heading(h) + SiSU_DocumentStructure::ObjectHeading.new.heading(h) elsif t_o=~/^:?[A-C1-6]\~(\S+?)-\s+(.+)/m name,obj=$1,$2 note=endnote_test?(obj) obj,tags=extract_tags(obj) h={ lv: lv, name: name, obj: obj, idx: idx, autonum_: false, tags: tags} - SiSU_DocumentStructure::Object_heading.new.heading(h) + SiSU_DocumentStructure::ObjectHeading.new.heading(h) elsif t_o=~/^:?[A-C1-6]\~(\S+)\s+(.+)/m name,obj=$1,$2 note=endnote_test?(obj) obj,tags=extract_tags(obj,name) h={ lv: lv, name: name, obj: obj, idx: idx, tags: tags } - SiSU_DocumentStructure::Object_heading.new.heading(h) + SiSU_DocumentStructure::ObjectHeading.new.heading(h) else nil end when /^_(?:[1-9]!?|[1-9]?\*)\s+/ #indented and/or bullet paragraph @@ -213,7 +213,7 @@ module SiSU_DocumentStructureExtract obj,tags=extract_tags(obj) unless obj=~/\A\s*\Z/m h={ bullet_: bullet, hang: hang, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } - SiSU_DocumentStructure::Object_para.new.paragraph(h) + SiSU_DocumentStructure::ObjectPara.new.paragraph(h) end else nil end @@ -230,23 +230,23 @@ module SiSU_DocumentStructureExtract obj,tags=extract_tags(obj) unless obj=~/\A\s*\Z/m h={ hang: hang, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } - SiSU_DocumentStructure::Object_para.new.paragraph(h) + SiSU_DocumentStructure::ObjectPara.new.paragraph(h) end else nil end when /^[<\[](?:br)?:(?:pa?r|o(?:bj|---)?)[>\]]\s*$/ #[br:par] #[br:obj] - SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_obj]) + SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_obj]) when /^(?:[<\[](?:br)?:pg[>\]]|?)\s*$/ #[br:pg] - SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_page]) + SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_page]) when /^[<\[](?:br)?:pg?n[>\]]\s*$/ #[br:pgn] - SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_page_new]) + SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new]) else #paragraph image=image_test(t_o) note=endnote_test?(t_o) obj,tags=extract_tags(t_o) unless obj=~/\A\s*\Z/m h={ bullet_: false, indent: 0, hang: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags } - SiSU_DocumentStructure::Object_para.new.paragraph(h) + SiSU_DocumentStructure::ObjectPara.new.paragraph(h) end end elsif not @@flag['code'] @@ -255,30 +255,30 @@ module SiSU_DocumentStructureExtract @@counter=1 @codeblock_numbered=(t_o =~/^code\{#/) ? true : false h={ obj: 'code block start' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) elsif t_o =~/^poem\{/ @@flag['poem']=true h={ obj: 'poem start' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) tuned_file << t_o elsif t_o =~/^group\{/ @@flag['group']=true h={ obj: 'group text start' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) tuned_file << t_o elsif t_o =~/^block\{/ @@flag['block']=true h={ obj: 'block text start' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) tuned_file << t_o elsif t_o =~/^alt\{/ @@flag['alt']=true h={ obj: 'alt text start' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) tuned_file << t_o elsif t_o =~/^(?:table\{|\{table)[ ~]/ h={ obj: 'table start' } #introduce a counter - ins=SiSU_DocumentStructure::Object_comment.new.comment(h) #ins=SiSU_DocumentStructure::Object_layout.new.insert(h) + ins=SiSU_DocumentStructure::ObjectComment.new.comment(h) #ins=SiSU_DocumentStructure::ObjectLayout.new.insert(h) tuned_file << ins if t_o=~/^table\{(?:~h)?\s+/ @@flag['table']=true @@ -318,10 +318,10 @@ module SiSU_DocumentStructureExtract cols.times { col << width } end h={ head_: hd, cols: cols, widths: col, obj: rows, idx: idx, tags: tags } - t_o=SiSU_DocumentStructure::Object_table.new.table(h) unless h.nil? + t_o=SiSU_DocumentStructure::ObjectTable.new.table(h) unless h.nil? tuned_file << t_o h={ obj: 'table end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) t_o elsif t_o=~/^\{table(?:~h)?\s+/ m1,m2,hd=nil,nil,nil @@ -341,10 +341,10 @@ module SiSU_DocumentStructureExtract rows += r + Mx[:tc_c] end h={ head_: hd, cols: col.length, widths: col, obj: rows, idx: idx, tags: tags } - t_o=SiSU_DocumentStructure::Object_table.new.table(h) unless h.nil? + t_o=SiSU_DocumentStructure::ObjectTable.new.table(h) unless h.nil? tuned_file << t_o h={ obj: 'table end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) t_o end end @@ -356,12 +356,12 @@ module SiSU_DocumentStructureExtract @@flag['table']=false headings,columns,widths,idx=@h[:head_],@h[:cols],@h[:widths],@h[:idx] @h={ head_: headings, cols: columns, widths: widths, idx: idx, obj: @rows } - t_o=SiSU_DocumentStructure::Object_table.new.table(@h) + t_o=SiSU_DocumentStructure::ObjectTable.new.table(@h) tuned_file << t_o @h,@rows=nil,'' t_o h={ obj: 'table end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) t_o else if t_o !~/^table\{/ \ @@ -379,11 +379,11 @@ module SiSU_DocumentStructureExtract obj=@tuned_code.join("\n") tags=[] h={ obj: obj, tags: tags, number_: @codeblock_numbered } - t_o=SiSU_DocumentStructure::Object_block_txt.new.code(h) + t_o=SiSU_DocumentStructure::ObjectBlockTxt.new.code(h) @tuned_code=[] tuned_file << t_o h={ obj: 'code block end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) end if @@flag['code'] \ and t_o.class==String \ @@ -404,37 +404,37 @@ module SiSU_DocumentStructureExtract and t_o =~/^\}poem/ @@flag['poem']=false h={ obj: 'poem end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) elsif ( @@flag['group'] \ and t_o =~/^\}group/ ) @@flag['group']=false obj,tags=extract_tags(@tuned_block.join("\n")) h={ obj: obj, tags: tags } @tuned_block=[] - t_o=SiSU_DocumentStructure::Object_block_txt.new.group(h) + t_o=SiSU_DocumentStructure::ObjectBlockTxt.new.group(h) tuned_file << t_o h={ obj: 'group text end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) elsif ( @@flag['block'] \ and t_o =~/^\}block/ ) @@flag['block']=false obj,tags=extract_tags(@tuned_block.join("\n")) h={ obj: obj, tags: tags } @tuned_block=[] - t_o=SiSU_DocumentStructure::Object_block_txt.new.block(h) + t_o=SiSU_DocumentStructure::ObjectBlockTxt.new.block(h) tuned_file << t_o h={ obj: 'block text end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) elsif ( @@flag['alt'] \ and t_o =~/^\}alt/ ) @@flag['alt']=false obj,tags=extract_tags(@tuned_block.join("\n")) h={ obj: obj, tags: tags } - t_o=SiSU_DocumentStructure::Object_block_txt.new.alt(h) + t_o=SiSU_DocumentStructure::ObjectBlockTxt.new.alt(h) @tuned_block=[] tuned_file << t_o h={ obj: 'alt text end' } #introduce a counter - t_o=SiSU_DocumentStructure::Object_comment.new.comment(h) #t_o=SiSU_DocumentStructure::Object_layout.new.insert(h) + t_o=SiSU_DocumentStructure::ObjectComment.new.comment(h) #t_o=SiSU_DocumentStructure::ObjectLayout.new.insert(h) end if @@flag['poem'] \ or @@flag['group'] \ @@ -450,7 +450,7 @@ module SiSU_DocumentStructureExtract v.gsub!(/\n/m,"#{Mx[:br_nl]}\n") obj,tags=extract_tags(v) h={ obj: obj, tags: tags } - t_o=SiSU_DocumentStructure::Object_block_txt.new.verse(h) + t_o=SiSU_DocumentStructure::ObjectBlockTxt.new.verse(h) tuned_file << t_o end else 'group' @@ -484,32 +484,32 @@ module SiSU_DocumentStructureExtract if @md.flag_endnotes tuned_file << @pb h={ ln: 2, obj: 'Endnotes', autonum_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) h={ ln: 4, obj: 'Endnotes', name: 'endnotes', autonum_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) h={ obj: 'Endnotes' } end if @md.book_idx tuned_file << @pb h={ ln: 2, obj: 'Index', autonum_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) h={ ln: 4, obj: 'Index', name: 'book_index', autonum_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) h={ obj: 'Index' } end tuned_file << @pb h={ ln: 2, obj: 'Metadata', autonum_: false, ocn_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) h={ ln: 4, obj: 'SiSU Metadata, document information', name: 'metadata', autonum_: false, ocn_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) tuned_file << @pb h={ ln: 2, obj: 'Manifest', autonum_: false, ocn_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) h={ ln: 4, obj: 'SiSU Manifest, alternative outputs etc.', name: 'sisu_manifest', autonum_: false, ocn_: false } - tuned_file << SiSU_DocumentStructure::Object_heading.new.heading_insert(h) + tuned_file << SiSU_DocumentStructure::ObjectHeading.new.heading_insert(h) tuned_file h={ obj: 'eof' } - meta=SiSU_DocumentStructure::Object_metadata.new.metadata(@metadata) + meta=SiSU_DocumentStructure::ObjectMetadata.new.metadata(@metadata) [tuned_file,meta] end def table_rows_and_columns_array(table_str) @@ -522,24 +522,24 @@ module SiSU_DocumentStructureExtract end def meta_heading(h) h={ lv: h[:lv], ln: h[:ln], name: h[:name], obj: h[:obj], ocn: '0' } - SiSU_DocumentStructure::Object_heading.new.heading(h) + SiSU_DocumentStructure::ObjectHeading.new.heading(h) end def meta_para(str) h={ obj: str, ocn_: false } - SiSU_DocumentStructure::Object_para.new.paragraph(h) + SiSU_DocumentStructure::ObjectPara.new.paragraph(h) end def metadata meta=[] - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) base_html="#{dir.url.root}/#{@md.fnb}" - l=SiSU_Env::Standardise_language.new(@md.opt.lng).language + l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language language=l[:n] tr=SiSU_Translate::Source.new(@md,language) meta << @pb h={ ln: 2, obj: 'Metadata', ocn_: false } - meta << SiSU_DocumentStructure::Object_heading.new.heading(h) + meta << SiSU_DocumentStructure::ObjectHeading.new.heading(h) h={ ln: 4, name: 'metadata', obj: 'Metadata', autonum_: false, ocn_: false } - meta << SiSU_DocumentStructure::Object_heading.new.heading(h) #add ocnm + meta << SiSU_DocumentStructure::ObjectHeading.new.heading(h) #add ocnm s="Document Manifest @\n #{base_html}/#{@md.fn[:manifest]}" meta << meta_para(s) s="#{Mx[:fa_bold_o]}Dublin Core#{Mx[:fa_bold_c]} (DC)" #add ocnm @@ -781,22 +781,22 @@ module SiSU_DocumentStructureExtract @dob=case @dob.obj when /^#{@md.lv1}/ h={ lv: 'A', ln: 1 } - SiSU_DocumentStructure::Object_heading.new.heading(h,@dob) + SiSU_DocumentStructure::ObjectHeading.new.heading(h,@dob) when /^#{@md.lv2}/ h={ lv: 'B', ln: 2 } - SiSU_DocumentStructure::Object_heading.new.heading(h,@dob) + SiSU_DocumentStructure::ObjectHeading.new.heading(h,@dob) when /^#{@md.lv3}/ h={ lv: 'C', ln: 3 } - SiSU_DocumentStructure::Object_heading.new.heading(h,@dob) + SiSU_DocumentStructure::ObjectHeading.new.heading(h,@dob) when /^#{@md.lv4}/ h={ lv: '1', ln: 4 } - SiSU_DocumentStructure::Object_heading.new.heading(h,@dob) + SiSU_DocumentStructure::ObjectHeading.new.heading(h,@dob) when /^#{@md.lv5}/ h={ lv: '2', ln: 5 } - SiSU_DocumentStructure::Object_heading.new.heading(h,@dob) + SiSU_DocumentStructure::ObjectHeading.new.heading(h,@dob) when /^#{@md.lv6}/ h={ lv: '3', ln: 6 } - SiSU_DocumentStructure::Object_heading.new.heading(h,@dob) + SiSU_DocumentStructure::ObjectHeading.new.heading(h,@dob) else @dob end else @dob @@ -954,19 +954,19 @@ module SiSU_DocumentStructureExtract dob.obj.gsub!(/#{Mx[:pa_non_object_no_heading]}/,'') if dob.is=='para' h={ obj: dob.obj, ocn_: false, ocn: nil } - dob=SiSU_DocumentStructure::Object_para.new.paragraph(h,dob) + dob=SiSU_DocumentStructure::ObjectPara.new.paragraph(h,dob) elsif dob.is=='heading' h={ obj: dob.obj, ocn_: false, ocn: nil, toc_: true } - dob=SiSU_DocumentStructure::Object_heading.new.heading(h,dob) + dob=SiSU_DocumentStructure::ObjectHeading.new.heading(h,dob) end elsif dob.obj=~/#{Mx[:pa_non_object_dummy_heading]}/ dob.obj.gsub!(/#{Mx[:pa_non_object_dummy_heading]}/,'') if dob.is=='para' h={ obj: dob.obj, ocn_: false, ocn: nil } - dob=SiSU_DocumentStructure::Object_para.new.paragraph(h,dob) + dob=SiSU_DocumentStructure::ObjectPara.new.paragraph(h,dob) elsif dob.is=='heading' h={ obj: dob.obj, ocn_: false, ocn: nil, toc_: false } - dob=SiSU_DocumentStructure::Object_heading.new.heading(h,dob) + dob=SiSU_DocumentStructure::ObjectHeading.new.heading(h,dob) end else dob end @@ -1080,7 +1080,7 @@ module SiSU_DocumentStructureExtract when '6'; 9 end h={ tag: tag, node: o[:node], lv: o[:lv], ln: ln, status: o[:status] } - SiSU_DocumentStructure::Object_structure.new.xml_dom(h) #downstream code utilise else ignore like comments + SiSU_DocumentStructure::ObjectStructure.new.xml_dom(h) #downstream code utilise else ignore like comments end def tag_open(o,tag) t={ lv: tag[o.ln], node: o.node, status: 'open' } diff --git a/lib/sisu/v3dv/dal_expand_insertions.rb b/lib/sisu/v3dv/dal_expand_insertions.rb index a2808dbb..cbcc3876 100644 --- a/lib/sisu/v3dv/dal_expand_insertions.rb +++ b/lib/sisu/v3dv/dal_expand_insertions.rb @@ -62,7 +62,7 @@ module SiSU_Insertions @md,@data=md,data end def output_filetypes_in_cmd(cmd_shortcut,lnk=nil) #make list of file types in shortcut command (as configured), e.g. when sisu -3 is used - cf_defaults=SiSU_Env::Info_processing_flag.new + cf_defaults=SiSU_Env::InfoProcessingFlag.new cmd_list=case cmd_shortcut.inspect when /0/; cf_defaults.cf_0 when /1/; cf_defaults.cf_1 @@ -270,7 +270,7 @@ module SiSU_Insertions and not codeblock_ \ and para =~/\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.ss[tm]\b)/ txt,cmd,source,linked_doc,note,manifest=nil,nil,nil,nil,nil,nil - @u=SiSU_Env::Info_env.new.url + @u=SiSU_Env::InfoEnv.new.url pre=txt=cmd=source=linked_doc=note='' if defined? @u.remote if /(?
.+?)\{(?.+?)\s\[(?\d[sS]*)\]\}(?(?\S+?)\.ss[tm]\b)(?.*)/m =~ para
diff --git a/lib/sisu/v3dv/dal_hash_digest.rb b/lib/sisu/v3dv/dal_hash_digest.rb
index 23fcc0de..941d5cf9 100644
--- a/lib/sisu/v3dv/dal_hash_digest.rb
+++ b/lib/sisu/v3dv/dal_hash_digest.rb
@@ -58,10 +58,10 @@
 =end
 module SiSU_Hash
   require_relative 'shared_markup_alt.rb'               #shared_markup_alt.rb
-  class Object_digest
+  class ObjectDigest
     def initialize(md,data,env=nil)
       @md,@data,@env=md,data,env
-      @env ||=SiSU_Env::Info_env.new(@md.fns)
+      @env ||=SiSU_Env::InfoEnv.new(@md.fns)
     end
     def object_digest
     # 1. clean/stripped text without any markup, paragraph, headings etc. without endnotes
@@ -120,7 +120,7 @@ module SiSU_Hash
       t_obj=t_o.inspect.sub(/:0x[0-9a-f]{8}\s/,': ')
       stripped=SiSU_TextRepresentation::Alter.new(t_o).strip_clean_of_markup
       markup=SiSU_TextRepresentation::Alter.new(t_o).semi_revert_markup
-      digests=SiSU_TextRepresentation::Modified_text_plus_Hash_digest.new(@md,t_o).composite.dgst
+      digests=SiSU_TextRepresentation::ModifiedTextPlusHashDigest.new(@md,t_o).composite.dgst
       unless t_o.is=='code'
         case t_o.obj
         when /#{Mx[:en_a_o]}[\d*+]+\s+.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}[*+]\d+\s+.+?#{Mx[:en_b_c]}/m
diff --git a/lib/sisu/v3dv/dal_idx.rb b/lib/sisu/v3dv/dal_idx.rb
index 747c7919..63c6c846 100644
--- a/lib/sisu/v3dv/dal_idx.rb
+++ b/lib/sisu/v3dv/dal_idx.rb
@@ -57,13 +57,13 @@
 
 =end
 module SiSU_BookIndex
-  class Book_index
+  class BookIndex
     def initialize(md,data,env=nil)
       @md,@data,@env=md,data,env
       @rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/
       @rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/
       @rgx_idx_ocn=/(.+?)~(\d+)/
-      @env ||=SiSU_Env::Info_env.new(@md.fns)
+      @env ||=SiSU_Env::InfoEnv.new(@md.fns)
     end
     def indexing_song
       data=@data
@@ -164,15 +164,15 @@ module SiSU_BookIndex
       idx={}
       idx[:sst_rel_html_seg],idx[:sst_rel],idx[:html],idx[:xhtml]=[],[],[],[]
       h={obj: Mx[:br_page]}
-      o=SiSU_DocumentStructure::Object_layout.new.break(h)
+      o=SiSU_DocumentStructure::ObjectLayout.new.break(h)
       idx[:sst_rel_html_seg] << o
       idx[:sst_rel] << o
       h={lv: '2', name: 'index', obj: "Index"}
-      o=SiSU_DocumentStructure::Object_heading.new.heading(h)
+      o=SiSU_DocumentStructure::ObjectHeading.new.heading(h)
       idx[:sst_rel_html_seg] << o
       idx[:sst_rel] << o
       h={lv: '4', name: 'idx', obj: " [Index] #{Mx[:pa_non_object_dummy_heading]}"}
-      o=SiSU_DocumentStructure::Object_heading.new.heading(h)
+      o=SiSU_DocumentStructure::ObjectHeading.new.heading(h)
       idx[:sst_rel_html_seg] << o
       idx[:sst_rel] << o
       alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
diff --git a/lib/sisu/v3dv/dal_images.rb b/lib/sisu/v3dv/dal_images.rb
index 24ed17e2..87a6f756 100644
--- a/lib/sisu/v3dv/dal_images.rb
+++ b/lib/sisu/v3dv/dal_images.rb
@@ -67,7 +67,7 @@ module SiSU_Images
       data=@data
       tuned_file=[]
       @rmgk=false
-      imagemagick_=true      #imagemagick_=SiSU_Env::Info_settings.new.program?('rmagick')
+      imagemagick_=true      #imagemagick_=SiSU_Env::InfoSettings.new.program?('rmagick')
       if imagemagick_
         begin
           @rmgk=SiSU_Env::Load.new('RMagick').prog
@@ -89,7 +89,7 @@ module SiSU_Images
                 imgs=dob.obj.scan(m).flatten
                 img_col=img_row=nil
                 images=imgs.each do |image|
-                  dir=SiSU_Env::Info_env.new(@md.fns)
+                  dir=SiSU_Env::InfoEnv.new(@md.fns)
                   path_image=[dir.path.image_source_include_local,dir.path.image_source_include_remote,dir.path.image_source_include]
                   image_path=nil
                   path_image.each do |img_pth|
@@ -104,8 +104,8 @@ module SiSU_Images
                       if @md.opt.cmd =~/[vVM]/
                         SiSU_Screen::Ansi.new(@md.opt.cmd,'RMagick not present, will attempt to use imagemagick (identify) directly').warn
                       end
-                      imgk=SiSU_Env::System_call.new.imagemagick
-                      gmgk=SiSU_Env::System_call.new.graphicksmagick
+                      imgk=SiSU_Env::SystemCall.new.imagemagick
+                      gmgk=SiSU_Env::SystemCall.new.graphicksmagick
                       if imgk or gmgk
                         if imgk
                           imgsys=`identify #{image_path}/#{image}`.strip                           #system call
diff --git a/lib/sisu/v3dv/dal_metadata.rb b/lib/sisu/v3dv/dal_metadata.rb
index 405be322..2c6d133e 100644
--- a/lib/sisu/v3dv/dal_metadata.rb
+++ b/lib/sisu/v3dv/dal_metadata.rb
@@ -60,17 +60,17 @@ module SiSU_Metadata
   class Metadata
     def initialize(md,metad)
       @md,@metadata=md,metad
-      l=SiSU_Env::Standardise_language.new(@md.opt.lng).language
+      l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
       language=l[:n]
       @tr=SiSU_Translate::Source.new(md,language)
     end
     def make_para(obj,ocn)
       h={ obj: obj, ocn: 0 }
-      SiSU_DocumentStructure::Object_para.new.paragraph(h)
+      SiSU_DocumentStructure::ObjectPara.new.paragraph(h)
     end
     def make_heading(obj,ocn,name,lv,ln)
       h={ lv: lv, ln: ln, name: name, obj: obj, ocn: 0 }
-      SiSU_DocumentStructure::Object_heading.new.heading(h)
+      SiSU_DocumentStructure::ObjectHeading.new.heading(h)
     end
     def metadata
     end
diff --git a/lib/sisu/v3dv/dal_numbering.rb b/lib/sisu/v3dv/dal_numbering.rb
index dea9f6ca..cd543450 100644
--- a/lib/sisu/v3dv/dal_numbering.rb
+++ b/lib/sisu/v3dv/dal_numbering.rb
@@ -343,9 +343,9 @@ module SiSU_Numbering
           m=dob.ln.to_s
           dob_tmp=[]
           if @md.pagenew.inspect =~/#{m}/
-            dob_tmp << SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_page_new]) << dob
+            dob_tmp << SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new]) << dob
           elsif @md.pagebreak.inspect =~/#{m}/
-            dob_tmp << SiSU_DocumentStructure::Object_layout.new.break(Hx[:br_page]) << dob
+            dob_tmp << SiSU_DocumentStructure::ObjectLayout.new.break(Hx[:br_page]) << dob
           end
           para_result=unless dob_tmp.length > 0; dob
           else                                   dob_tmp
diff --git a/lib/sisu/v3dv/dal_substitutions_and_insertions.rb b/lib/sisu/v3dv/dal_substitutions_and_insertions.rb
index 08f04366..a16ada75 100644
--- a/lib/sisu/v3dv/dal_substitutions_and_insertions.rb
+++ b/lib/sisu/v3dv/dal_substitutions_and_insertions.rb
@@ -60,7 +60,7 @@ module SiSU_SubstituteAndInsert
   class SI
     def initialize(md,data)
       @md,@data=md,data
-      @skin=SiSU_Env::Info_skin.new(@md)
+      @skin=SiSU_Env::InfoSkin.new(@md)
     end
     def substitutions_and_insertions?
       data=@data
diff --git a/lib/sisu/v3dv/dal_syntax.rb b/lib/sisu/v3dv/dal_syntax.rb
index 3251a26d..39a4c689 100644
--- a/lib/sisu/v3dv/dal_syntax.rb
+++ b/lib/sisu/v3dv/dal_syntax.rb
@@ -65,11 +65,11 @@ module SiSU_Syntax
   class Markup
     def initialize(md='',data='')
       @data,@md=data,md
-      @vz=SiSU_Env::Get_init.instance.skin
+      @vz=SiSU_Env::GetInit.instance.skin
       @data_new=[]
-      url_and_stub=SiSU_Env::Info_env.new.url
+      url_and_stub=SiSU_Env::InfoEnv.new.url
       @output_url="#{url_and_stub.remote}"
-      @env=SiSU_Env::Info_env.new
+      @env=SiSU_Env::InfoEnv.new
       emph_set=if defined? @md.make.emphasis \
       and not @md.make.emphasis.nil?
         @md.make.emphasis
diff --git a/lib/sisu/v3dv/db_columns.rb b/lib/sisu/v3dv/db_columns.rb
index 57581073..89d4c7e3 100644
--- a/lib/sisu/v3dv/db_columns.rb
+++ b/lib/sisu/v3dv/db_columns.rb
@@ -63,7 +63,7 @@ module SiSU_DbColumns
   class Columns < SiSU_DbText::Prepare
     def initialize(md=nil)
       @md=md
-      @db=SiSU_Env::Info_db.new #watch
+      @db=SiSU_Env::InfoDb.new #watch
       @lang ||=SiSU_i18n::Languages.new
       if defined? md.opt.mod \
       and md.opt.mod.inspect=~/import|update/ \
@@ -2084,7 +2084,7 @@ module SiSU_DbColumns
       self
     end
   end
-  class Column_size
+  class ColumnSize
     def document_clean # restriction not necessary
       60000
     end
diff --git a/lib/sisu/v3dv/db_create.rb b/lib/sisu/v3dv/db_create.rb
index fca9f557..47d22915 100644
--- a/lib/sisu/v3dv/db_create.rb
+++ b/lib/sisu/v3dv/db_create.rb
@@ -68,7 +68,7 @@ module SiSU_DbCreate
       @comment=(@sql_type=='pg') \
       ? (Comment.new(@conn,@sql_type))
       : nil
-      @@dl ||=SiSU_Env::Info_env.new.digest.length
+      @@dl ||=SiSU_Env::InfoEnv.new.digest.length
     end
     def available
       DBI.available_drivers.each do |driver|
@@ -79,15 +79,15 @@ module SiSU_DbCreate
       end
     end
     def create_db
-      @env=SiSU_Env::Info_env.new(@opt.fns)
+      @env=SiSU_Env::InfoEnv.new(@opt.fns)
       tell=(@sql_type=='sqlite') \
       ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create Sqlite db tables in:',%{"#{@env.path.output}/sisu_sqlite.db"})
       : SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create PG db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"})
       tell.colorize if @opt.cmd =~/vVM/
-      SiSU_Env::System_call.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub
+      SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub
     end
     def output_dir?
-      dir=SiSU_Env::Info_env.new('')
+      dir=SiSU_Env::InfoEnv.new('')
       if @opt.cmd =~/d/
         dir.path.webserv_stub_ensure
       end
diff --git a/lib/sisu/v3dv/db_dbi.rb b/lib/sisu/v3dv/db_dbi.rb
index d2efa554..f15b2456 100644
--- a/lib/sisu/v3dv/db_dbi.rb
+++ b/lib/sisu/v3dv/db_dbi.rb
@@ -67,7 +67,7 @@ module  SiSU_DbDBI
   require_relative 'db_remove'                                              # db_remove.rb
   require_relative 'db_load_tuple'                                          # db_load_tuple.rb
   require_relative 'db_import'                                              # db_import.rb
-  class Column_size < SiSU_DbColumns::Column_size                             # db_columns.rb
+  class ColumnSize < SiSU_DbColumns::ColumnSize                             # db_columns.rb
   end
   class Test < SiSU_DbTests::Test                                             # db_tests.rb
   end
@@ -81,13 +81,13 @@ module  SiSU_DbDBI
   end
   class Remove  (SiSU_DbColumns::Column_size.new.document_clean - 1)             #% examine pg build & remove limitation
+              and txt.size > (SiSU_DbColumns::ColumnSize.new.document_clean - 1)             #% examine pg build & remove limitation
                 puts "\n\nTOO LARGE (TXT - see error log)\n\n"
                 open("#{Dir.pwd}/pg_documents_error_log",'a') do |error|
                   error.puts("\n#{@opt.fns}\nTEXT BODY\n#{@col[:body].size} object #{@col[:ocn]} -> #{@col[:body].slice(0..500)}")
@@ -410,7 +410,7 @@ module SiSU_DbImport
               @col[:plaintext]=@col[:body].dup
               @col[:plaintext]=strip_markup(@col[:plaintext])
               @col[:plaintext]=clean_searchable_text(@col[:plaintext])
-              t=SiSU_DbTuple::Load_documents.new(@conn,@col,@opt,@file)
+              t=SiSU_DbTuple::LoadDocuments.new(@conn,@col,@opt,@file)
               @tuple_array << t.tuple
               @en,@en_ast,@en_pls=[],[],[]
               @col[:en_a]=@col[:en_z]=nil
@@ -427,7 +427,7 @@ module SiSU_DbImport
                   special_character_escape(txt)
                   body=SiSU_FormatShared::CSS_Format.new(@md,data).endnote(nr,txt)
                   strip_markup(txt)
-                  if txt.size > (SiSU_DbColumns::Column_size.new.endnote_clean - 1)
+                  if txt.size > (SiSU_DbColumns::ColumnSize.new.endnote_clean - 1)
                     puts "\n\nTOO LARGE (ENDNOTE - see error log)\n\n"
                     open("#{Dir.pwd}/pg_documents_error_log",'a') do |error|
                       error.puts("\n#{@opt.fns}\nENDNOTE\n#{txt.size} object #{@col[:ocn]},#{@col[:ocnd]},#{@col[:ocns]} -> #{txt.slice(0..500)}")
@@ -448,7 +448,7 @@ module SiSU_DbImport
                       id_t:    @@id_t,
                       hash:    digest_clean
                     }
-                    t=SiSU_DbTuple::Load_endnotes.new(@conn,en,@opt,@file)
+                    t=SiSU_DbTuple::LoadEndnotes.new(@conn,en,@opt,@file)
                     @tuple_array << t.tuple
                   end
                 end
@@ -466,7 +466,7 @@ module SiSU_DbImport
                   special_character_escape(txt)
                   body=SiSU_FormatShared::CSS_Format.new(@md,data).endnote(nr,txt)
                   strip_markup(txt)
-                  if txt.size > (SiSU_DbColumns::Column_size.new.endnote_clean - 1)
+                  if txt.size > (SiSU_DbColumns::ColumnSize.new.endnote_clean - 1)
                     puts "\n\nTOO LARGE (ENDNOTE - see error log)\n\n"
                     open("#{Dir.pwd}/pg_documents_error_log",'a') do |error|
                       error.puts("\n#{@opt.fns}\nENDNOTE\n#{txt.size} object #{@col[:ocn]},#{@col[:ocnd]},#{@col[:ocns]} -> #{txt.slice(0..500)}")
@@ -487,7 +487,7 @@ module SiSU_DbImport
                       id_t:    @@id_t,
                       hash:    digest_clean
                     }
-                    t=SiSU_DbTuple::Load_endnotes.new(@conn,en,@opt,@file)
+                    t=SiSU_DbTuple::LoadEndnotes.new(@conn,en,@opt,@file)
                     @tuple_array << t.tuple
                   end
                 end
@@ -505,7 +505,7 @@ module SiSU_DbImport
                   special_character_escape(txt)
                   body=SiSU_FormatShared::CSS_Format.new(@md,data).endnote(nr,txt)
                   strip_markup(txt)
-                  if txt.size > (SiSU_DbColumns::Column_size.new.endnote_clean - 1)
+                  if txt.size > (SiSU_DbColumns::ColumnSize.new.endnote_clean - 1)
                     puts "\n\nTOO LARGE (ENDNOTE - see error log)\n\n"
                     open("#{Dir.pwd}/pg_documents_error_log",'a') do |error|
                       error.puts("\n#{@opt.fns}\nENDNOTE\n#{txt.size} object #{@col[:ocn]},#{@col[:ocnd]},#{@col[:ocns]} -> #{txt.slice(0..500)}")
@@ -526,7 +526,7 @@ module SiSU_DbImport
                       id_t:    @@id_t,
                       hash:    digest_clean
                     }
-                    t=SiSU_DbTuple::Load_endnotes.new(@conn,en,@opt,@file)
+                    t=SiSU_DbTuple::LoadEndnotes.new(@conn,en,@opt,@file)
                     @tuple_array << t.tuple
                   end
                 end
@@ -535,7 +535,7 @@ module SiSU_DbImport
             end
           end
         end
-      rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+      rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
       ensure
       end
       @tuple_array
@@ -598,7 +598,7 @@ module SiSU_DbImport
     def db_import_urls(dbi_unit,content)                                           #% import documents OID - populate database
       begin
         @fnc=content
-        @env=SiSU_Env::Info_env.new(@opt.fns)
+        @env=SiSU_Env::InfoEnv.new(@opt.fns)
         base=@env.url.root
         out=@env.path.output
         f,u={},{}
@@ -654,9 +654,9 @@ module SiSU_DbImport
         if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.tgz")==true
           f[:sisupod],u[:sisupod]='sisupod,', "'#{base}/#{@fnb}/#{@opt.fns}.tgz',"
         end
-        t=SiSU_DbTuple::Load_urls.new(@conn,f,u,@@id_t,@opt,@file)
+        t=SiSU_DbTuple::LoadUrls.new(@conn,f,u,@@id_t,@opt,@file)
         tuple=t.tuple
-      rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
+      rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
       ensure
       end
       tuple
diff --git a/lib/sisu/v3dv/db_load_tuple.rb b/lib/sisu/v3dv/db_load_tuple.rb
index 9650b50c..c3273ace 100644
--- a/lib/sisu/v3dv/db_load_tuple.rb
+++ b/lib/sisu/v3dv/db_load_tuple.rb
@@ -59,7 +59,7 @@
 =end
 module SiSU_DbTuple
   require_relative 'db_columns'                         # db_columns.rb
-  class Load_documents
+  class LoadDocuments
     require_relative 'param'                            # param.rb
       include SiSU_Param
     def initialize(conn,col,opt,file)
@@ -114,7 +114,7 @@ module SiSU_DbTuple
       sql_entry
     end
   end
-  class Load_metadata #< SiSU_DbColumns::Columns
+  class LoadMetadata #< SiSU_DbColumns::Columns
     def initialize(conn,id,md,file)
       @conn,@id,@md,@file=conn,id,md,file
       @tp=SiSU_DbColumns::Columns.new(md)
@@ -299,7 +299,7 @@ tid)
       sql_entry
     end
   end
-  class Load_urls
+  class LoadUrls
     def initialize(conn,f,u,id,opt,file)
       @conn,@f,@u,@id,@opt,@file=conn,f,u,id,opt,file
     end
@@ -314,7 +314,7 @@ tid)
       sql_entry
     end
   end
-  class Load_endnotes
+  class LoadEndnotes
     def initialize(conn,en,opt,file)
       @conn,@en,@opt,@file=conn,en,opt,file
     end
diff --git a/lib/sisu/v3dv/db_remove.rb b/lib/sisu/v3dv/db_remove.rb
index cf1fca6f..e34a0a93 100644
--- a/lib/sisu/v3dv/db_remove.rb
+++ b/lib/sisu/v3dv/db_remove.rb
@@ -63,7 +63,7 @@ module SiSU_DbRemove
       @opt,@conn,@file,@sql_type=opt,conn,file,sql_type
       @md=SiSU_Param::Parameters.new(@opt).get
       @fnb=@md.fnb
-      @db=SiSU_Env::Info_db.new
+      @db=SiSU_Env::InfoDb.new
     end
     def remove
       driver_sqlite3=if @sql_type=='sqlite'
diff --git a/lib/sisu/v3dv/db_select.rb b/lib/sisu/v3dv/db_select.rb
index 97fcb990..478a25fa 100644
--- a/lib/sisu/v3dv/db_select.rb
+++ b/lib/sisu/v3dv/db_select.rb
@@ -61,7 +61,7 @@ module SiSU_DbSelect
   class Case
     def initialize(opt,conn='',sql_type='pg')
       @opt,@conn,@sql_type=opt,conn,sql_type
-      @db=SiSU_Env::Info_db.new
+      @db=SiSU_Env::InfoDb.new
       @file=sql_maintenance_file
       @sdb=SiSU_DbDBI::Create.new(@opt,@conn,@file,@sql_type)      # db_dbi.rb
       @sdb_index=SiSU_DbDBI::Index.new(@opt,@conn,@file,@sql_type) # db_dbi.rb
@@ -90,9 +90,9 @@ module SiSU_DbSelect
     def sql_maintenance_file
       file=if @opt.inspect =~/M/
         x=if @opt.fns and not @opt.fns.empty?
-          @env=SiSU_Env::Info_env.new(@opt.fns) if @opt.fns
+          @env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns
           puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type =~/sqlite/ and @opt.cmd =~/M/
-          @db=SiSU_Env::Info_db.new
+          @db=SiSU_Env::InfoDb.new
           @job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql"
           File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+')
         elsif @opt.fns and @opt.fns.inspect =~/create/; nil #sort variations later
@@ -121,7 +121,7 @@ module SiSU_DbSelect
           @sdb.create_table.endnotes_plus
           @sdb.create_table.urls
           @sdb_index.create_indexes
-          rescue;  SiSU_Errors::Info_error.new($!,$@,'-D').error; @sdb.output_dir?
+          rescue;  SiSU_Errors::InfoError.new($!,$@,'-D').error; @sdb.output_dir?
           end
         when /^--createtables?$/
           @sdb.output_dir?
diff --git a/lib/sisu/v3dv/dbi.rb b/lib/sisu/v3dv/dbi.rb
index 4d8883fa..e0bd169e 100644
--- a/lib/sisu/v3dv/dbi.rb
+++ b/lib/sisu/v3dv/dbi.rb
@@ -70,7 +70,7 @@ module  SiSU_DBI
     def initialize(opt)
       SiSU_Env::Load.new('dbi',true).prog
       @opt=opt
-      @db=SiSU_Env::Info_db.new
+      @db=SiSU_Env::InfoDb.new
       if @opt.cmd =~/d/i \
       or  @opt.mod.inspect =~/--(pg(?:sql)?|(?:sq)?lite)/
         @sql_type=if @opt.cmd=~/D/ \
@@ -130,7 +130,7 @@ module  SiSU_DBI
       begin
         SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases
       rescue
-        SiSU_Errors::Info_error.new($!,$@,@cf,@opt.fns).error
+        SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error
       ensure
       end
       begin
diff --git a/lib/sisu/v3dv/defaults.rb b/lib/sisu/v3dv/defaults.rb
index 7278c5f9..55aeef21 100644
--- a/lib/sisu/v3dv/defaults.rb
+++ b/lib/sisu/v3dv/defaults.rb
@@ -66,9 +66,9 @@ module SiSU_Viz
   class Skin
     def initialize
       @fonts='verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman' # 'verdana, arial, georgia, tahoma, sans-serif, helvetica, "times new roman", times, roman'
-      @dir=SiSU_Env::Info_env.new
-      @date=SiSU_Env::Info_date.new #{@date.year}
-      @v=SiSU_Env::Info_version.instance.get_version
+      @dir=SiSU_Env::InfoEnv.new
+      @date=SiSU_Env::InfoDate.new #{@date.year}
+      @v=SiSU_Env::InfoVersion.instance.get_version
     end
     #% glyph
     def glyph_bullet # •
@@ -957,7 +957,7 @@ module SiSU_Viz
     }
     end
     def png_hp
-      dir=SiSU_Env::Info_env.new #(@fns)
+      dir=SiSU_Env::InfoEnv.new #(@fns)
       %{  
       #{txt_home}
     }
@@ -1029,7 +1029,7 @@ module SiSU_Viz
       %{lateral hop}
     end
     def png_home
-      #dir=SiSU_Env::Info_env.new #(@fns)
+      #dir=SiSU_Env::InfoEnv.new #(@fns)
       %{#{txt_home} -->}
       #%{#{txt_home} -->}
     end
@@ -1724,9 +1724,9 @@ WOK
   end
   class Home < Skin
     def initialize
-      @v=SiSU_Env::Info_version.instance.get_version
-      @dir=SiSU_Env::Info_env.new
-      @date=SiSU_Env::Info_date.new #{@date.year}
+      @v=SiSU_Env::InfoVersion.instance.get_version
+      @dir=SiSU_Env::InfoEnv.new
+      @date=SiSU_Env::InfoDate.new #{@date.year}
     end
     def redirect
       <#{linkname}}
         end
         txt_obj={ txt: title }
-        format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+        format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
         toc[:scr]=if dob.name =~/^meta/ \
         and dob.obj =~/Document Information/
           format_toc.lev0
@@ -383,17 +383,17 @@ module SiSU_EPUB
         linkname,ocn=dob.obj.strip,dob.ocn
         if ocn \
         and ocn !~/#/
-          p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn)
+          p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn)
         end
         txt_obj={ txt: linkname }
-        format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+        format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
         toc={}
         toc[:seg]=format_toc.lev2
         toc[:seg_mini]=format_toc.mini_lev2
         if p_num
           title=%{#{p_num.goto}#{linkname}}
           txt_obj={ txt: title }
-          format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+          format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
           toc[:scr]=format_toc.lev2
         end
         toc
@@ -403,17 +403,17 @@ module SiSU_EPUB
         linkname,ocn=dob.obj.strip,dob.ocn
         if ocn \
         and ocn !~/#/
-          p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn)
+          p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn)
         end
         txt_obj={ txt: linkname }
-        format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+        format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
         toc={}
         toc[:seg]=format_toc.lev3
         toc[:seg_mini]=format_toc.mini_lev3
         if p_num
           title=%{#{p_num.goto}#{linkname}}
           txt_obj={ txt: title }
-          format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+          format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
           toc[:scr]=format_toc.lev3
         end
         toc
@@ -421,7 +421,7 @@ module SiSU_EPUB
       def level_4
         dob=@data
         linkname,ocn=dob.obj.strip,dob.ocn
-        p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) if ocn
+        p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn) if ocn
         if dob.ln==4
           seg_link=%{  
     #{dob.obj}
@@ -432,15 +432,15 @@ module SiSU_EPUB
             %{} +
             %{\\1 \\2 })
         end
-        p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) if ocn
+        p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn) if ocn
         txt_obj={ txt: seg_link }
-        format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+        format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
         toc={}
         toc[:seg]=format_toc.lev4
         toc[:seg_mini]=format_toc.mini_lev4
         title=%{#{p_num.goto}#{linkname}} if p_num
         txt_obj={ txt: title }
-        format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+        format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
         toc[:scr]=format_toc.lev4
         toc
       end
@@ -450,17 +450,17 @@ module SiSU_EPUB
         toc={}
         if ocn \
         and ocn !~/#/
-          p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn)
+          p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn)
           lnk_n_txt=%{  
     #{linkname}
   }
           txt_obj={ txt: lnk_n_txt }
-          format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+          format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
           toc[:seg]=format_toc.lev5
           toc[:seg_mini]=format_toc.mini_lev5
           title=%{#{p_num.goto}#{linkname}}
           txt_obj={ txt: title }
-          format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+          format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
           toc[:scr]=format_toc.lev5
         end
         toc
@@ -471,17 +471,17 @@ module SiSU_EPUB
         toc={}
         if ocn \
         and ocn !~/#/
-          p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn)
+          p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn)
           lnk_n_txt=%{  
   #{linkname}
 }
           txt_obj={ txt: lnk_n_txt }
-          format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+          format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
           toc[:seg]=format_toc.lev6
           toc[:seg_mini]=format_toc.mini_lev6
           title=%{#{p_num.goto}#{linkname}}
           txt_obj={ txt: title }
-          format_toc=SiSU_EPUB_Format::Format_toc.new(@md,txt_obj)
+          format_toc=SiSU_EPUB_Format::FormatToc.new(@md,txt_obj)
           toc[:scr]=format_toc.lev6
         end
         toc
@@ -510,33 +510,33 @@ module SiSU_EPUB
         end
       end
     end
-    class Scroll_head_and_segtoc < Toc
+    class ScrollHeadAndSegToc < Toc
       def initialize(md='',toc='',links_guide_toc='')
         @md,@toc,@links_guide_toc=md,toc,links_guide_toc
-        @vz=SiSU_Env::Get_init.instance.skin
+        @vz=SiSU_Env::GetInit.instance.skin
       end
       def in_common
         toc_shared=[]
         segtoc=[]
         SiSU_Screen::Ansi.new(@md.opt.cmd,'Scroll & Segtoc').txt_grey if @md.opt.cmd =~/[MVv]/
-        format_head_toc=SiSU_EPUB_Format::Head_toc.new(@md)
+        format_head_toc=SiSU_EPUB_Format::HeadToc.new(@md)
         dochead=format_head_toc.head
         dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge
         toc_shared << dochead #<< ads.div.major
         segtoc << format_head_toc.head #<< ads.div.major
-        if SiSU_EPUB_Format::Head_toc.method_defined? :toc_head_escript
+        if SiSU_EPUB_Format::HeadToc.method_defined? :toc_head_escript
           toc_shared << format_head_toc.toc_head_escript
           segtoc << format_head_toc.toc_head_escript
         end
         if defined? @md.rights.all \
         and @md.rights.all
           rights=format_head_toc.rights.all
-          rights=SiSU_EPUB_Tune::Clean_xhtml.new(rights).clean
+          rights=SiSU_EPUB_Tune::CleanXHTML.new(rights).clean
         end
         if defined? @md.notes.prefix_b \
         and @md.notes.prefix_b
           prefix_b=format_head_toc.prefix_b
-          prefix_b=SiSU_EPUB_Tune::Clean_xhtml.new(prefix_b).clean
+          prefix_b=SiSU_EPUB_Tune::CleanXHTML.new(prefix_b).clean
         end
         seg_toc_band=format_head_toc.seg_head_navigation_band
         seg_toc_band_bottom=format_head_toc.seg_head_navigation_band_bottom
@@ -544,7 +544,7 @@ module SiSU_EPUB
         doc_title_endnote=@md.title.full.gsub(/(\*+)/,'\1')
         tmp_head=doc_title_endnote + "\n"
         txt_obj={ txt: tmp_head }
-        format_txt_obj=SiSU_EPUB_Format::Format_text_object.new(@md,txt_obj)
+        format_txt_obj=SiSU_EPUB_Format::FormatTextObject.new(@md,txt_obj)
         toc_shared << format_txt_obj.center_bold
         segtoc << format_txt_obj.center_bold
         if defined? @md.creator.author \
@@ -552,7 +552,7 @@ module SiSU_EPUB
           creator_endnote=@md.creator.author.gsub(/(\*+)/,%{ \\1})
           tmp_head=creator_endnote + "\n"
           txt_obj={ txt: tmp_head }
-          format_txt_obj=SiSU_EPUB_Format::Format_text_object.new(@md,txt_obj)
+          format_txt_obj=SiSU_EPUB_Format::FormatTextObject.new(@md,txt_obj)
           toc_shared << format_txt_obj.center_bold
           segtoc << format_txt_obj.center_bold
         end
@@ -590,22 +590,22 @@ module SiSU_EPUB
         segtoc << seg_toc_band_bottom
         segtoc << format_head_toc.xhtml_close
         segtoc.flatten!.compact!
-        Epub_output.new(@md,segtoc).segtoc
+        EPUB_Output.new(@md,segtoc).segtoc
         segtoc=[]
         @toc[:scr],@toc[:seg]=[],[]
         toc_shared
       end
     end
-    class Table < SiSU_XHTML_Table::Table_xhtml
+    class Table < SiSU_XHTML_Table::TableXHTML
     end
     class Seg < SiSU_EPUB_Seg::Seg
     end
-    class Epub_output
+    class EPUB_Output
       def initialize(md,output='')
         @md,@output=md,output
         @epub_doc="#{@md.fnb}.epub"
-        @epub_header=SiSU_EPUB_Format::Head_information.new(@md)
-        @make=SiSU_Env::Create_file.new(@md.fns)
+        @epub_header=SiSU_EPUB_Format::HeadInformation.new(@md)
+        @make=SiSU_Env::CreateFile.new(@md.fns)
       end
       def songsheet
         mimetype
@@ -627,7 +627,7 @@ module SiSU_EPUB
       end
       def css
         out=@make.epub.xhtml_css
-        out << SiSU_EPUB_Format::Css.new.css_epub_xhtml
+        out << SiSU_EPUB_Format::CSS.new.css_epub_xhtml
         out.close
       end
       def epub_toc_ncx
@@ -639,7 +639,7 @@ module SiSU_EPUB
             end
           end
           out.close
-        rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+        rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
         end
       end
       def epub_metadata_opf
@@ -651,7 +651,7 @@ module SiSU_EPUB
             end
           end
           out.close
-        rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+        rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
         end
       end
       def images
@@ -697,7 +697,7 @@ module SiSU_EPUB
           end
           filename_html_segtoc.close
           filename_html_index.close
-        rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+        rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
         end
       end
     end
diff --git a/lib/sisu/v3dv/epub_concordance.rb b/lib/sisu/v3dv/epub_concordance.rb
index 66864775..9c90d482 100644
--- a/lib/sisu/v3dv/epub_concordance.rb
+++ b/lib/sisu/v3dv/epub_concordance.rb
@@ -69,7 +69,7 @@ module SiSU_EPUB_Concordance
   class Source
     def initialize(opt)
       @opt=opt
-      @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt)
+      @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt)
     end
     def read
       begin
@@ -88,21 +88,21 @@ module SiSU_EPUB_Concordance
           SiSU_Screen::Ansi.new(@md.opt.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.cmd =~/q/
           SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet
         end
-      rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+      rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
       ensure
       end
     end
     private
-    class Doc_title
+    class DocTitle
       include SiSU_Viz
       #revisit, both requires (html & shared_xml) needed for stand alone operation (sisu -w [filename])
       require_relative 'epub'                           # epub.rb
       def initialize(particulars)
         @particulars,@md=particulars,particulars.md
-        @data=SiSU_EPUB::Source::XHtml_environment.new(particulars).tuned_file_instructions
-        @vz=SiSU_Env::Get_init.instance.skin
+        @data=SiSU_EPUB::Source::XHTML_Environment.new(particulars).tuned_file_instructions
+        @vz=SiSU_Env::GetInit.instance.skin
         txt_path=%{#{@md.dir_out}}
-        SiSU_Env::Info_skin.new(@md).select
+        SiSU_Env::InfoSkin.new(@md).select
         @fnb=@md.fnb
         @lex_button=%{SiSU home -->}
         @doc_details =<|\w+|[a-zA-Z]+}mi
-        rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+        rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
         end
       end
       def songsheet
         begin
           @file_concordance=File.open("#{@path}/content/#{@md.fn[:epub_concord]}",'w')
           map_para
-        rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+        rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
         ensure
           @file_concordance.close
         end
@@ -275,7 +275,7 @@ WOK
         end
         scr='Full Text scroll: doc#  '
         seg=''
-        @file_concordance << SiSU_EPUB_Concordance::Source::Doc_title.new(@particulars).create
+        @file_concordance << SiSU_EPUB_Concordance::Source::DocTitle.new(@particulars).create
         alph=%W[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
         @file_concordance << '

' alph.each {|x| @file_concordance << %{#{x}, }} diff --git a/lib/sisu/v3dv/epub_format.rb b/lib/sisu/v3dv/epub_format.rb index 30b6e0bc..46c9d4be 100644 --- a/lib/sisu/v3dv/epub_format.rb +++ b/lib/sisu/v3dv/epub_format.rb @@ -58,11 +58,11 @@ =end module SiSU_EPUB_Format include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(md,ocn) @md,@ocn=md,ocn.to_s @ocn ||='' - vz=SiSU_Env::Get_init.instance.skin + vz=SiSU_Env::GetInit.instance.skin @skin_no_ocn=if defined? vz.ocn_display_off \ and vz.ocn_display_off==true true @@ -95,7 +95,7 @@ module SiSU_EPUB_Format %{} end end - class Css + class CSS def css_epub_xhtml <} end end - class Widget < Head_information + class Widget < HeadInformation def initialize(md) super(md) @md=md - @cf_defaults=SiSU_Env::Info_processing_flag.new + @cf_defaults=SiSU_Env::InfoProcessingFlag.new end def home %{ @@ -1732,7 +1732,7 @@ WOK } end def search - env=SiSU_Env::Info_env.new(@md.fns,@md) + env=SiSU_Env::InfoEnv.new(@md.fns,@md) env.widget.search_form('sisusearch',nil,nil,true) end def manifest @@ -1745,7 +1745,7 @@ WOK end class XML end - class Head_toc < Head_information + class HeadToc < HeadInformation def initialize(md) super(md) @md=md @@ -1884,7 +1884,7 @@ WOK metadata end end - class Head_seg < Head_information + class HeadSeg < HeadInformation def initialize(md) super(md) end @@ -2033,7 +2033,7 @@ WOK } end def heading_advert_local_1 - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{

@@ -2044,7 +2044,7 @@ WOK

} end def heading_advert_local_2 - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{

@@ -2055,7 +2055,7 @@ WOK

} end def heading_advert_external - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{

@@ -2118,7 +2118,7 @@ WOK def title_banner(title,subtitle,creator) end end - class Head_scroll < Head_toc + class HeadScroll < HeadToc def initialize(md) super(md) end @@ -2135,8 +2135,8 @@ WOK #{@vz.table_close}} end end - class Format_text_object - @vz=SiSU_Env::Get_init.instance.skin + class FormatTextObject + @vz=SiSU_Env::GetInit.instance.skin attr_accessor :md,:t_o,:txt,:ocn,:format,:table,:link,:linkname,:paranum,:p_num,:headname,:banner,:url def initialize(md,t_o) @md,@t_o=md,t_o @@ -2179,8 +2179,8 @@ WOK if @txt and not @txt.empty? @txt.gsub!(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'') end - @p_num=Paragraph_number.new(@md,@ocn) - @vz=SiSU_Env::Get_init.instance.skin + @p_num=ParagraphNumber.new(@md,@ocn) + @vz=SiSU_Env::GetInit.instance.skin end def nametags_seg(dob) #FIX tags='' @@ -2257,7 +2257,7 @@ WOK end def table @txt=if @t_o.obj !~/^#{@txt}

\n} end end - class Format_scroll < Format_text_object + class FormatScroll < FormatTextObject def initialize(md,txt) super(md,txt) - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end end - class Format_seg < Format_text_object + class FormatSeg < FormatTextObject def initialize(md,txt) super(md,txt) end @@ -2523,7 +2523,7 @@ WOK %{

#{@txt}

} end end - class Format_toc < Format_text_object + class FormatToc < FormatTextObject def initialize(md,txt) super(md,txt) end diff --git a/lib/sisu/v3dv/epub_segments.rb b/lib/sisu/v3dv/epub_segments.rb index 50a1091c..0280f951 100644 --- a/lib/sisu/v3dv/epub_segments.rb +++ b/lib/sisu/v3dv/epub_segments.rb @@ -60,7 +60,7 @@ module SiSU_EPUB_Seg require_relative 'shared_xhtml' # shared_xhtml.rb require_relative 'epub' # epub.rb require_relative 'shared_metadata' # shared_metadata.rb - class Seg_output + class SegOutput def initialize(md,outputfile,seg,minitoc,type='') @md,@output_epub_cont_seg,@seg,@minitoc,@type=md,outputfile,seg,minitoc,type end @@ -70,31 +70,31 @@ module SiSU_EPUB_Seg filename_seg << @seg[:title] << @seg[:nav] if @type=='endnotes' @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) + format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) txt_obj={ txt: 'Endnotes', ocn_display: ''} - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_endnotes] << @seg[:headings] << %{\n
\n} << @seg[:endnote_all] << '
' elsif @type=='idx' @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) + format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) txt_obj={ txt: 'Index', ocn_display: ''} - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n
\n} << @seg[:idx] << '
' elsif @type=='metadata' metadata=Metadata::Summary.new(@md).xhtml_display.metadata @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) + format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) txt_obj={ txt: 'Metadata', ocn_display: ''} - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n
\n} << metadata << '
' elsif @type=='sisu_manifest' - env=SiSU_Env::Info_env.new(@md.fns) + env=SiSU_Env::InfoEnv.new(@md.fns) path_and_name,url_and_name="#{env.path.output}/#{@md.fnb}/sisu_manifest.html","#{env.url.root}/#{@md.fnb}/sisu_manifest.html" manifest=if FileTest.file?("#{path_and_name}")==true <\n} << manifest << '' else @@ -140,7 +140,7 @@ WOK attr_reader :seg_name_xhtml,:seg_name_xhtml_tracker def initialize(md='',data='') @md,@data=md,data - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @seg_name_xhtml=@@seg_name_xhtml || nil @seg_name_xhtml_tracker=@@tracker || nil end @@ -151,7 +151,7 @@ WOK data=articles(data) Seg.new.cleanup # (((( added )))) #### (((( END )))) #### - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@seg_name=[] end @@ -163,7 +163,7 @@ WOK printed_endnote_seg='n' idx_xhtml=nil if @md.book_idx - idx_xhtml=SiSU_Particulars::Combined_singleton.instance.get_idx_xhtml(@md).xhtml_idx + idx_xhtml=SiSU_Particulars::CombinedSingleton.instance.get_idx_xhtml(@md).xhtml_idx idx_xhtml.each {|x| @@seg[:idx] << x } @@seg[:heading_idx]='' end @@ -179,7 +179,7 @@ WOK @@seg_total=@@seg_name.length testforartnum=@@seg_name_xhtml SiSU_Screen::Ansi.new(@md.opt.cmd,@@seg_name.length) if @md.opt.cmd =~/[MVv]/ - map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags + map_nametags=SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map #p map_nametags data.each do |dob| #if defined? dob.obj \ #and dob.obj =~/href="#{Xx[:segment]}#+\S+?"/ @@ -242,15 +242,15 @@ WOK output_epub_cont_seg=File.new(segfilename,'w') if @@seg_name_xhtml[tracking-1] if dob.is=='heading' \ or @@seg_name_xhtml[tracking-1] !~/endnotes|book_index|metadata/ - Seg_output.new(@md,output_epub_cont_seg,@@seg,@minitoc).output + SegOutput.new(@md,output_epub_cont_seg,@@seg,@minitoc).output elsif dob.is=='heading_insert' if @@seg_name_xhtml[tracking-1]=='endnotes' - Seg_output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'endnotes').output + SegOutput.new(@md,output_epub_cont_seg,@@seg,@minitoc,'endnotes').output elsif @@seg_name_xhtml[tracking-1]=='book_index' - Seg_output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'idx').output + SegOutput.new(@md,output_epub_cont_seg,@@seg,@minitoc,'idx').output @@seg[:idx]=[] elsif @@seg_name_xhtml[tracking-1]=='metadata' # navigation bug FIX - Seg_output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'metadata').output + SegOutput.new(@md,output_epub_cont_seg,@@seg,@minitoc,'metadata').output else puts "#{__FILE__}::#{__LINE__}" end else puts "#{__FILE__}::#{__LINE__}" @@ -261,7 +261,7 @@ WOK if @@seg_name_xhtml[tracking]=='sisu_manifest' # this is for manifest, includes navigation bug segfilename="#{dir_epub_cont}/#{@@seg_name_xhtml[tracking]}#{Sfx[:epub_xhtml]}" output_epub_cont_seg=File.new(segfilename,'w') - Seg_output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'sisu_manifest').output + SegOutput.new(@md,output_epub_cont_seg,@@seg,@minitoc,'sisu_manifest').output Seg.new.reinitialise #BUG navigation bug with items following metadata, and occurring before manifest, this becomes a bug ... work area for book index, FIX end #@output_epub_cont_seg.close #%(((( EOF )))) --> @@ -297,7 +297,7 @@ WOK data end def heading_art(dob) - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) + format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) if dob.is=='heading' \ and dob.ln =~/^[1-6]/ @@seg[:dot_nav]= (@@tracker < @@seg_total-1) \ @@ -308,7 +308,7 @@ WOK end def head(dob) clean=/|<:.*?>$/ - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) + format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) if @@tracker < @@seg_total-1 @@segtocband=(@@tracker==0) \ ? format_head_seg.toc_next2 @@ -325,9 +325,9 @@ WOK ocn=if @@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: @@heading1, ocn_display: @p_num.ocn_display } - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading1.gsub(clean,'') @@heading1.gsub!(/  [\d*+]+<\/sup> <\/a>/,'') end @@ -336,9 +336,9 @@ WOK ocn=if heading2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display } - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading2.gsub(clean,'') @@heading2.gsub!(/  [\d*+]+<\/sup> <\/a>/,'') end @@ -347,9 +347,9 @@ WOK ocn=if heading3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display } - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading3.gsub(clean,'') @@heading3.gsub!(/  [\d*+]+<\/sup> <\/a>/,'') end @@ -358,27 +358,27 @@ WOK ocn=if heading4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display } - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading4.gsub(clean,'') end @@tracker=@@tracker+1 end def markup(dob) @debug=[] - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) + format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) if dob.is =~/(?:heading|para)/ #extend as necessary FIX - @p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,dob.ocn) + @p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,dob.ocn) end - sto=SiSU_EPUB_Format::Format_text_object.new(@md,dob) + sto=SiSU_EPUB_Format::FormatTextObject.new(@md,dob) dob_xhtml=if dob.is=='heading' \ or dob.is=='heading_insert' \ or dob.is=='para' dob_xhtml=if dob.is=='heading' \ or dob.is=='heading_insert' if dob.ln==4 - sto.seg_heading4 # work on see Split_text_object + sto.seg_heading4 # work on see SplitTextObject elsif dob.ln==5 sto.seg_heading5 elsif dob.ln==6; sto.seg_heading6 @@ -417,13 +417,13 @@ WOK end if dob.is =~/heading|para/ \ and (not dob.ocn or dob.ocn.to_s.empty?) - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,dob) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,dob) end if (dob.is=='heading' \ || dob.is=='heading_insert' \ || dob.is=='para') \ and dob.note_ #dob.obj =~/ \n
\n} @@ -494,10 +494,10 @@ WOK and dob.ln.to_s =~/^[56]/ case dob.ln when 5 - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,dob) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,dob) subtoc=format_seg.subtoc_lev5 #keep and make available, this is the subtoc when 6 - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,dob) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,dob) subtoc=format_seg.subtoc_lev6 #keep and make available, this is the subtoc end @@seg_subtoc_array << subtoc @@ -524,7 +524,7 @@ WOK try=e_n.split(/
/) try.each do |e| txt_obj={ txt: e } - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) note_match=if e =~/#{Mx[:pa_o]}i[1-9]#{Mx[:pa_c]}/ format_seg.endnote_body_indent else format_seg.endnote_body @@ -537,7 +537,7 @@ WOK endnote_part_a=note_match_seg[m,1] endnote_part_b=note_match_seg[m,2] txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b } - format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408 @@seg[:endnote_all] << note_match_all_seg end diff --git a/lib/sisu/v3dv/epub_tune.rb b/lib/sisu/v3dv/epub_tune.rb index c8cb2681..2f150006 100644 --- a/lib/sisu/v3dv/epub_tune.rb +++ b/lib/sisu/v3dv/epub_tune.rb @@ -91,7 +91,7 @@ module SiSU_EPUB_Tune File.open(@file.marshal.html_tune,'w') {|f| Marshal.dump(@data.to_a,f)} end end - class Clean_xhtml + class CleanXHTML def initialize(html='') @html=html end @@ -198,10 +198,10 @@ module SiSU_EPUB_Tune class Tune def initialize(data,md) @data,@md=data,md - @vz=SiSU_Env::Get_init.instance.skin - @env=SiSU_Env::Info_env.new(@md.fns) - @sys=SiSU_Env::System_call.new - @env=SiSU_Env::Info_env.new(@md.fns) + @vz=SiSU_Env::GetInit.instance.skin + @env=SiSU_Env::InfoEnv.new(@md.fns) + @sys=SiSU_Env::SystemCall.new + @env=SiSU_Env::InfoEnv.new(@md.fns) @brace_url=SiSU_Viz::Skin.new.url_decoration end def songsheet @@ -217,7 +217,7 @@ module SiSU_EPUB_Tune Output.new(data,@md).marshal end tuned=Tune.new(@data,@md).output - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -248,13 +248,13 @@ module SiSU_EPUB_Tune dob.obj.gsub!(/^#{Mx[:gl_bullet]}/m,'●  ') dob.obj.gsub!(/#{Mx[:nbsp]}/,' ') dob.obj.gsub!(/<(p|br)>/,'<\1 />') - dob=SiSU_EPUB_Tune::Clean_xhtml.new(dob).clean + dob=SiSU_EPUB_Tune::CleanXHTML.new(dob).clean @tuned_file << dob end end def urls(data) @words=[] - map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags + map_nametags=SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map #p map_nametags data.each do |word| @words << if word=~/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/ http_=true diff --git a/lib/sisu/v3dv/errors.rb b/lib/sisu/v3dv/errors.rb index 70ab4666..25ef688c 100644 --- a/lib/sisu/v3dv/errors.rb +++ b/lib/sisu/v3dv/errors.rb @@ -59,7 +59,7 @@ module SiSU_Errors require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen - class Info_error #{l}
   } end - sv=SiSU_Env::Info_version.instance.get_version + sv=SiSU_Env::InfoVersion.instance.get_version < diff --git a/lib/sisu/v3dv/harvest_topics.rb b/lib/sisu/v3dv/harvest_topics.rb index a9940e50..6bdc7e12 100644 --- a/lib/sisu/v3dv/harvest_topics.rb +++ b/lib/sisu/v3dv/harvest_topics.rb @@ -91,7 +91,7 @@ module SiSU_Harvest_Topics end end the_idx=SiSU_Harvest_Topics::Index.new(@opt,@env,idx_array,@@the_idx_topics).construct_book_topic_index - SiSU_Harvest_Topics::Output_index.new(@opt,the_idx).html_print.html_songsheet + SiSU_Harvest_Topics::OutputIndex.new(@opt,the_idx).html_print.html_songsheet end end class Harvest @@ -259,15 +259,15 @@ module SiSU_Harvest_Topics @the_idx end end - class Output_index + class OutputIndex require_relative 'i18n' # i18n.rb def initialize(opt,the_idx) @opt,@the_idx=opt,the_idx - @env=SiSU_Env::Info_env.new - @rc=SiSU_Env::Get_init.instance.sisu_yaml.rc + @env=SiSU_Env::InfoEnv.new + @rc=SiSU_Env::GetInit.instance.sisu_yaml.rc @alph=%W[9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z] @letter=@alph.shift - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def html_file_open @the_idx.keys.each do |lng| @@ -335,7 +335,7 @@ module SiSU_Harvest_Topics l=ln[lng][:t] harvest_languages += %{#{l}   } end - sv=SiSU_Env::Info_version.instance.get_version + sv=SiSU_Env::InfoVersion.instance.get_version < diff --git a/lib/sisu/v3dv/help.rb b/lib/sisu/v3dv/help.rb index 9dc26aec..35a96170 100644 --- a/lib/sisu/v3dv/help.rb +++ b/lib/sisu/v3dv/help.rb @@ -68,8 +68,8 @@ module SiSU_Help else @cX=SiSU_Screen::Ansi.new('yes').cX end fns='help_example_dummy_file_name.sst' - @env=SiSU_Env::Info_env.new(fns) - @db=SiSU_Env::Info_db.new + @env=SiSU_Env::InfoEnv.new(fns) + @db=SiSU_Env::InfoDb.new m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m @output_stub=Dir.pwd[m,1] end @@ -337,7 +337,7 @@ WOK WOK end def shortcuts - cf_defaults=SiSU_Env::Info_processing_flag.new + cf_defaults=SiSU_Env::InfoProcessingFlag.new print < def level_endnotes if @md.flag_endnotes - format_head_scroll=SiSU_HTML_Format::Head_scroll.new(@md) + format_head_scroll=SiSU_HTML_Format::HeadScroll.new(@md) @@toc[:scr] << format_head_scroll.toc_endnote end end def level_concordance - format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) @@toc[:seg_mini] << format_head_toc.mini_seg_concordance end def level_metadata - format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) @@toc[:scr] << format_head_toc.metadata @@toc[:seg] << format_head_toc.seg_metadata @@toc[:seg_mini] << format_head_toc.mini_seg_metadata end def level_word_index - format_head_toc=SiSU_HTML_Format::Head_toc.new(@d0c) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@d0c) @@toc[:scr] << format_head_toc.concordance @@toc[:seg] << format_head_toc.concordance @@toc[:seg_mini] << format_head_toc.mini_concordance @@ -317,7 +317,7 @@ WOK linkname,link=dob.obj.strip,dob.ocn if link \ and link !~/#/ #% keep eye on link - p_num=SiSU_HTML_Format::Paragraph_number.new(@md,link) + p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,link) end title=if dob.obj !~/Metadata/; linkname else @@ -326,7 +326,7 @@ WOK end toc={} txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:seg]=if dob.name =~/^meta/ \ and dob.obj =~/Document Information/ format_toc.lev0 @@ -354,7 +354,7 @@ WOK %{#{linkname}} end txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:scr]=if dob.name =~/^meta/ \ and dob.obj =~/Document Information/ format_toc.lev0 @@ -367,18 +367,18 @@ WOK linkname,ocn=dob.obj.strip,dob.ocn p_num=if ocn \ and ocn !~/#/ - SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) else nil end txt_obj={ txt: linkname } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc={} toc[:seg]=format_toc.lev2 toc[:seg_mini]=format_toc.mini_lev2 if p_num title=%{#{p_num.goto}#{linkname}} txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:scr]=format_toc.lev2 end toc @@ -388,18 +388,18 @@ WOK linkname,ocn=dob.obj.strip,dob.ocn p_num=if ocn \ and ocn !~/#/ - SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) else nil end txt_obj={ txt: linkname } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc={} toc[:seg]=format_toc.lev3 toc[:seg_mini]=format_toc.mini_lev3 if p_num title=%{#{p_num.goto}#{linkname}} txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:scr]=format_toc.lev3 end toc @@ -407,7 +407,7 @@ WOK def level_4 dob=@data linkname,ocn=dob.obj.strip,dob.ocn - p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn + p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) if ocn if dob.ln ==4 seg_link=%{ #{dob.obj} @@ -418,7 +418,7 @@ WOK %{\\1 \\2 }) end - p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn + p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) if ocn @file=SiSU_Env::FileOp.new(@md) if @md txt_obj=if seg_link=~/sisu_manifest\.html/ man_link=if @file.output_dir_structure.by_language_code? \ @@ -429,7 +429,7 @@ WOK { txt: man_link } else { txt: seg_link } end - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc={} toc[:seg]=format_toc.lev4 toc[:seg_mini]=format_toc.mini_lev4 @@ -439,7 +439,7 @@ WOK { txt: man_link } else { txt: title } end - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:scr]=format_toc.lev4 toc #end @@ -450,17 +450,17 @@ WOK toc={} if ocn \ and ocn !~/#/ - p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) lnk_n_txt=%{ #{linkname} } txt_obj={ txt: lnk_n_txt } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:seg]=format_toc.lev5 toc[:seg_mini]=format_toc.mini_lev5 title=%{#{p_num.goto}#{linkname}} txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:scr]=format_toc.lev5 end toc @@ -471,17 +471,17 @@ WOK toc={} if ocn \ and ocn !~/#/ - p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) lnk_n_txt=%{ #{linkname} } txt_obj={ txt: lnk_n_txt } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:seg]=format_toc.lev6 toc[:seg_mini]=format_toc.mini_lev6 title=%{#{p_num.goto}#{linkname}} txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc[:scr]=format_toc.lev6 end toc @@ -510,31 +510,31 @@ WOK end end end - class Scroll_head_and_segtoc < Toc + class ScrollHeadAndSegToc < Toc def initialize(md='',toc='',links_guide_toc='') @md,@toc,@links_guide_toc=md,toc,links_guide_toc - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def in_common toc_shared=[] @segtoc=[] SiSU_Screen::Ansi.new(@md.opt.cmd,'Scroll & Segtoc').txt_grey if @md.opt.cmd =~/[MVv]/ - format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) dochead=format_head_toc.head dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge ads=SiSU_HTML_Promo::Ad.new(@md) toc_shared << dochead << ads.div.major @segtoc << format_head_toc.head << ads.div.major - toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript - @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::Head_toc.method_defined? :toc_head_escript + toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::HeadToc.method_defined? :toc_head_escript + @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::HeadToc.method_defined? :toc_head_escript toc_shared << format_head_toc.scroll_head_navigation_band if defined? @md.rights.all rights=format_head_toc.rights.all - rights=SiSU_HTML_Tune::Clean_html.new(rights).clean + rights=SiSU_HTML_Tune::CleanHTML.new(rights).clean end if @md.prefix_b prefix_b=format_head_toc.notes.prefix_b - prefix_b=SiSU_HTML_Tune::Clean_html.new(prefix_b).clean + prefix_b=SiSU_HTML_Tune::CleanHTML.new(prefix_b).clean end @segtoc << format_head_toc.seg_head_navigation_band toc_shared << format_head_toc.scroll_head_title_banner_open @@ -543,14 +543,14 @@ WOK doc_title_endnote=@md.title.full.gsub(/(\*+)/,'\1') tmp_head=doc_title_endnote + "\n" txt_obj={ txt: tmp_head } - format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) + format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold if defined? @md.creator.author creator_endnote=@md.creator.author.gsub(/(\*+)/,%{ \\1}) tmp_head=creator_endnote + "\n" txt_obj={ txt: tmp_head } - format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) + format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold end @@ -591,11 +591,11 @@ WOK toc_shared end end - class Table < SiSU_HTML_Table::Table_html + class Table < SiSU_HTML_Table::TableHTML end class Scroll < SiSU_HTML_Scroll::Scroll end - class Scroll_output + class ScrollOutput def initialize(scr_toc,scr_body,scr_metadata,scr_owner_details,scr_tails,md) @scr_toc,@scr_body,@scr_metadata,@scr_owner_details,@scr_tails,@md=scr_toc,scr_body,scr_metadata,scr_owner_details,scr_tails,md end @@ -627,7 +627,7 @@ WOK @filename_html_scroll.puts para,"\n" end end - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure; @filename_html_scroll.close end end @@ -643,7 +643,7 @@ WOK @filename_html_segtoc.puts para,"\n" end end - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure @filename_html_segtoc.close unless FileTest.file?("#{@file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg_index}") diff --git a/lib/sisu/v3dv/html_format.rb b/lib/sisu/v3dv/html_format.rb index 662e7c75..968d9747 100644 --- a/lib/sisu/v3dv/html_format.rb +++ b/lib/sisu/v3dv/html_format.rb @@ -58,11 +58,11 @@ =end module SiSU_HTML_Format include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(md,ocn) @md,@ocn=md,ocn.to_s @ocn ||='' - vz=SiSU_Env::Get_init.instance.skin + vz=SiSU_Env::GetInit.instance.skin @skin_no_ocn=if defined? vz.ocn_display_off \ and vz.ocn_display_off==true true @@ -95,15 +95,15 @@ module SiSU_HTML_Format %{} end end - class Head_information + class HeadInformation require_relative 'shared_xml' # shared_xml.rb include SiSU_Viz attr_reader :md,:rdf,:vz def initialize(md) @md=md # DublinCore 1 - title - @vz=SiSU_Env::Get_init.instance.skin - @css=SiSU_Env::CSS_stylesheet.new(md) + @vz=SiSU_Env::GetInit.instance.skin + @css=SiSU_Env::CSS_Stylesheet.new(md) @seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || []) @seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || []) @toc,@index='toc','index' @@ -149,12 +149,12 @@ module SiSU_HTML_Format } end end - class Widget < Head_information + class Widget < HeadInformation def initialize(md) super(md) @md=md - @cf_defaults=SiSU_Env::Info_processing_flag.new - @env=SiSU_Env::Info_env.new(@md.fns) + @cf_defaults=SiSU_Env::InfoProcessingFlag.new + @env=SiSU_Env::InfoEnv.new(@md.fns) @file=SiSU_Env::FileOp.new(@md) end def home @@ -183,7 +183,7 @@ module SiSU_HTML_Format } end def search - env=SiSU_Env::Info_env.new(@md.fns,@md) + env=SiSU_Env::InfoEnv.new(@md.fns,@md) env.widget.search_form('sisusearch',nil,nil,true) end def manifest @@ -263,7 +263,7 @@ module SiSU_HTML_Format end class XML end - class Head_toc < Head_information + class HeadToc < HeadInformation def initialize(md) super(md) @md=md @@ -621,7 +621,7 @@ WOK } end end - class Head_seg < Head_information + class HeadSeg < HeadInformation def initialize(md) #(md='') super(md) end @@ -771,7 +771,7 @@ WOK } end def heading_advert_local_1 - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{
@@ -783,7 +783,7 @@ WOK } end def heading_advert_local_2 - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{
@@ -795,7 +795,7 @@ WOK } end def heading_advert_external - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{
\n} end def summarize_sources(id,file,pth,rel,url) - sys=SiSU_Env::System_call.new + sys=SiSU_Env::SystemCall.new dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{pth}/#{file}") else sys.md5("#{pth}/#{file}") end @@ -731,9 +731,9 @@ WOK end def check_output(data) begin - minitoc=SiSU_HTML_MiniToc::Toc_mini.new(@md,data).songsheet.join("\n") + minitoc=SiSU_HTML_MiniToc::TocMini.new(@md,data).songsheet.join("\n") id,file='','' - vz=SiSU_Env::Get_init.instance.skin + vz=SiSU_Env::GetInit.instance.skin banner_table=if vz.banner_home_button_only !~ /http:\/\/www\.jus\.uio\.no\/sisu/ \ and vz.banner_home_button_only !~ /sisu\.home\.png/ < WOK output - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end diff --git a/lib/sisu/v3dv/manpage.rb b/lib/sisu/v3dv/manpage.rb index 7ce9b1d7..07f97c95 100644 --- a/lib/sisu/v3dv/manpage.rb +++ b/lib/sisu/v3dv/manpage.rb @@ -81,7 +81,7 @@ module SiSU_Manpage def read begin @md=SiSU_Param::Parameters.new(@opt).get - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) path=@env.path.output_tell tool=(@opt.cmd =~/[MVv]/) \ ? "#{@env.program.text_editor} #{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}" @@ -93,8 +93,8 @@ module SiSU_Manpage SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}").flow if @opt.cmd =~/[MV]/ @dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here SiSU_Manpage::Source::Scroll.new(@md,@dal_array).songsheet - SiSU_Env::Info_skin.new(@md).select #watch - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + SiSU_Env::InfoSkin.new(@md).select #watch + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -107,7 +107,7 @@ module SiSU_Manpage def initialize(md,data) @md,@data=md,data @brace_url=SiSU_Viz::Skin.new.url_decoration - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @tab="\t" @br="\n" @@dostype='unix endnotes' @@ -162,8 +162,8 @@ GSUB @manpage[:metadata]=Metadata::Summary.new(@md).manpage.metadata end def manpage_tail - SiSU_Env::Info_skin.new(@md).select - vz=SiSU_Env::Get_init.instance.skin + SiSU_Env::InfoSkin.new(@md).select + vz=SiSU_Env::GetInit.instance.skin generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version] lastdone="Last Generated on: #{Time.now}" rubyv="Ruby version: #{@md.ruby_version}" @@ -250,7 +250,7 @@ WOK @@endnotes[:para]=[] end def markup(data) # Used for major markup instructions - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) @data_mod,@endnotes,@level,@cont,@copen,@manpage_contents_close=Array.new(6){[]} (0..6).each { |x| @cont[x]=@level[x]=false } (4..6).each { |x| @manpage_contents_close[x]='' } @@ -337,9 +337,9 @@ WOK if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ if dob.obj =~@regx #/.+?<~\d+;\w\d+;\w\d+>.*/ #watch change paranum=dob.obj[@regx,3] - @p_num=SiSU_ManpageFormat::Paragraph_number.new(paranum) + @p_num=SiSU_ManpageFormat::ParagraphNumber.new(paranum) end - x=SiSU_ManpageFormat::Format_text_object.new(@md,dob) + x=SiSU_ManpageFormat::FormatTextObject.new(@md,dob) if dob.is=='heading' manpage_structure(dob) dob.obj=case dob.ln @@ -386,11 +386,11 @@ WOK elsif defined? @md.date.published \ and @md.date.published @md.date.published - else SiSU_Env::Info_date.new.year #date missing decide on action + else SiSU_Env::InfoDate.new.year #date missing decide on action end manpage_name,manpage_synopsis='','' manpg={} - proj=SiSU_Env::Info_version.instance.get_version + proj=SiSU_Env::InfoVersion.instance.get_version manpage[:open] = %{.TH "#{@md.fnb}" "#{@md.make.manpage['section']}" "#{date}" "#{proj[:version]}" "#{@md.title.main}"#{@md.make.manpage['name']}#{@md.make.manpage['synopsis']}} content << manpage[:open] content << manpage[:head] diff --git a/lib/sisu/v3dv/manpage_format.rb b/lib/sisu/v3dv/manpage_format.rb index 6fdba89f..7f5b5dad 100644 --- a/lib/sisu/v3dv/manpage_format.rb +++ b/lib/sisu/v3dv/manpage_format.rb @@ -60,7 +60,7 @@ module SiSU_ManpageFormat require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(paranum) @paranum=/(\d+)/m.match(paranum)[1] end @@ -74,7 +74,7 @@ module SiSU_ManpageFormat @paranum.gsub(/(\d+)/,'') end end - class Format_text_object + class FormatTextObject def initialize(md,dob) @md,@dob=md,dob if @dob.class==Hash @@ -84,7 +84,7 @@ elsif @dob.class==String end rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/ @dob.obj.gsub!(rgx,'\1') if @dob.obj =~rgx - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def scr_endnote_body "#{@dob.obj} " diff --git a/lib/sisu/v3dv/modify.rb b/lib/sisu/v3dv/modify.rb index 73e7ac2a..743c9ccc 100644 --- a/lib/sisu/v3dv/modify.rb +++ b/lib/sisu/v3dv/modify.rb @@ -89,7 +89,7 @@ module SiSU_Modify #Extracted.new.modify.classes, #modify.dates, #modify.modules, - modify.classes, + modify.classes, #modify.misc, ] end @@ -219,118 +219,118 @@ WOK def classes [ # classes incorrectly named - [/SiSU_CGI_common/, 'CGI_Common'], - [/SiSU_Config/, 'ConfigSite'], - [/SiSU_file/, 'FileOp'], - [/SiSU_search_pgsql/, 'SearchPgSQL'], - [/SiSU_search_sqlite/, 'SearchSQLite'], - [/SiSU_search/, 'SearchSQL'], - [/SiSU_SQL/, 'SQL'], +# [/SiSU_CGI_common/, 'CGI_Common'], +# [/SiSU_Config/, 'ConfigSite'], +# [/SiSU_file/, 'FileOp'], +# [/SiSU_search_pgsql/, 'SearchPgSQL'], +# [/SiSU_search_sqlite/, 'SearchSQLite'], +# [/SiSU_search/, 'SearchSQL'], +# [/SiSU_SQL/, 'SQL'], # classes -# [/Bare_urls/, 'BareUrls'], -# [/Book_index/, 'BookIndex'], -# [/Character_encoding/, 'CharacterEncoding'], -# [/Clean_html/, 'CleanHTML'], -# [/Clean_output/, 'CleanOutput'], -# [/Clean_xhtml/, 'CleanXHTML'], -# [/Column_size/, 'ColumnSize'], -# [/Combined_singleton/, 'CombinedSingleton'], -# [/Composite_file_list/, 'CompositeFileList'], -# [/Convert_markup/, 'ConvertMarkup'], -# [/Create_file/, 'CreateFile'], -# [/Create_site/, 'CreateSite'], -# [/Create_system_link/, 'CreateSystemLink'], -# [/CSS_default/, 'CSS_Default'], -# [/CSS_Format_generic/, 'CSS_FormatGeneric'], -# [/CSS_select/, 'CSS_Select'], -# [/CSS_stylesheet/, 'CSS_Stylesheet'], -# [/Css/, 'CSS'], -# [/Dbi_search_statement/, 'DBI_SearchStatement'], -# [/Dbi_search_string/, 'DBI_SearchString'], -# [/Doc_title/, 'DocTitle'], -# [/Env_call/, 'EnvCall'], -# [/Epub_output/, 'EPUB_Output'], -# [/File_map/, 'FileMap'], -# [/Format_head/, 'FormatHead'], -# [/Format_seg/, 'FormatSeg'], -# [/Format_obj_break/, 'FormatObjBreak'], -# [/Format_scroll/, 'FormatScroll'], -# [/Format_seg/, 'FormatSeg'], -# [/Format_str/, 'FormatStr'], -# [/Format_text_object/, 'FormatTextObject'], -# [/Format_toc/, 'FormatToc'], -# [/Get_init/, 'GetInit'], -# [/Head_information/, 'HeadInformation'], -# [/Header_scan/, 'HeaderScan'], -# [/Character_encoding/, 'CharacterEncoding'], -# [/Head_scroll/, 'HeadScroll'], -# [/Head_seg/, 'HeadSeg'], -# [/Head_toc/, 'HeadToc'], -# [/Html_environment/, 'HTML_Environment'], -# [/Info_date/, 'InfoDate'], -# [/Info_db/, 'InfoDb'], -# [/Info_env/ , 'InfoEnv'], -# [/Info_error/, 'InfoError'], -# [/Info_file/, 'InfoFile'], -# [/Info_port/, 'InfoPort'], -# [/Info_processing_flag/, 'InfoProcessingFlag'], -# [/Info_program/, 'InfoProgram'], -# [/Info_remote_host/, 'InfoRemoteHost'], -# [/Info_remote/, 'InfoRemote'], -# [/Info_settings/, 'InfoSettings'], -# [/Info_skin/, 'InfoSkin'], -# [/Info_system/, 'InfoSystem'], -# [/Info_version/, 'InfoVersion'], -# [/LaTeX_to_pdf/, 'LaTeXtoPdf'], -# [/LaTeX_create/, 'LaTeXcreate'], -# [/Links_guide/, 'LinksGuide'], -# [/Load_documents/, 'LoadDocuments'], -# [/Load_endnotes/, 'LoadEndnotes'], -# [/Load_metadata/, 'LoadMetadata'], -# [/Load_urls/, 'LoadUrls'], -# [/Markup_identify/, 'MarkupIdentify'], -# [/Markup_inform/, 'MarkupInform'], -# [/Markup_history/, 'MarkupHistory'], -# [/Md_default/, 'MdDefault'], -# [/Modified_text_plus_Hash_digest/, 'ModifiedTextPlusHashDigest'], -# [/Object_block_txt/, 'ObjectBlockTxt'], -# [/Object_comment/, 'ObjectComment'], -# [/Object_digest/, 'ObjectDigest'], -# [/Object_heading/, 'ObjectHeading'], -# [/Object_image/, 'ObjectImage'], -# [/Object_layout/, 'ObjectLayout'], -# [/Object_metadata/, 'ObjectMetadata'], -# [/Object_meta/, 'ObjectMeta'], -# [/Object_para/, 'ObjectPara'], -# [/Object_structure/, 'ObjectStructure'], -# [/Object_table/, 'ObjectTable'], -# [/ODT_head_1_2/, 'ODT_Head_1_2'], -# [/Output_index/, 'OutputIndex'], -# [/Output_Info/, 'OutputInfo'], -# [/Output_urls/, 'OutputUrls'], -# [/Paragraph_number/, 'ParagraphNumber'], -# [/Pot_number/, 'PotNumber'], -# [/Remote_download/, 'RemoteDownload'], -# [/Remote_image/, 'RemoteImage'], -# [/Scroll_head_and_segtoc/, 'ScrollHeadAndSegToc'], -# [/Scroll_output/, 'ScrollOutput'], -# [/Search_request/, 'SearchRequest'], -# [/Seg_output/, 'SegOutput'], -# [/Set_CF/, 'SetCF'], -# [/Special_characters/, 'SpecialCharacters'], -# [/Split_text_object/, 'SplitTextObject'], -# [/Standardise_language/, 'StandardiseLanguage'], -# [/System_call/, 'SystemCall'], -# [/Table_html/, 'TableHTML'], -# [/Table_xhtml/, 'TableXHTML'], -# [/Table_xml_exp/, 'TableXMLexp'], -# [/Table_xml/, 'TableXML'], -# [/TeX_metadata/, 'TeX_Metadata'], -# [/Texinfo_make/, 'TeXinfoMake'], -# [/Texinfo_txt/, 'TeXinfoTxt'], -# [/Toc_mini/, 'TocMini'], -# [/Use_TeX/, 'UseTeX'], -# [/XHtml_environment/, 'XHTML_Environment'], + [/Bare_urls/, 'BareUrls'], + [/Book_index/, 'BookIndex'], + [/Character_encoding/, 'CharacterEncoding'], + [/Clean_html/, 'CleanHTML'], + [/Clean_output/, 'CleanOutput'], + [/Clean_xhtml/, 'CleanXHTML'], + [/Column_size/, 'ColumnSize'], + [/Combined_singleton/, 'CombinedSingleton'], + [/Composite_file_list/, 'CompositeFileList'], + [/Convert_markup/, 'ConvertMarkup'], + [/Create_file/, 'CreateFile'], + [/Create_site/, 'CreateSite'], + [/Create_system_link/, 'CreateSystemLink'], + [/CSS_default/, 'CSS_Default'], + [/CSS_Format_generic/, 'CSS_FormatGeneric'], + [/CSS_select/, 'CSS_Select'], + [/CSS_stylesheet/, 'CSS_Stylesheet'], + [/Css/, 'CSS'], + [/Dbi_search_statement/, 'DBI_SearchStatement'], + [/Dbi_search_string/, 'DBI_SearchString'], + [/Doc_title/, 'DocTitle'], + [/Env_call/, 'EnvCall'], + [/Epub_output/, 'EPUB_Output'], + [/File_map/, 'FileMap'], + [/Format_head/, 'FormatHead'], + [/Format_seg/, 'FormatSeg'], + [/Format_obj_break/, 'FormatObjBreak'], + [/Format_scroll/, 'FormatScroll'], + [/Format_seg/, 'FormatSeg'], + [/Format_str/, 'FormatStr'], + [/Format_text_object/, 'FormatTextObject'], + [/Format_toc/, 'FormatToc'], + [/Get_init/, 'GetInit'], + [/Head_information/, 'HeadInformation'], + [/Header_scan/, 'HeaderScan'], + [/Character_encoding/, 'CharacterEncoding'], + [/Head_scroll/, 'HeadScroll'], + [/Head_seg/, 'HeadSeg'], + [/Head_toc/, 'HeadToc'], + [/Html_environment/, 'HTML_Environment'], + [/Info_date/, 'InfoDate'], + [/Info_db/, 'InfoDb'], + [/Info_env/ , 'InfoEnv'], + [/Info_error/, 'InfoError'], + [/Info_file/, 'InfoFile'], + [/Info_port/, 'InfoPort'], + [/Info_processing_flag/, 'InfoProcessingFlag'], + [/Info_program/, 'InfoProgram'], + [/Info_remote_host/, 'InfoRemoteHost'], + [/Info_remote/, 'InfoRemote'], + [/Info_settings/, 'InfoSettings'], + [/Info_skin/, 'InfoSkin'], + [/Info_system/, 'InfoSystem'], + [/Info_version/, 'InfoVersion'], + [/LaTeX_to_pdf/, 'LaTeXtoPdf'], + [/LaTeX_create/, 'LaTeXcreate'], + [/Links_guide/, 'LinksGuide'], + [/Load_documents/, 'LoadDocuments'], + [/Load_endnotes/, 'LoadEndnotes'], + [/Load_metadata/, 'LoadMetadata'], + [/Load_urls/, 'LoadUrls'], + [/Markup_identify/, 'MarkupIdentify'], + [/Markup_inform/, 'MarkupInform'], + [/Markup_history/, 'MarkupHistory'], + [/Md_default/, 'MdDefault'], + [/Modified_text_plus_Hash_digest/, 'ModifiedTextPlusHashDigest'], + [/Object_block_txt/, 'ObjectBlockTxt'], + [/Object_comment/, 'ObjectComment'], + [/Object_digest/, 'ObjectDigest'], + [/Object_heading/, 'ObjectHeading'], + [/Object_image/, 'ObjectImage'], + [/Object_layout/, 'ObjectLayout'], + [/Object_metadata/, 'ObjectMetadata'], + [/Object_meta/, 'ObjectMeta'], + [/Object_para/, 'ObjectPara'], + [/Object_structure/, 'ObjectStructure'], + [/Object_table/, 'ObjectTable'], + [/ODT_head_1_2/, 'ODT_Head_1_2'], + [/Output_index/, 'OutputIndex'], + [/Output_Info/, 'OutputInfo'], + [/Output_urls/, 'OutputUrls'], + [/Paragraph_number/, 'ParagraphNumber'], + [/Pot_number/, 'PotNumber'], + [/Remote_download/, 'RemoteDownload'], + [/Remote_image/, 'RemoteImage'], + [/Scroll_head_and_segtoc/, 'ScrollHeadAndSegToc'], + [/Scroll_output/, 'ScrollOutput'], + [/Search_request/, 'SearchRequest'], + [/Seg_output/, 'SegOutput'], + [/Set_CF/, 'SetCF'], + [/Special_characters/, 'SpecialCharacters'], + [/Split_text_object/, 'SplitTextObject'], + [/Standardise_language/, 'StandardiseLanguage'], + [/System_call/, 'SystemCall'], + [/Table_html/, 'TableHTML'], + [/Table_xhtml/, 'TableXHTML'], + [/Table_xml_exp/, 'TableXMLexp'], + [/Table_xml/, 'TableXML'], + [/TeX_metadata/, 'TeX_Metadata'], + [/Texinfo_make/, 'TeXinfoMake'], + [/Texinfo_txt/, 'TeXinfoTxt'], + [/Toc_mini/, 'TocMini'], + [/Use_TeX/, 'UseTeX'], + [/XHtml_environment/, 'XHTML_Environment'], ] end self diff --git a/lib/sisu/v3dv/odf.rb b/lib/sisu/v3dv/odf.rb index 85a9a390..2f0cf38e 100644 --- a/lib/sisu/v3dv/odf.rb +++ b/lib/sisu/v3dv/odf.rb @@ -73,7 +73,7 @@ module SiSU_ODF require 'find' def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @@endnotes_para=[] end def read @@ -89,8 +89,8 @@ module SiSU_ODF SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}").flow if @opt.cmd =~/[MV]/ end SiSU_ODF::Source::Scroll.new(@particulars).songsheet - SiSU_Env::Info_skin.new(@md).select - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + SiSU_Env::InfoSkin.new(@md).select + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -104,7 +104,7 @@ module SiSU_ODF @@fns=nil def initialize(particulars) @md,@env,@dal_array=particulars.md,particulars.env,particulars.dal_array - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @tab="\t" @brace_url=SiSU_Viz::Skin.new.url_decoration @br=(@md.opt.cmd =~/M/) ? '' : '' @@ -246,7 +246,7 @@ module SiSU_ODF def text_link_odf(txt,url,trail) txt.gsub!(/(\\\+)/,'+') #this is convoluted, and risky :-( url.gsub!(/(\\\+)/,'+') #this is convoluted, and risky :-( - map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map + map_nametags=SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map t=case url when /^https?:/ %{#{txt.strip}#{trail}} @@ -458,7 +458,7 @@ module SiSU_ODF end def obj_break(dob) if dob.is =='break' - br=SiSU_ODF_Format::Format_obj_break.new(@md,dob) + br=SiSU_ODF_Format::FormatObjBreak.new(@md,dob) if dob.obj==Mx[:br_page] \ or dob.obj==Mx[:br_page_new] dob=br.br_page @@ -482,7 +482,7 @@ module SiSU_ODF if dob.is !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ if defined? dob.ocn \ and not dob.ocn.nil? - p_num=SiSU_ODF_Format::Paragraph_number.new(dob.ocn).display + p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn).display end end end @@ -511,7 +511,7 @@ module SiSU_ODF end def markup(data) # Used for major markup instructions safe_characters=/[^a-zA-Z0-9}{\/?,."';:)(><\-_&!@%~#\]\[*=$| \n+`#{Mx[:tc_p]}]/u - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) dir.path.odt_bld @data_mod,@endnotes,@level,@cont,@copen,@odf_contents_close=Array.new(6){[]} @rcdc=false @@ -598,7 +598,7 @@ module SiSU_ODF and (dob.obj =~/~metadata/ or dob =~/#{Mx[:lv_o]}1:meta#{Mx[:lv_x]}\s*Document Information/) #fix Mx[:lv_o] if dob.is !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ if defined? dob.ocn and dob.ocn =~/\d+/ - @p_num=SiSU_ODF_Format::Paragraph_number.new(dob.ocn) + @p_num=SiSU_ODF_Format::ParagraphNumber.new(dob.ocn) end if dob.is=~/heading|para|group|verse|code|table|break/ # extend, include other types odf_structure(@md,dob) @@ -686,7 +686,7 @@ WOK def odf #%odf output env=SiSU_Env::FileOp.new(@md) env.mkdir - header=SiSU_ODF_Format::ODT_head_1_2.new(@md) + header=SiSU_ODF_Format::ODT_Head_1_2.new(@md) filename="#{@env.processing_path.odt}/manifest.rdf" od=File.new(filename,'w+') od << header.manifest_rdf diff --git a/lib/sisu/v3dv/odf_format.rb b/lib/sisu/v3dv/odf_format.rb index f15d6386..9167fc5e 100644 --- a/lib/sisu/v3dv/odf_format.rb +++ b/lib/sisu/v3dv/odf_format.rb @@ -60,7 +60,7 @@ module SiSU_ODF_Format require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(paranum) @paranum=/(\d+)/m.match(paranum.to_s)[1] end @@ -74,7 +74,7 @@ module SiSU_ODF_Format @paranum.gsub(/(\d+)/,'') end end - class Format_text_object + class FormatTextObject def initialize(md,t_o) @md,@t_o=md,t_o if t_o.class==Hash @@ -85,7 +85,7 @@ module SiSU_ODF_Format end rgx=/#{Mx[:en_a_o]}\d+\s+(.+?)#{Mx[:en_a_c]}/ @txt.gsub!(rgx,'\1') if @txt =~rgx - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def scr_endnote_body "#{@txt} " @@ -110,7 +110,7 @@ module SiSU_ODF_Format def initialize(md,dob,p_num) @md,@dob,@p_num=md,dob,p_num @txt=dob.obj - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin if @md.fns != @@fns @@table_counter=0 @@fns=@md.fns @@ -200,7 +200,7 @@ module SiSU_ODF_Format @dob end end - class ODT_head_1_2 + class ODT_Head_1_2 def initialize(md) @md=md @generator="#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" @@ -587,7 +587,7 @@ WOK x.strip! end end - class Format_obj_break + class FormatObjBreak def initialize(md,t_o) @md,@t_o=md,t_o end diff --git a/lib/sisu/v3dv/options.rb b/lib/sisu/v3dv/options.rb index 7a5c8a0b..23f45136 100644 --- a/lib/sisu/v3dv/options.rb +++ b/lib/sisu/v3dv/options.rb @@ -66,9 +66,9 @@ module SiSU_Commandline def initialize(a) @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub,@sub_location='','','','','','','','','','','','','' @f_pths,@files,@paths,@mod,@act=Array.new(5){[]} - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new @lng_base=@env.language_default_set - @dir_structure_by=SiSU_Env::Env_call.new.output_dir_structure.by? + @dir_structure_by=SiSU_Env::EnvCall.new.output_dir_structure.by? @@base_path ||=Dir.pwd @base_path=@@base_path r=Px[:lng_lst].join('|') @@ -182,7 +182,7 @@ module SiSU_Commandline if @files.length > 0 \ and @cmd.empty? \ and @mod.length==0 #% if no other action called on filename given, default is sisu --v3 -0 [filename(s)] configured as flag default - shortcut=SiSU_Env::Info_processing_flag.new + shortcut=SiSU_Env::InfoProcessingFlag.new @mod=['--v3'] @cmd=shortcut.cf_0 + 'm' end @@ -304,7 +304,7 @@ module SiSU_Commandline { cmd: c, mod: m, what: w, paths: pth, files: f, f_pths: f_pths, lng: lng, lngs: lngs } end def expand_numeric_shortcuts(a) - shortcut=SiSU_Env::Info_processing_flag.new + shortcut=SiSU_Env::InfoProcessingFlag.new s='' a.each do |x| y=case x diff --git a/lib/sisu/v3dv/param.rb b/lib/sisu/v3dv/param.rb index 78a5f975..d8c65e8c 100644 --- a/lib/sisu/v3dv/param.rb +++ b/lib/sisu/v3dv/param.rb @@ -64,7 +64,7 @@ module SiSU_Param require_relative 'param_identify_markup' # param_identify_markup.rb require_relative 'help' # help.rb include SiSU_Help - @@date=SiSU_Env::Info_date.new + @@date=SiSU_Env::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=nil @doc={ initialise: nil, markup: '', lnks: '', stmp: '', req: {} } @@yaml=@@yamladdr=nil @@ -83,7 +83,7 @@ module SiSU_Param else opt.fns.gsub(/\.ssm$/,'.ssm.sst') end Instantiate.new.param_instantiate - @env=SiSU_Env::Info_env.new(@fns) + @env=SiSU_Env::InfoEnv.new(@fns) @pstorefile="#{@env.processing_path.dal}/#{@fns}.pstore" end def get @@ -126,7 +126,7 @@ module SiSU_Param @@md.opt=@opt @@md end - class Md_default + class MdDefault def rights(author,date) @author,@date=author,date def all @@ -970,7 +970,7 @@ module SiSU_Param @rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/ @rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg begin - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@fns).error ensure end end @@ -989,9 +989,9 @@ module SiSU_Param @user,@home,@hostname,@pwd=ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'] @programs,@wc,@language,@language_original={},{},{},{} @en={ sum: 0, mark: 0, note: 0, mismatch: 0 } - @prog=SiSU_Env::Info_settings.new - @sys=SiSU_Env::System_call.new - @env=SiSU_Env::Info_env.new(@fns) #watch + @prog=SiSU_Env::InfoSettings.new + @sys=SiSU_Env::SystemCall.new + @env=SiSU_Env::InfoEnv.new(@fns) #watch puts 'system locale: ' + @sys.locale if @opt.cmd =~/[MV]/ if @prog.wc \ and @sys.wc @@ -1009,7 +1009,7 @@ module SiSU_Param @locale=@sys.locale @file_encoding=@sys.file_encoding(fns,@opt.cmd) # programs set here for things that affect output appearance only - @programs[:pdf]=SiSU_Env::System_call.new.program_found?('pdflatex') + @programs[:pdf]=SiSU_Env::SystemCall.new.program_found?('pdflatex') if @opt.cmd =~/P/ #if @env.multilingual? m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss @fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3] @@ -1036,13 +1036,13 @@ module SiSU_Param @flag_endnotes,@flag_auto_endnotes,@flag_separate_endnotes=false,false,false @flag_separate_endnotes_make=true regx_date=/^\d{4}(?:-(?:[0][0-9]|1[0-2])(-(?:[0-2][0-9]|3[01]))?)?$/ - ver=SiSU_Env::Info_version.instance + ver=SiSU_Env::InfoVersion.instance @sisu_version=ver.get_version @ruby_version=ver.rbversion @generated=Time.now fns_array=@data.dup skip unless fns_array # consider - @markup_version=SiSU_MarkupType::Markup_identify.new(fns_array,@opt).markup_version? #% determine markup version + @markup_version=SiSU_MarkupType::MarkupIdentify.new(fns_array,@opt).markup_version? #% determine markup version if fns_array[0] =~ /^(?:%\s+)?(?:SiSU\s+(?:master\s+)?[\d.]*|sisu-[\d.]+)$/ #check markup and markup version if fns_array[0] =~ /^(?:%\s+)?(?:SiSU\s+(?:master\s+)?|sisu-)(?:(?:[0-9]+?)(?:\.[0-9]+?)(?:\.[0-9]+))?$/ #check markup and markup version @markup_version_declared=fns_array[0].match(/^(?:%\s+)?(?:SiSU\s+(?:master\s+)?|sisu-)([\d.]+)$/)[1] @@ -1296,10 +1296,10 @@ module SiSU_Param and @creator.author \ and defined? @date.published \ and @date.published - @rights=Md_default.new.rights(@creator.author,@date.published) + @rights=MdDefault.new.rights(@creator.author,@date.published) elsif defined? @creator.author \ and @creator.author - @rights=Md_default.new.rights("[#{@creator.author}]",'') + @rights=MdDefault.new.rights("[#{@creator.author}]",'') end end if defined? @classify.topic_register \ @@ -1356,8 +1356,8 @@ module SiSU_Param @filesize=(File.size(fn)).to_s if @sys.openssl !=false skin=@doc_skin \ - ? (SiSU_Env::Info_skin.new(@opt,@doc_skin).select) - : SiSU_Env::Info_skin.new(@opt).select + ? (SiSU_Env::InfoSkin.new(@opt,@doc_skin).select) + : SiSU_Env::InfoSkin.new(@opt).select @dgst,@dgst_skin=[],[] if @env.digest.type =~/sha256/ dgst=@sys.sha256(@env.source_file_with_path) @@ -1372,7 +1372,7 @@ module SiSU_Param end end @publisher ||= "#@@publisher (this copy)" - fn_set_lang=SiSU_Env::Standardise_language.new(@opt.lng).language + fn_set_lang=SiSU_Env::StandardiseLanguage.new(@opt.lng).language unless @language[:code] \ and @language[:name] lang=@env.i18n.language #default language settings for directory by name, or in sysrc.yml @@ -1386,7 +1386,7 @@ module SiSU_Param @fnl=@env.i18n.lang_filename(fn_set_lang[:c]) #fix # @flv.each do |l| -# lang=SiSU_Env::Standardise_language.new.file_to_language(l) +# lang=SiSU_Env::StandardiseLanguage.new.file_to_language(l) # c={ a: '', b: '', c: '' } # if @fnl[:pre] =~/\S/; c[:a]="#{lang[:c]}." # elsif @fnl[:mid] =~/\S/; c[:b]=".#{lang[:c]}" @@ -1395,7 +1395,7 @@ module SiSU_Param # @lang << [lang[:n],"#{c[:a]}sisu_manifest#{c[:b]}.html#{c[:c]}"] # end if @flv @lang.uniq! - @fn=SiSU_Env::Env_call.new(@fns).lang(fn_set_lang[:c]) + @fn=SiSU_Env::EnvCall.new(@fns).lang(fn_set_lang[:c]) @identifier="#{@env.url.root}/#{@fnb}/#{@fn[:toc]}" #DC note constructed dc identifier if @en[:note] > 0 \ and @en[:sum] > 0 @@ -1520,7 +1520,7 @@ module SiSU_Param end class Instantiate def param_instantiate - @@date=SiSU_Env::Info_date.new + @@date=SiSU_Env::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=nil @doc={ initialise: nil, diff --git a/lib/sisu/v3dv/param_identify_markup.rb b/lib/sisu/v3dv/param_identify_markup.rb index 6737b1c9..c8c1fe8b 100644 --- a/lib/sisu/v3dv/param_identify_markup.rb +++ b/lib/sisu/v3dv/param_identify_markup.rb @@ -59,7 +59,7 @@ =end module SiSU_MarkupType - class Markup_identify + class MarkupIdentify @@version={} @@fns,@@version[:determined],@@version[:declared],@@declared_doc_type='','','','[text?]' attr_accessor :version,:declared_doc_type diff --git a/lib/sisu/v3dv/particulars.rb b/lib/sisu/v3dv/particulars.rb index cd4e29d5..7c599624 100644 --- a/lib/sisu/v3dv/particulars.rb +++ b/lib/sisu/v3dv/particulars.rb @@ -64,7 +64,7 @@ module SiSU_Particulars require_relative 'param' # param.rb include SiSU_Param require_relative 'dal' # dal.rb - class Combined_singleton + class CombinedSingleton include Singleton def get_all(opt) @opt=opt @@ -132,15 +132,15 @@ module SiSU_Particulars begin @md=SiSU_Param::Parameters.new(@opt).get self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end attr_accessor :opt,:env,:file def set_env begin - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end def set_file @@ -148,7 +148,7 @@ module SiSU_Particulars set_md unless @md @file=SiSU_Env::FileOp.new(@md) self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end attr_accessor :opt,:dal_array @@ -156,35 +156,35 @@ module SiSU_Particulars begin @dal_array=@dal_array=SiSU_DAL::Source.new(@md).get self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end def set_sst_idx begin @sst_idx=SiSU_DAL::Source.new(@md).get_idx_sst self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end def set_tex_idx begin @tex_idx=SiSU_DAL::Source.new(@md).get_idx_tex self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end def set_html_idx begin @html_idx=SiSU_DAL::Source.new(@md).get_idx_html self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end def set_xhtml_idx begin @xhtml_idx=SiSU_DAL::Source.new(@md).get_idx_xhtml self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end attr_accessor :nametags_map @@ -193,7 +193,7 @@ module SiSU_Particulars opt=@md ? @md : @opt @nametags_map=SiSU_DAL::Source.new(opt).get_map_nametags self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end attr_accessor :ocn_htmlseg_map @@ -201,7 +201,7 @@ module SiSU_Particulars begin @ocn_htmlseg_map=SiSU_DAL::Source.new(@md).get_map_ocn_htmlseg self - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error end end end diff --git a/lib/sisu/v3dv/plaintext.rb b/lib/sisu/v3dv/plaintext.rb index 739ffb09..e4b9b398 100644 --- a/lib/sisu/v3dv/plaintext.rb +++ b/lib/sisu/v3dv/plaintext.rb @@ -80,7 +80,7 @@ module SiSU_Plaintext def read begin md=SiSU_Param::Parameters.new(@opt).get - env=SiSU_Env::Info_env.new(@opt.fns) + env=SiSU_Env::InfoEnv.new(@opt.fns) unless @opt.cmd =~/q/ path=env.path.output_tell tool=(@opt.cmd =~/[MVv]/) \ @@ -102,8 +102,8 @@ module SiSU_Plaintext end #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78 SiSU_Plaintext::Source::Scroll.new(dal_array,md,wrap_width).songsheet - SiSU_Env::Info_skin.new(md).select #watch - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + SiSU_Env::InfoSkin.new(md).select #watch + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -115,7 +115,7 @@ module SiSU_Plaintext @@endnotes={ para: [], end: [] } def initialize(data,md,wrap_width) @data,@md,@wrap_width=data,md,wrap_width - @env=SiSU_Env::Info_env.new(@md.fns) + @env=SiSU_Env::InfoEnv.new(@md.fns) @brace_url=SiSU_Viz::Skin.new.url_decoration @tab="\t" @@endnotes_=case md.opt.mod.inspect @@ -186,9 +186,9 @@ WOK end end def plaintext_tail - SiSU_Env::Info_skin.new(@md).select -# env=SiSU_Env::Info_env.new(@md.fns) - vz=SiSU_Env::Get_init.instance.skin + SiSU_Env::InfoSkin.new(@md).select +# env=SiSU_Env::InfoEnv.new(@md.fns) + vz=SiSU_Env::GetInit.instance.skin base_url="#{@env.url.root}/#{@md.fnb}" generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version] lastdone="Last Generated on: #{Time.now}" @@ -270,7 +270,7 @@ WOK @@endnotes[:para]=[] end def markup(data) # Used for major markup instructions - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) @data_mod,@endnotes,@level,@cont,@copen,@plaintext_contents_close=Array.new(6){[]} (0..6).each { |x| @cont[x]=@level[x]=false } (4..6).each { |x| @plaintext_contents_close[x]='' } @@ -343,13 +343,13 @@ WOK if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ #if defined? dob.ocn and dob.ocn.to_s =~/\d+/ # paranum=dob.ocn.to_s - # @p_num=SiSU_PlaintextFormat::Paragraph_number.new(paranum) + # @p_num=SiSU_PlaintextFormat::ParagraphNumber.new(paranum) #end p_num='' if @env.plaintext_ocn? if defined? dob.ocn \ and not dob.ocn.nil? - p_num=SiSU_PlaintextFormat::Paragraph_number.new(dob.ocn).display + p_num=SiSU_PlaintextFormat::ParagraphNumber.new(dob.ocn).display end end if dob.is=='heading' \ diff --git a/lib/sisu/v3dv/plaintext_format.rb b/lib/sisu/v3dv/plaintext_format.rb index c25f1ac3..7aec6da6 100644 --- a/lib/sisu/v3dv/plaintext_format.rb +++ b/lib/sisu/v3dv/plaintext_format.rb @@ -60,7 +60,7 @@ module SiSU_PlaintextFormat require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(paranum) @paranum=/(\d+)/m.match(paranum.to_s)[1] end @@ -74,7 +74,7 @@ module SiSU_PlaintextFormat @paranum.gsub(/(\d+)/,'"#\1"') end end - class Format_text_object + class FormatTextObject def initialize(md,t_o) @md,@t_o=md,t_o if t_o.class==Hash @@ -89,7 +89,7 @@ module SiSU_PlaintextFormat @txt.gsub!(rgx,'') if @txt =~rgx rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/ @txt.gsub!(rgx,'\1') if @txt =~rgx - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def scr_endnote_body "#{@txt} " diff --git a/lib/sisu/v3dv/po4a.rb b/lib/sisu/v3dv/po4a.rb index 332891b7..2aa4e21d 100644 --- a/lib/sisu/v3dv/po4a.rb +++ b/lib/sisu/v3dv/po4a.rb @@ -93,14 +93,14 @@ module SiSU_Po4a src[:pth]=@opt.f_pth[:pth] src[:files]=if @opt.fns =~ /\.(?:(?:-|ssm\.)sst|ssm)$/ @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm') - SiSU_Assemble::Composite_file_list.new(@opt).read + SiSU_Assemble::CompositeFileList.new(@opt).read else [@opt.fns] end md=SiSU_Param::Parameters.new(@opt).get src[:files].each do |fn| SiSU_DAL::Source.new(@opt,fn).read # -m - env=SiSU_Env::Info_env.new(@opt.fns) + env=SiSU_Env::InfoEnv.new(@opt.fns) m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss @fnn,@fnb,@fnt=fn[m,1],fn[m,2],fn[m,3] unless @opt.cmd =~/q/ @@ -150,9 +150,9 @@ module SiSU_Po4a else 78 end SiSU_Po4a::Source::Scroll.new(fn,@dal_array_lang_src,@dal_array_lang_translation,@@md_src,@@md_trn,wrap_width).songsheet - SiSU_Env::Info_skin.new(md).select #watch + SiSU_Env::InfoSkin.new(md).select #watch end - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -168,7 +168,7 @@ module SiSU_Po4a ? md_src : md_trn @brace_url=SiSU_Viz::Skin.new.url_decoration - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @tab="\t" @@endnotes_=(@md.opt.mod.inspect =~/--endnote/) ? true : false # --footnote @br=(@md.opt.mod.inspect =~/--dos/) ? "\r\n" : "\n" # --unix @@ -243,7 +243,7 @@ GSUB w=[] w << [ "#. #{@po4a_identify_type} - metadata: title", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.title.main, meta_src.metadata_tags.title.sub, @@ -256,7 +256,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: creator", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.creator.head, meta_src.metadata_tags.creator.author, @@ -271,7 +271,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: rights", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.rights.head, meta_src.metadata_tags.rights.copyright.text, @@ -285,7 +285,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: classify", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.classify.head, meta_src.metadata_tags.classify.relation, @@ -301,7 +301,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: date", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.date.head, meta_src.metadata_tags.date.added_to_site, @@ -315,7 +315,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - processing, make instruction", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.processing_tags.make.language, meta_src.processing_tags.make.headings, @@ -349,7 +349,7 @@ GSUB w=[] w << [ "#. #{@po4a_identify_type} - metadata: title", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.title.main, meta_src.metadata_tags.title.sub, @@ -369,7 +369,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: creator", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.creator.head, meta_src.metadata_tags.creator.author, @@ -393,7 +393,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: rights", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.rights.head, meta_src.metadata_tags.rights.copyright.text, @@ -415,7 +415,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: classify", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.classify.head, meta_src.metadata_tags.classify.relation, @@ -441,7 +441,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - metadata: date", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.metadata_tags.date.head, meta_src.metadata_tags.date.added_to_site, @@ -463,7 +463,7 @@ GSUB ] w << [ "#. #{@po4a_identify_type} - processing, make instruction", - "#: en/#{@md.fns}:#{SiSU_Po4aUtils::Pot_number.new.num}", + "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}", 'msgid ""', meta_src.processing_tags.make.language, meta_src.processing_tags.make.headings, @@ -811,7 +811,7 @@ GSUB if defined? dob_src.ocn \ and dob_src.ocn.to_s =~/\d+/ paranum=dob_src.ocn.to_s - @p_num=SiSU_Po4aUtils::Paragraph_number.new(paranum) + @p_num=SiSU_Po4aUtils::ParagraphNumber.new(paranum) end case dob_src.is when 'heading'; pot_structure_heading(dob_src,notes_s,dob_trn,notes_t) @@ -835,7 +835,7 @@ GSUB #[dob_src,dob_trn] end def markup(dob) # Used for major markup instructions - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) fix=[] dob.obj.gsub!(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/, "#{Px[:po_bold_o]}\\1#{Px[:po_bold_c]}") @@ -947,7 +947,7 @@ GSUB end end file_pot.close - SiSU_Po4aUtils::Pot_number.new.reset + SiSU_Po4aUtils::PotNumber.new.reset po4a_git end def po4a_git diff --git a/lib/sisu/v3dv/po4a_set.rb b/lib/sisu/v3dv/po4a_set.rb index 35dd9d1b..e536a464 100644 --- a/lib/sisu/v3dv/po4a_set.rb +++ b/lib/sisu/v3dv/po4a_set.rb @@ -120,7 +120,7 @@ module SiSU_Po4aUtils trans=(pot.length == 2) ? pot[1] : '' po_str=<',@put).dark_grey_title_hi unless @opt.cmd =~/q/ @@ -124,9 +124,9 @@ module SiSU_Remote imagedir=base_uri + '/_sisu/image' #check on doc_skin_dir = /((?:https?|file):\/\/\S+?)\/[^\/]+?\.sst$/.match(url).captures.join + '/_sisu/skin/doc' downloaded_file=File.new("#{fnb}.-sst",'w+') - image_download_url=SiSU_Assemble::Remote_image.new.image(imagedir) + image_download_url=SiSU_Assemble::RemoteImage.new.image(imagedir) images=[] - skin=SiSU_Assemble::Remote_image.new.image(doc_skin_dir) + skin=SiSU_Assemble::RemoteImage.new.image(doc_skin_dir) f.collect.each do |r| # work area unless r =~/^%+\s/ skin << r.scan(@rgx_skin).uniq if r =~@rgx_skin @@ -139,7 +139,7 @@ module SiSU_Remote end if skin \ and skin.length > 0 - SiSU_Assemble::Remote_image.new.download_doc_skin(skin) + SiSU_Assemble::RemoteImage.new.download_doc_skin(skin) end if images \ and images.length > 1 @@ -150,8 +150,8 @@ module SiSU_Remote @msg,@msgs='downloading images:', [ images.join(',') ] @tell.call.warn unless @opt.cmd =~/q/ image_info=image_download_url + images - SiSU_Assemble::Remote_image.new.download_images(image_info) - #SiSU_Assemble::Remote_image.new.download_images(image_download_url,images) + SiSU_Assemble::RemoteImage.new.download_images(image_info) + #SiSU_Assemble::RemoteImage.new.download_images(image_download_url,images) @msg,@msgs='downloading done',nil @tell.call.warn unless @opt.cmd =~/q/ end @@ -166,7 +166,7 @@ module SiSU_Remote if get_p.length > 0 #% remote sisupod require 'net/http' for requested_pod in get_p - pod_info=Remote_download.new(requested_pod) + pod_info=RemoteDownload.new(requested_pod) Net::HTTP.start(pod_info.pod.site) do |http| resp=http.get("#{pod_info.pod.path}/#{pod_info.pod.name_source}") open(pod_info.pod.name,'wb') do |file| @@ -177,7 +177,7 @@ module SiSU_Remote end end end - class Remote_download + class RemoteDownload def initialize(requested_file) @requested_file=requested_file end diff --git a/lib/sisu/v3dv/rexml.rb b/lib/sisu/v3dv/rexml.rb index 01f9a1fd..d4692b76 100644 --- a/lib/sisu/v3dv/rexml.rb +++ b/lib/sisu/v3dv/rexml.rb @@ -68,8 +68,8 @@ module SiSU_Rexml require 'rexml/document' if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir'] def initialize(md,fno) @md,@fno=md,fno - @env=SiSU_Env::Info_env.new(@md.fns) - @prog=SiSU_Env::Info_program.new #(md.fns) #if md + @env=SiSU_Env::InfoEnv.new(@md.fns) + @prog=SiSU_Env::InfoProgram.new #(md.fns) #if md if File.file?(@fno) @fnap=@fno #index.xml causes problems with index.html in server config end @@ -102,7 +102,7 @@ module SiSU_Rexml SiSU_Screen::Ansi.new(@md.opt.cmd,'fuschia',"File Not Found #{xmlfile}",'requested XML processing skipped').colorize unless @md.opt.cmd =~/q/ exit end - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end diff --git a/lib/sisu/v3dv/screen_text_color.rb b/lib/sisu/v3dv/screen_text_color.rb index 8fc356ac..c3fd0b29 100644 --- a/lib/sisu/v3dv/screen_text_color.rb +++ b/lib/sisu/v3dv/screen_text_color.rb @@ -68,7 +68,7 @@ module SiSU_Screen def initialize(cmd,*txt) @cmd,@txt=cmd,txt @color_instruct=txt[0] - flag=SiSU_Env::Info_processing_flag.new + flag=SiSU_Env::InfoProcessingFlag.new if @cmd if flag.color #set default colors on or off -c acts as toggle against this default, if default is off -c turns on, if default is on -c turns off @use_color=if @cmd =~/c/; false diff --git a/lib/sisu/v3dv/share_src.rb b/lib/sisu/v3dv/share_src.rb index ac1d4374..93552b49 100644 --- a/lib/sisu/v3dv/share_src.rb +++ b/lib/sisu/v3dv/share_src.rb @@ -63,7 +63,7 @@ module SiSU_Markup class Source def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) md=SiSU_Param::Parameters.new(@opt).get @file=SiSU_Env::FileOp.new(md) stub=@opt.fnb.gsub(/~[a-z]+$/,'') diff --git a/lib/sisu/v3dv/share_src_kdissert.rb b/lib/sisu/v3dv/share_src_kdissert.rb index 8d49fe06..336d421c 100644 --- a/lib/sisu/v3dv/share_src_kdissert.rb +++ b/lib/sisu/v3dv/share_src_kdissert.rb @@ -65,7 +65,7 @@ module SiSU_KdiSource include FileUtils def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) @output_path="#{@env.path.output}/#{@opt.fnb}" end def read diff --git a/lib/sisu/v3dv/shared_html.rb b/lib/sisu/v3dv/shared_html.rb index a96577f0..0b17ba21 100644 --- a/lib/sisu/v3dv/shared_html.rb +++ b/lib/sisu/v3dv/shared_html.rb @@ -59,7 +59,7 @@ module SiSU_HTML_Shared require_relative 'defaults' # defaults.rb require_relative 'html_table' # html_table.rb - class Table_html < SiSU_HTML_Table::Table_html + class TableHTML < SiSU_HTML_Table::TableHTML end end __END__ diff --git a/lib/sisu/v3dv/shared_html_lite.rb b/lib/sisu/v3dv/shared_html_lite.rb index 87f51146..5fd0a408 100644 --- a/lib/sisu/v3dv/shared_html_lite.rb +++ b/lib/sisu/v3dv/shared_html_lite.rb @@ -80,13 +80,13 @@ module SiSU_FormatShared @tab="\t" @brace_url=SiSU_Viz::Skin.new.url_decoration @@tablehead,@@tablefoot=[],[] - @vz=SiSU_Env::Get_init.instance.skin - @env=SiSU_Env::Info_env.new(@md.fns) + @vz=SiSU_Env::GetInit.instance.skin + @env=SiSU_Env::InfoEnv.new(@md.fns) @base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html" end def urls(data) @words=[] - map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map + map_nametags=SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map data.each do |word| @words << if word=~/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/ if word =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/ @@ -292,7 +292,7 @@ GSUB @new_content.join end end - class CSS_Format_generic #does CSS_Format in one definition, needs to be told about attrib, despite brevity of generic, easier to see structure with CSS_Format + class CSS_FormatGeneric #does CSS_Format in one definition, needs to be told about attrib, despite brevity of generic, easier to see structure with CSS_Format def initialize(attrib='',txt='',id=nil,ocnd=nil,ocns=nil,lv='',hname=nil) @tab="\t" @attrib=attrib diff --git a/lib/sisu/v3dv/shared_markup_alt.rb b/lib/sisu/v3dv/shared_markup_alt.rb index 4390dca1..27092050 100644 --- a/lib/sisu/v3dv/shared_markup_alt.rb +++ b/lib/sisu/v3dv/shared_markup_alt.rb @@ -193,7 +193,7 @@ module SiSU_TextRepresentation @s end end - class Modified_text_plus_Hash_digest + class ModifiedTextPlusHashDigest def initialize(md,x) @md=md if x.class==String @@ -201,7 +201,7 @@ module SiSU_TextRepresentation else @t_o,@s=x,x.obj.dup end - @env ||=SiSU_Env::Info_env.new(@md.fns) + @env ||=SiSU_Env::InfoEnv.new(@md.fns) @sha_ =((@env.digest.type =='sha256') ? true : false) @sha_ ? (require 'digest/sha2') : (require 'digest/md5') end @@ -247,7 +247,7 @@ module SiSU_TextRepresentation SiSU_TextRepresentation::Alter.new(txt).semi_revert_markup end def images(imgs) - sys=SiSU_Env::System_call.new + sys=SiSU_Env::SystemCall.new line_image=[] img_dgst={} if imgs and imgs.length > 0 diff --git a/lib/sisu/v3dv/shared_metadata.rb b/lib/sisu/v3dv/shared_metadata.rb index 06d382c3..1f02ce1f 100644 --- a/lib/sisu/v3dv/shared_metadata.rb +++ b/lib/sisu/v3dv/shared_metadata.rb @@ -65,9 +65,9 @@ module Metadata end def metadata_base meta,tag=[],[] - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) base_html="#{dir.url.root}/#{@md.fnb}" - l=SiSU_Env::Standardise_language.new(@md.opt.lng).language + l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language language=l[:n] tr=SiSU_Translate::Source.new(@md,language) @attrib='md' @@ -974,7 +974,7 @@ WOK self end end - class TeX_metadata + class TeX_Metadata def initialize(md) @md=md @br="\\\\\n" @@ -985,19 +985,19 @@ WOK } end def spec_char(inf) - SiSU_TeX_Pdf::Special_characters.new(@md,inf).special_characters + SiSU_TeX_Pdf::SpecialCharacters.new(@md,inf).special_characters end def word_break_points(inf) - SiSU_TeX_Pdf::Special_characters.new(@md,inf).special_word_break_points + SiSU_TeX_Pdf::SpecialCharacters.new(@md,inf).special_word_break_points end def number_break_points(inf) - SiSU_TeX_Pdf::Special_characters.new(@md,inf).special_number_break_points + SiSU_TeX_Pdf::SpecialCharacters.new(@md,inf).special_number_break_points end def metadata_tex meta=[] - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) base_html="#{dir.url.root}/#{@md.fnb}" - l=SiSU_Env::Standardise_language.new(@md.opt.lng).language + l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language language=l[:n] tr=SiSU_Translate::Source.new(@md,language) tag="Document Manifest @" diff --git a/lib/sisu/v3dv/shared_txt.rb b/lib/sisu/v3dv/shared_txt.rb index 0ba3a322..c59e1866 100644 --- a/lib/sisu/v3dv/shared_txt.rb +++ b/lib/sisu/v3dv/shared_txt.rb @@ -124,7 +124,7 @@ module SiSU_TextUtils @arr end end - class Header_scan + class HeaderScan def initialize(md,para) @md,@p=md,para end diff --git a/lib/sisu/v3dv/shared_xhtml.rb b/lib/sisu/v3dv/shared_xhtml.rb index 9cd010af..f135aa6a 100644 --- a/lib/sisu/v3dv/shared_xhtml.rb +++ b/lib/sisu/v3dv/shared_xhtml.rb @@ -59,7 +59,7 @@ module SiSU_XHTML_Shared require_relative 'defaults' # defaults.rb require_relative 'xhtml_table' # xhtml_table.rb - class Table_xhtml < SiSU_XHTML_Table::Table_xhtml + class TableXHTML < SiSU_XHTML_Table::TableXHTML end end __END__ diff --git a/lib/sisu/v3dv/shared_xml.rb b/lib/sisu/v3dv/shared_xml.rb index 93848fd0..78611ccc 100644 --- a/lib/sisu/v3dv/shared_xml.rb +++ b/lib/sisu/v3dv/shared_xml.rb @@ -60,8 +60,8 @@ module SiSU_XML_Munge require_relative 'defaults' # defaults.rb def initialize(md) @md=md - @sys=SiSU_Env::System_call.new - @dir=SiSU_Env::Info_env.new(@md.fns) + @sys=SiSU_Env::SystemCall.new + @dir=SiSU_Env::InfoEnv.new(@md.fns) @brace_url=SiSU_Viz::Skin.new.url_decoration if @md.sem_tag @ab ||=semantic_tags.default @@ -642,7 +642,7 @@ module SiSU_XML_Tags #Format end content=meta_content_clean(@md.keywords) @keywords=%{ \n} if @md.keywords - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def meta_content_clean(content='') content diff --git a/lib/sisu/v3dv/sisupod_make.rb b/lib/sisu/v3dv/sisupod_make.rb index 7a3b4727..5fe93429 100644 --- a/lib/sisu/v3dv/sisupod_make.rb +++ b/lib/sisu/v3dv/sisupod_make.rb @@ -65,13 +65,13 @@ module SiSU_Doc def initialize(opt) @opt=opt m=/.+\/(?:src\/)?(\S+)/im - @date=SiSU_Env::Info_date.new.dt - @env=SiSU_Env::Info_env.new(@opt.fns) - @ver=SiSU_Env::Info_version.instance.get_version + @date=SiSU_Env::InfoDate.new.dt + @env=SiSU_Env::InfoEnv.new(@opt.fns) + @ver=SiSU_Env::InfoVersion.instance.get_version @ans=SiSU_Response::Response.new pod_path="#{@env.processing_path.processing}/sisupod" @v=(@opt.cmd =~/[VM]/) ? 'v' : '' - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @file=@particulars.file @local_path="#{@file.output_path.sisupod.dir}" @zipfile=(@opt.fns =~/\.ssm\.sst$/) \ @@ -132,7 +132,7 @@ module SiSU_Doc end end def directories - SiSU_Env::Info_env.new.sisupod_v3(@opt) + SiSU_Env::InfoEnv.new.sisupod_v3(@opt) end def select_skin(skin='') #skin loading logic here load "#{SiSU_lib}/defaults.rb" @@ -284,7 +284,7 @@ module SiSU_Doc def sisupod_xz FileUtils::mkdir_p(@file.output_path.sisupod.dir) unless FileTest.directory?(@file.output_path.sisupod.dir) tree=(@opt.cmd =~/[vVM]/ \ - && SiSU_Env::System_call.new.program_found?('tree')) \ + && SiSU_Env::SystemCall.new.program_found?('tree')) \ ? 'tree sisupod' : '' if FileTest.directory?(@env.processing_path.processing) diff --git a/lib/sisu/v3dv/sitemaps.rb b/lib/sisu/v3dv/sitemaps.rb index b3e9169d..cefdba8e 100644 --- a/lib/sisu/v3dv/sitemaps.rb +++ b/lib/sisu/v3dv/sitemaps.rb @@ -72,13 +72,13 @@ module SiSU_Sitemaps end def songsheet begin - @sys=SiSU_Env::System_call.new - fn_set_lang=SiSU_Env::Standardise_language.new(@opt.lng).language - @fn=SiSU_Env::Env_call.new(@opt.fns).lang(fn_set_lang[:c]) + @sys=SiSU_Env::SystemCall.new + fn_set_lang=SiSU_Env::StandardiseLanguage.new(@opt.lng).language + @fn=SiSU_Env::EnvCall.new(@opt.fns).lang(fn_set_lang[:c]) if @opt.cmd =~/Y/ @md=SiSU_Param::Parameters.new(@opt).get @trans=SiSU_XML_Munge::Trans.new(@md) #check @md is required - @env=SiSU_Env::Info_env.new(@md.fns) + @env=SiSU_Env::InfoEnv.new(@md.fns) # @file=SiSU_Env::FileOp.new(@md) @rdf=SiSU_XML_Tags::RDF.new(@md) @fnb_utf8_xml=@md.fnb.dup @@ -86,11 +86,11 @@ module SiSU_Sitemaps output_map(sitemap) elsif @opt.mod.inspect =~/--sitemaps/ @sitemap_idx_fn='sitemapindex.xml' - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new output_idx(sitemap_index) SiSU_Screen::Ansi.new(@opt.cmd,"sitemap index:","#{@env.path.output}/#{@sitemap_idx_fn}").result unless @opt.cmd =~/q/ end - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end diff --git a/lib/sisu/v3dv/sst_convert_markup.rb b/lib/sisu/v3dv/sst_convert_markup.rb index fb27f88b..29aca8dd 100644 --- a/lib/sisu/v3dv/sst_convert_markup.rb +++ b/lib/sisu/v3dv/sst_convert_markup.rb @@ -62,7 +62,7 @@ module SiSU_Modify require_relative 'sst_identify_markup' # sst_identify_markup.rb require_relative 'sst_from_xml' # sst_from_xml.rb require_relative 'response' # response.rb - class Convert_markup + class ConvertMarkup def initialize(opt) @opt=opt @description='This is a script that contains canned text conversions for reuse' @@ -231,7 +231,7 @@ WOK if i =~/(?:\.sst|\.ssm|\.ssi)$/ @new,@matched,@flag_start,@flag_end,@empty1,@empty2=true,false,false,false,false,false o="#{i}.bk" #o is for old - markup_version=SiSU_Markup::Markup_identify.new(@opt).markup_version? + markup_version=SiSU_Markup::MarkupIdentify.new(@opt).markup_version? if (@opt.mod.inspect=~/37/ and markup_version=~/0.38/) \ or (@opt.mod.inspect=~/current|38/ and markup_version=~/0.37/) puts "#{i} #{markup_version}" @@ -299,14 +299,14 @@ argv=$* @opt=SiSU_Commandline::Options.new(argv) case @opt.mod.inspect when /=kdi/ - SiSU_Modify::Convert_markup.new(@opt).conversion + SiSU_Modify::ConvertMarkup.new(@opt).conversion when /(?:36|37|38)?to-?(?:37|38)|--convert|--to|--from|default/ @opt.files.each do |fns| @opt.fns=fns - SiSU_Modify::Convert_markup.new(@opt).conversion + SiSU_Modify::ConvertMarkup.new(@opt).conversion end else @opt.mod='--help' - SiSU_Modify::Convert_markup.new(@opt).help + SiSU_Modify::ConvertMarkup.new(@opt).help end __END__ diff --git a/lib/sisu/v3dv/sst_do_inline_footnotes.rb b/lib/sisu/v3dv/sst_do_inline_footnotes.rb index 7a8e42bf..73b49087 100644 --- a/lib/sisu/v3dv/sst_do_inline_footnotes.rb +++ b/lib/sisu/v3dv/sst_do_inline_footnotes.rb @@ -84,9 +84,9 @@ module SiSU_ConvertFootnotes def initialize(opt) @opt=opt @@fns||@opt.fns - @my_make=SiSU_Env::Create_file.new(@opt.fns) - @fnm=SiSU_Env::Info_file.new(@opt.fns).marshal.dal_content - SiSU_Env::Create_system_link.new.images + @my_make=SiSU_Env::CreateFile.new(@opt.fns) + @fnm=SiSU_Env::InfoFile.new(@opt.fns).marshal.dal_content + SiSU_Env::CreateSystemLink.new.images end def read #creates dal begin @@ -94,7 +94,7 @@ module SiSU_ConvertFootnotes @@dal_array=[] @@fns=@opt.fns create_dal - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure Instantiate.new end @@ -109,7 +109,7 @@ module SiSU_ConvertFootnotes dal=if @@dal_array.empty?; read_fnm else @@dal_array.dup #check end - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure Instantiate.new end @@ -149,8 +149,8 @@ module SiSU_ConvertFootnotes class Output def initialize(md,data) @md,@data=md,data - @my_make=SiSU_Env::Create_file.new(@md.fns) - dir=SiSU_Env::Info_env.new(@md.fns) + @my_make=SiSU_Env::CreateFile.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) @hard="#{Dir.pwd}/#{@md.fns}.fn" end def hard_output @@ -167,9 +167,9 @@ module SiSU_ConvertFootnotes def initialize(md,data) @md,@data=md,data @@word_mode=[] - @env=SiSU_Env::Info_env.new(@md.fns) - @skin=SiSU_Env::Info_skin.new(@md) - l=SiSU_Env::Standardise_language.new(@md.opt.lng).language + @env=SiSU_Env::InfoEnv.new(@md.fns) + @skin=SiSU_Env::InfoSkin.new(@md) + l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language @language=l[:n] @translate=SiSU_Translate::Source.new(@md,@language) end @@ -184,7 +184,7 @@ module SiSU_ConvertFootnotes reset data=@data @metafile="#{@env.processing_path.dal}/#{@md.fns}.meta" - my_make_source_file=SiSU_Env::Create_file.new(@md.fns) + my_make_source_file=SiSU_Env::CreateFile.new(@md.fns) data=data.join.split("\n\n") data_new=[] data.each do |x| @@ -468,5 +468,5 @@ module SiSU_ConvertFootnotes end end __END__ -@particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) +@particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) dal_array=@particulars.dal_array # dal file drawn here diff --git a/lib/sisu/v3dv/sst_from_xml.rb b/lib/sisu/v3dv/sst_from_xml.rb index 068eb62e..59495e5a 100644 --- a/lib/sisu/v3dv/sst_from_xml.rb +++ b/lib/sisu/v3dv/sst_from_xml.rb @@ -65,7 +65,7 @@ module SiSU_sstFromXML def initialize(opt) @opt=opt @sisu,@sisu_base=[],[] - @ver=SiSU_Env::Info_version.instance.get_version + @ver=SiSU_Env::InfoVersion.instance.get_version end def tell(filename,type) SiSU_Screen::Ansi.new(@opt.cmd,"XML #{type} to SiSU sst","#{filename} --> #{filename}.sst").green_hi_blue diff --git a/lib/sisu/v3dv/sst_identify_markup.rb b/lib/sisu/v3dv/sst_identify_markup.rb index 2089a9a8..af30f19b 100644 --- a/lib/sisu/v3dv/sst_identify_markup.rb +++ b/lib/sisu/v3dv/sst_identify_markup.rb @@ -59,7 +59,7 @@ =end module SiSU_Markup - class Markup_inform + class MarkupInform attr_accessor :version def initialize(version,message,declared_markup='',declared_type='') @version,@message,@declared_markup,@declared_type=version,message,declared_markup,declared_type @@ -77,10 +77,10 @@ module SiSU_Markup @declared_type end def history - Markup_history.new(@version).query + MarkupHistory.new(@version).query end end - class Markup_identify + class MarkupIdentify def initialize(opt) @opt=opt @description='This is a script attempts to identify the version of markup used in SiSU (and provides information on changes in markup)' @@ -121,14 +121,14 @@ WOK if @flag_2_0 \ or y =~/^@make:|^@classify|^\s\s?:[a-z_-]+?:\s+\S/ version=2.0.to_f - markup=Markup_inform.new(version,'2.0' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'2.0' + oldlinks,@declared_markup,@declared_type) @flag_2_0=true break end unless @flag_38 if (y =~/^:?A~/ and f =~/(?:\.sst|\.ssm|\.ssi)/) version='0.38' - markup=Markup_inform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type) @flag_38=true end end @@ -136,14 +136,14 @@ WOK if @flag_1_0 \ or y =~/^=\{.+?\}\s*$/ version='0.69' - markup=Markup_inform.new(version,'0.69' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.69' + oldlinks,@declared_markup,@declared_type) @flag_1_0=true break end if @flag_66 \ or y =~/[a-z+][:;]\{.+?\}[:;][a-z+]/ version='0.66' - markup=Markup_inform.new(version,'0.66' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.66' + oldlinks,@declared_markup,@declared_type) @flag_66=true break end @@ -162,26 +162,26 @@ WOK if @flag_57 \ or (y =~/^:?A~\?? @title/ and f =~/(?:\.sst|\.ssm|\.ssi)/) version='0.57' - markup=Markup_inform.new(version,'0.57' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.57' + oldlinks,@declared_markup,@declared_type) @flag_57=true break end if @flag_38 \ or (y =~/^:?A~/ and f =~/(?:\.sst|\.ssm|\.ssi)/) version='0.38' - markup=Markup_inform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type) @flag_38=true break if i >= 200 if y =~ /(?:~{\*+|~\[\*|~\[\+)\s/ version='0.42' - markup=Markup_inform.new(version,'0.42' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.42' + oldlinks,@declared_markup,@declared_type) break end end if (y =~/^1~/ and f =~/(?:\.sst|\.ssm|\.ssi)/) \ and not @flag_38 version='0.37' - markup=Markup_inform.new(version,'0.37 is substantially 0.16 - 0.36 markup with new file-extension' + oldlinks,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.37 is substantially 0.16 - 0.36 markup with new file-extension' + oldlinks,@declared_markup,@declared_type) break end if y =~/^1~/ \ @@ -193,31 +193,31 @@ WOK " (change file extension from .#{t}#{n} to .ssm)" else " (change file extension from .#{t}#{n} to .sst)" end - markup=Markup_inform.new(version,'0.16 - 0.36' + instruct + links,@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.16 - 0.36' + instruct + links,@declared_markup,@declared_type) break end if y =~/^0\{~/ \ and not @flag_38 version='0.1' - markup=Markup_inform.new(version,'0.1 - 0.15',@declared_markup,@declared_type) + markup=MarkupInform.new(version,'0.1 - 0.15',@declared_markup,@declared_type) break end if y =~/^0\{{3}/ \ and not @flag_38 - markup=Markup_inform.new('circa. 1997','old, check date',@declared_markup,@declared_type) + markup=MarkupInform.new('circa. 1997','old, check date',@declared_markup,@declared_type) break end markup='Not a recognised file type ' end end markup - else Markup_history.new(@opt).help_query + else MarkupHistory.new(@opt).help_query end end def determine_markup_version if @opt.fns.nil? \ or @opt.fns.empty? - Markup_history.new(@opt).help_identify + MarkupHistory.new(@opt).help_identify end if File.exist?(@opt.fns) if @opt.fns =~/\.(?:sst|ssm|ssi|s[123i]|r[123])/ @@ -251,7 +251,7 @@ WOK end end end - class Markup_history + class MarkupHistory def initialize(opt) @opt=opt end @@ -470,5 +470,5 @@ end puts "SiSU files:" puts f f.each do |x| - SiSU_Markup::Markup_identify.new(x).markup_version? + SiSU_Markup::MarkupIdentify.new(x).markup_version? end diff --git a/lib/sisu/v3dv/sst_to_s_xml_sax.rb b/lib/sisu/v3dv/sst_to_s_xml_sax.rb index 0fc34be7..c96eabfe 100644 --- a/lib/sisu/v3dv/sst_to_s_xml_sax.rb +++ b/lib/sisu/v3dv/sst_to_s_xml_sax.rb @@ -79,7 +79,7 @@ module SiSU_SimpleXML_ModelSax @@fns=nil def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_env_md(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_env_md(opt) end def read begin @@ -101,7 +101,7 @@ module SiSU_SimpleXML_ModelSax else @@fns_array.dup #check end SiSU_SimpleXML_ModelSax::Convert::Songsheet.new(@fns_array,@particulars).songsheet - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure #file closed in songsheet end end @@ -122,7 +122,7 @@ module SiSU_SimpleXML_ModelSax SiSU_SimpleXML_ModelSax::Convert::Scroll.new(@data,@particulars).songsheet SiSU_SimpleXML_ModelSax::Convert::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@md.fn[:sxs]).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -134,13 +134,13 @@ module SiSU_SimpleXML_ModelSax @@xml={ body: [], open: [], close: [], head: [] } def initialize(data='',particulars='') @data,@env,@md=data,particulars.env,particulars.md - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @regx=/^(?:#{Mx[:mk_o]}:p[bn]#{Mx[:mk_c]}\s*)?(?:#{Mx[:lv_o]}[1-9]:(\S*)#{Mx[:lv_c]})?(.+)/ @tab="\t" if @md @trans=SiSU_XML_Munge::Trans.new(@md) end - @sys=SiSU_Env::System_call.new + @sys=SiSU_Env::SystemCall.new end def songsheet pre @@ -262,7 +262,7 @@ WOK end def markup data=[] - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) xml_sc(@md) @endnotes,@level,@cont,@copen,@xml_contents_close=[],[],[],[],[] @rcdc=false @@ -284,7 +284,7 @@ WOK @trans.char_enc.utf8(para) if @sys.locale =~/utf-?8/i #% utf8 para.gsub!(/^@(\S+?):/,"#{Mx[:lv_o]}@\\1#{Mx[:lv_c]}") if para =~/\A#{Mx[:lv_o]}@(\S+?)#{Mx[:lv_c]}\s*(.+?)\Z/m # for headers - d_meta=SiSU_TextUtils::Header_scan.new(@md,para).meta + d_meta=SiSU_TextUtils::HeaderScan.new(@md,para).meta if d_meta; xml_head(d_meta) end end @@ -294,9 +294,9 @@ WOK @rcdc=true end if para !~/(^@\S+?:|^\s*$||)/ - @sto=SiSU_text_parts::Split_text_object.new(@md,para).lev_segname_para + @sto=SiSU_text_parts::SplitTextObject.new(@md,para).lev_segname_para unless @rcdc - format_scroll=SiSU_XML_Format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ + format_scroll=SiSU_XML_Format::FormatScroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_clean(para) @@ -310,7 +310,7 @@ WOK xml_clean(para) xml_structure(para,$1,$2) para=@sto.lev_para_ocn.heading_body3 - when /^(4):(\S*)/ # work on see Split_text_object + when /^(4):(\S*)/ # work on see SplitTextObject xml_clean(para) xml_structure(para,$1,$2) para=@sto.lev_para_ocn.heading_body4 @@ -332,7 +332,7 @@ WOK para.gsub!(/>/,'>') para=code_structure(para) elsif para =~/.*$/ para=case para when /<:i1>/ - format_text=Format_text_object.new(para,'') + format_text=FormatTextObject.new(para,'') format_text.scr_inden_ocn_e_no_paranum when /<:i2>/ - format_text=Format_text_object.new(para,'') + format_text=FormatTextObject.new(para,'') format_text.scr_inden_ocn_e_no_paranum end end if para =~/<:center>/ one,two=/(.*)<:center>(.*)/.match(para)[1,2] - format_text=Format_text_object.new(one,two) + format_text=FormatTextObject.new(one,two) para=format_text.center end end @@ -375,9 +375,9 @@ WOK end def pre rdf=SiSU_XML_Tags::RDF.new(@md) - dir=SiSU_Env::Info_env.new + dir=SiSU_Env::InfoEnv.new @@xml[:head],@@xml[:body]=[],[] - css=SiSU_Env::CSS_select.new(@md).xml_sax + css=SiSU_Env::CSS_Select.new(@md).xml_sax encoding=if @sys.locale =~/utf-?8/i; '' else '' end @@ -432,7 +432,7 @@ WOK class Tidy def initialize(md,dir) @md,@env=md,dir - @prog=SiSU_Env::Info_program.new + @prog=SiSU_Env::InfoProgram.new end def xml if @prog.tidy !=false #note values can be other than true @@ -441,7 +441,7 @@ WOK SiSU_Screen::Ansi.new(@md.opt.cmd,'','','check document structure') tell.grey_open unless @md.opt.cmd =~/q/ tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy =SiSU_Env::System_call.new("#{Dir.pwd}/#{@md.fn[:sxs]}",tidyfile) + tidy =SiSU_Env::SystemCall.new("#{Dir.pwd}/#{@md.fn[:sxs]}",tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end 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 } 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) diff --git a/lib/sisu/v3dv/termsheet.rb b/lib/sisu/v3dv/termsheet.rb index aca9e00e..3ac2515b 100644 --- a/lib/sisu/v3dv/termsheet.rb +++ b/lib/sisu/v3dv/termsheet.rb @@ -70,7 +70,7 @@ def talent(termsheet,flag) no_ocn='0' if flag =~/0/ #flag to request switch off of text object numbering @@info=nil @@info=termsheet.gsub(/(.+?)\.termsheet\.rb/,'../facility_data/\1.html') - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new @dir_fd="#{@env.path.output}/facility_data" FileUtils::mkdir_p(@dir_fd) unless FileTest.directory?(@dir_fd)==true html_output=[] @@ -130,7 +130,7 @@ if @proc =~ /^-?[wft]/ talent(termsheet,@proc) end end -@env=SiSU_Env::Info_env.new +@env=SiSU_Env::InfoEnv.new @dir_fd="#{@env.path.output}/facility_data" @url="#{@env.url.webserv}/facility_data" @@report << %{\n#{@@cX.grey}See#{@@cX.off}: #{@@cX.blue}#{@dir_fd}/all.txt\t#{@dir_fd}/toc.html\t#{@dir_fd}/#{@@cX.off}\n\n#{@@cX.grey}See#{@@cX.off}: #{@@cX.blue}#{@url}/all.txt\t#{@url}/toc.html\t#{@url}/#{@@cX.off}\n\n} diff --git a/lib/sisu/v3dv/texinfo.rb b/lib/sisu/v3dv/texinfo.rb index 9961171e..45af0550 100644 --- a/lib/sisu/v3dv/texinfo.rb +++ b/lib/sisu/v3dv/texinfo.rb @@ -78,8 +78,8 @@ module SiSU_TexInfo def initialize(opt) @opt=opt @md=SiSU_Param::Parameters.new(@opt).get - @env=SiSU_Env::Info_env.new(@opt.fns) - @vz=SiSU_Env::Get_init.instance.skin + @env=SiSU_Env::InfoEnv.new(@opt.fns) + @vz=SiSU_Env::GetInit.instance.skin end def directories begin @@ -107,7 +107,7 @@ module SiSU_TexInfo tell @md=SiSU_Param::Parameters.new(@opt).get directories - @marshalfile=SiSU_Env::Info_file.new(@opt.fns).marshal.dal_content + @marshalfile=SiSU_Env::InfoFile.new(@opt.fns).marshal.dal_content if FileTest.file?(@marshalfile)==true File.open(@marshalfile) { |f| @@tuned_file=Marshal.load(f)} #tell.meta_verse_skipped if @opt.cmd =~/[vVM]/ @@ -116,14 +116,14 @@ module SiSU_TexInfo SiSU_Metaverse.songsheet(tex_array) end tex_array=@@tuned_file - Texinfo_make.new(@md,tex_array).songsheet + TeXinfoMake.new(@md,tex_array).songsheet tex_array='' rescue; STDERR.puts SiSU_Screen::Ansi.new(@opt.cmd,$!,$@).rescue ensure end end end - class Texinfo_make + class TeXinfoMake include SiSU_Param include SiSU_TexInfoFormat @@tex_1='(?:.+?)+~' #?? debug @@ -131,8 +131,8 @@ module SiSU_TexInfo @@tex_pattern_margin_number="\\\\marginpar.+?\s+" def initialize(md,data) @md,@data=md,data - @env=SiSU_Env::Info_env.new(@md.fns) - @vz=SiSU_Env::Get_init.instance.skin + @env=SiSU_Env::InfoEnv.new(@md.fns) + @vz=SiSU_Env::GetInit.instance.skin @f=SiSU_Env::FileOp.new(@md) end def songsheet @@ -301,14 +301,14 @@ module SiSU_TexInfo n_submenu+=1 @@do_subsubmenu=1 if @@do_submenu==1 - menu=SiSU_TexInfoFormat::Texinfo_txt.new(@md,dob,@submenu[n_menu]) + menu=SiSU_TexInfoFormat::TeXinfoTxt.new(@md,dob,@submenu[n_menu]) dob.obj="#{menu.submenu}#{mono.level5.obj}" @@do_submenu=0 else mono.level5 end when 6; if @@do_submenu==1 - menu=SiSU_TexInfoFormat::Texinfo_txt.new(@md,dob,@submenu[n_menu]) + menu=SiSU_TexInfoFormat::TeXinfoTxt.new(@md,dob,@submenu[n_menu]) dob.obj="#{menu.subsubmenu}#{mono.level6.obj}" @@do_subsubmenu=0 else @@ -378,9 +378,9 @@ module SiSU_TexInfo pwd=Dir.pwd case sfx when /(?:-|ssm\.)?sst$/ - @env=SiSU_Env::Info_env.new(@md.fns,@md.opt.cmd) + @env=SiSU_Env::InfoEnv.new(@md.fns,@md.opt.cmd) Dir.chdir(@env.processing_path.texi) - texinfo=SiSU_Env::System_call.new("#{fnb}.texinfo") + texinfo=SiSU_Env::SystemCall.new("#{fnb}.texinfo") texinfo.makeinfo end Dir.chdir(pwd) diff --git a/lib/sisu/v3dv/texinfo_format.rb b/lib/sisu/v3dv/texinfo_format.rb index 1f0c94f9..fc7ffde2 100644 --- a/lib/sisu/v3dv/texinfo_format.rb +++ b/lib/sisu/v3dv/texinfo_format.rb @@ -74,7 +74,7 @@ module SiSU_TexInfoFormat p dob.class p caller end - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def head t=Time.now @@ -95,7 +95,7 @@ module SiSU_TexInfoFormat author=@md.author if @md.author author ||='' author.gsub!(/[\*]/,'') #if author - v=SiSU_Env::Info_version.instance.get_version + v=SiSU_Env::InfoVersion.instance.get_version head =</i, #watch "\\includegraphics*[width=11pt]{#{dir.path.image_source_include}/c_\\1.png}") end def image - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) width="100" width=@dob[/<:image.+?width=``(\d+)''.+?>/im,1] width=width.to_i*0.4 @@ -545,7 +545,7 @@ WOK caption="{\\\\\\\ \n\\begin{scriptsize}#{c}\\end{scriptsize}&}" if c end if image - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) @dob.obj.gsub!(/#{Mx[:lnk_o]}\S+\.(png|jpg|gif).+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/, # fragile match operator\\ fragile ! "\n\\href{#{url}}{\\includegraphics*[width=#{width}pt]{#{dir.path.image_source_include}/#{image}}}#{caption}") else @@ -554,7 +554,7 @@ WOK end end end - class Texinfo_txt + class TeXinfoTxt def initialize(md,dob,txt) @md,@dob,@txt=md,dob,txt end diff --git a/lib/sisu/v3dv/texpdf.rb b/lib/sisu/v3dv/texpdf.rb index aae3b1d5..f4a18f0d 100644 --- a/lib/sisu/v3dv/texpdf.rb +++ b/lib/sisu/v3dv/texpdf.rb @@ -72,7 +72,7 @@ module SiSU_TeX @@tex_debug_counter=@@table_pagebreak_counter=@@tex_footnote_call_counter=@@tex_table_flag=@@tex_counter=@@tex_column=@@tex_columns=@@tex_columns=@@counting=0 @@tex_pattern_margin_number=/\\\\begin\\\{tiny\\\}\\\\hspace\\\{0mm\\\}\\\\end\\\{tiny\\\}\\\{\\\\marginpar.+?\s+/ @@n=@@tableheader=@@rights=nil - @@date ||=SiSU_Env::Info_date.new + @@date ||=SiSU_Env::InfoDate.new class Source require 'pstore' require_relative 'sysenv' # sysenv.rb @@ -83,9 +83,9 @@ module SiSU_TeX include SiSU_TeX def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @md=@particulars.md - @env=SiSU_Env::Info_env.new(@md.fns) #@env=@particulars.env + @env=SiSU_Env::InfoEnv.new(@md.fns) #@env=@particulars.env end def directories begin @@ -94,7 +94,7 @@ module SiSU_TeX SiSU_Env::FileOp.new(@md).mkdir Dir.mkdir(@env.processing_path.tex) unless FileTest.directory?(@env.processing_path.tex) end - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -114,14 +114,14 @@ module SiSU_TeX $flag=@md.opt.cmd #introduced to pass 0 for no object citation numbers... to texpdf_format directories #% needed needs to be reprogrammed !!! - SiSU_Env::Info_skin.new(@md).select + SiSU_Env::InfoSkin.new(@md).select dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here - SiSU_TeX::Source::LaTeX_create.new(@particulars).songsheet + SiSU_TeX::Source::LaTeXcreate.new(@particulars).songsheet dal_array='' pwd=Dir.pwd - SiSU_TeX::Source::LaTeX_to_pdf.new(@md,@particulars.env).latexrun_selective + SiSU_TeX::Source::LaTeXtoPdf.new(@md,@particulars.env).latexrun_selective Dir.chdir(pwd) - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure unless @opt.cmd =~/[MV]/ #check maintenance flag texfiles=Dir["#{@env.processing_path.tex}/#{@opt.fns}*"] @@ -137,14 +137,14 @@ module SiSU_TeX @@tex_debug_counter=@@table_pagebreak_counter=@@tex_footnote_call_counter=@@tex_table_flag=@@tex_counter=@@tex_column=@@tex_columns=@@tex_columns=@@counting=0 @@tex_col_w=[] @@n=@@tableheader=@@rights=nil - @@date=SiSU_Env::Info_date.new + @@date=SiSU_Env::InfoDate.new @@flag={} $flag=1 #remove at some stage SiSU_Env::Clear.new(@opt.cmd,@opt.fns).param_instantiate end end private - class LaTeX_to_pdf + class LaTeXtoPdf @@n_lpdf||=0 #change def initialize(md,env) @md,@env=md,env @@ -155,7 +155,7 @@ module SiSU_TeX @@n_lpdf=@@n_lpdf+1 SiSU_Screen::Ansi.new(@md.opt.cmd,"#{papersize} portrait ->").dark_grey_title_hi if @md.opt.cmd =~/[MVv]/ tex_fn_base=@texfilename.gsub(/\.tex$/,'') - cmd=SiSU_Env::System_call.new("#{tex_fn_base}.tex",'',@md.opt.cmd) + cmd=SiSU_Env::SystemCall.new("#{tex_fn_base}.tex",'',@md.opt.cmd) tell=SiSU_Screen::Ansi.new(@md.opt.cmd) tell.grey_open if @md.opt.cmd =~/[MVv]/ if "#{tex_fn_base}" =~/\w+/ \ @@ -164,7 +164,7 @@ module SiSU_TeX end tell.p_off if @md.opt.cmd =~/[MVv]/ SiSU_Screen::Ansi.new(@md.opt.cmd,"#{papersize} landscape ->").dark_grey_title_hi if @md.opt.cmd =~/[MVv]/ - cmd=SiSU_Env::System_call.new("#{tex_fn_base}.landscape.tex",'',@md.opt.cmd) + cmd=SiSU_Env::SystemCall.new("#{tex_fn_base}.landscape.tex",'',@md.opt.cmd) tell.grey_open if @md.opt.cmd =~/[MVv]/ if "#{tex_fn_base}" =~/\w+/ \ and "#{papersize}" =~/\w+/ @@ -261,11 +261,11 @@ module SiSU_TeX end lst=Dir["*.{aux,log,out}"] lst.each {|file| File.unlink(file)} if lst - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error end end end - class LaTeX_create + class LaTeXcreate @@tex_head={ 'a4'=> { p: nil, l: nil }, 'a5'=> { p: nil, l: nil }, @@ -278,15 +278,15 @@ module SiSU_TeX def initialize(particulars) @particulars=particulars @md=@particulars.md - @env=SiSU_Env::Info_env.new(@md.fns) #@env=@particulars.env + @env=SiSU_Env::InfoEnv.new(@md.fns) #@env=@particulars.env @data=@particulars.dal_array # dal file drawn here @st={ tex: {} } - @tex_ml=SiSU_TeX_Pdf::Use_TeX.new(@md) - @vz=SiSU_Env::Get_init.instance.skin - @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern + @tex_ml=SiSU_TeX_Pdf::UseTeX.new(@md) + @vz=SiSU_Env::GetInit.instance.skin + @dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern @brace_url=SiSU_Viz::Skin.new.url_decoration - vz=SiSU_Env::Get_init.instance.skin - l=SiSU_Env::Standardise_language.new(@md.opt.lng).language + vz=SiSU_Env::GetInit.instance.skin + l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language @language=l[:n] @translate=SiSU_Translate::Source.new(@md,@language) @skin_no_ocn=if defined? vz.ocn_display_off \ @@ -305,7 +305,7 @@ module SiSU_TeX if defined? @md.rights.all \ and not @md.rights.all.empty? rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,rght.copyright.all) + sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,rght.copyright.all) copymark=@md.author_copymark \ ? '{\begin{small}\copyright\end{small}} ' : '' @@ -315,7 +315,7 @@ module SiSU_TeX end if defined? @md.notes.prefix_b \ and not @md.notes.prefix_b.empty? - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,@md.notes.prefix_b) + sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.notes.prefix_b) prefix_b=sp_char.special_characters_safe @@prefix_b="\n #{Tex[:backslash]*2}[3]\\ \\linebreak \\ #{prefix_b}\n" unless @@prefix_b end @@ -333,7 +333,7 @@ module SiSU_TeX data=number_paras(data) data=markup(data) output(data) - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -348,15 +348,15 @@ module SiSU_TeX if dob.is=='para' \ or dob.is=='heading' dob.tmp.gsub!(/#{Mx[:mk_o]}:name#\S+?#{Mx[:mk_c]}/,'') - dob.tmp=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp).special_characters + dob.tmp=SiSU_TeX_Pdf::SpecialCharacters.new(@md,dob.tmp).special_characters if dob.tmp =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/ - dob.tmp=SiSU_TeX_Pdf::Format_text_object.new(@md,dob.tmp).url_str_internal(dob.tmp) + dob.tmp=SiSU_TeX_Pdf::FormatTextObject.new(@md,dob.tmp).url_str_internal(dob.tmp) end elsif dob.is =='code' dob.tmp=if @codeblock_box=='listings' dob.tmp else - SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp).special_characters_code + SiSU_TeX_Pdf::SpecialCharacters.new(@md,dob.tmp).special_characters_code end elsif dob.is =='break' if dob.obj==Mx[:br_page]; dob.tmp='\newpage' @@ -387,9 +387,9 @@ module SiSU_TeX @md.papersize_array.each do |ps| @@tableheader={ ps => { p: 0, l: 0 } } dob.tmp={ tmp: dob.tmp, paper_size: ps } - format_l=SiSU_TeX_Pdf::Format_text_object.new(md,dob) + format_l=SiSU_TeX_Pdf::FormatTextObject.new(md,dob) dob.tmp={ tmp: dob.tmp, paper_size: ps } - format_p=SiSU_TeX_Pdf::Format_text_object.new(md,dob) + format_p=SiSU_TeX_Pdf::FormatTextObject.new(md,dob) @block[ps]={ l: format_l.longtable_landscape, p: format_p.longtable_portrait @@ -414,7 +414,7 @@ module SiSU_TeX dob end def box_boites(dob,ocn) - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp,dob.is) + sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,dob.tmp,dob.is) dob.tmp=sp_char.special_characters_safe dob.tmp.gsub!(/(#{Mx[:nbsp]})/m,'{\color{mywhite}\1}') #dob.tmp.gsub!(/#{Mx[:nbsp]}/m,'{~}') # dob.tmp.gsub!(/#{Mx[:nbsp]}\s*/m,'{~}') @@ -424,7 +424,7 @@ module SiSU_TeX dob.tmp.gsub!(/#{Mx[:br_nl]}{2}/,'\newline \\\\\\ ') dob.tmp.gsub!(/#{Mx[:br_nl]}/,' \\\\\\ ') dob.tmp.gsub!(/\n\n\n/m," \\newline\n\n") - ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob) + ocn=SiSU_TeX_Pdf::FormatTextObject.new(@md).ocn_display(dob) dob.tmp = ocn \ + @tex_ml.paraskip_small \ + '\begin{Codeblock}' \ @@ -437,14 +437,14 @@ module SiSU_TeX dob end def box_listings(dob,ocn) - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp,dob.is) + sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,dob.tmp,dob.is) dob.tmp=sp_char.characters_code_listings dob.tmp.gsub!(/^\s+/m,'') #bug, fix earlier, should be made unecessary dob.tmp.gsub!(/#{Mx[:nbsp]}/m,' ') dob.tmp.gsub!(/#{Mx[:vline]}/m,'|') dob.tmp.gsub!(/#{Mx[:br_nl]}(?:\s?\n)?/m,"\n") dob.tmp.gsub!(/\n\n\n/m," \n\n") - ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob) + ocn=SiSU_TeX_Pdf::FormatTextObject.new(@md).ocn_display(dob) dob.tmp = ocn \ + @tex_ml.paraskip_small \ + '\begin{Codeblock}' \ @@ -469,7 +469,7 @@ module SiSU_TeX dob.tmp.gsub!(/#{Mx[:nbsp]}/m,'{~}') dob.tmp.gsub!(/#{Mx[:gl_bullet]}/m,'$\txtbullet$\hspace{\enspace}') #Bullet environment not used for grouped text, ∴ no hanging indent here dob.tmp.gsub!(/#{Mx[:br_nl]}+/m,"\n\n") #match not ideal, but currently not inserting extra newlines anyway - ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob) + ocn=SiSU_TeX_Pdf::FormatTextObject.new(@md).ocn_display(dob) dob.tmp=if dob.is=='group' \ or dob.is=='block' \ or dob.is=='alt' @@ -509,7 +509,7 @@ module SiSU_TeX dob=enclose(dob) unless dob.tmp =~/^$/ dob else - tst=SiSU_TeX_Pdf::Format_text_object.new(@md,dob) + tst=SiSU_TeX_Pdf::FormatTextObject.new(@md,dob) case dob.is when 'heading' case dob.ln @@ -529,11 +529,11 @@ module SiSU_TeX h=tst.heading_major heading="\\clearpage\n" + h.tmp idx_arr=[] - idx=SiSU_Particulars::Combined_singleton.instance.get_idx_tex(@md.opt).tex_idx + idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_tex(@md.opt).tex_idx idx.each do |x| x=if x.class==String - x=SiSU_TeX_Pdf::Special_characters.new(@md,x).special_characters - x=SiSU_TeX_Pdf::Format_text_object.new(@md,x).url_str_internal(x,true) + x=SiSU_TeX_Pdf::SpecialCharacters.new(@md,x).special_characters + x=SiSU_TeX_Pdf::FormatTextObject.new(@md,x).url_str_internal(x,true) else x=nil end idx_arr << x.sub(/,$/,'') if x.class==String @@ -551,7 +551,7 @@ module SiSU_TeX elsif dob.ln==4 \ and dob.obj=~/Metadata\b/ h=tst.level4 - metadata=Metadata::TeX_metadata.new(@md).metadata_tex + metadata=Metadata::TeX_Metadata.new(@md).metadata_tex dob.tmp=h.tmp + ' ' + '\begin{scriptsize}' + metadata.join(br) + '\end{scriptsize}' else dob.tmp='' # dob.tmp={ l: '', p: '' } end @@ -583,20 +583,20 @@ module SiSU_TeX end if dob.tmp =~/(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image\b)/m \ && dob.is !='code' - dob=SiSU_TeX_Pdf::Bare_urls.new(@md,dob).bare_urls - tst=SiSU_TeX_Pdf::Format_text_object.new(@md,dob) + dob=SiSU_TeX_Pdf::BareUrls.new(@md,dob).bare_urls + tst=SiSU_TeX_Pdf::FormatTextObject.new(@md,dob) dob=tst.urls_txt_and_images dob elsif dob.tmp =~/https?:\/\/\S+\b/m \ && dob.is =='code' \ && @codeblock_box !='listings' - dob=SiSU_TeX_Pdf::Bare_urls.new(@md,dob).bare_urls_in_code + dob=SiSU_TeX_Pdf::BareUrls.new(@md,dob).bare_urls_in_code dob end if dob.class !=Hash \ && dob.tmp =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}image\b/ \ && dob.is !='code' - tst=SiSU_TeX_Pdf::Format_text_object.new(@md,dob) + tst=SiSU_TeX_Pdf::FormatTextObject.new(@md,dob) end dob end @@ -666,9 +666,9 @@ WOK title=@md.title.full.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}|#{Mx[:br_paragraph]}|\\\\/,' - ') #no line splitting in heading neither html nor latex @md.papersize_array.each do |ps| txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'portrait' } - orient_portrait=SiSU_TeX_Pdf::Format_head.new(@md,txt_obj) + orient_portrait=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) txt_obj={ txt: "#{home}: - #{title}", paper_size: ps, orientation: 'landscape' } - orient_landscape=SiSU_TeX_Pdf::Format_head.new(@md,txt_obj) + orient_landscape=SiSU_TeX_Pdf::FormatHead.new(@md,txt_obj) @@tex_head[ps][:p]=orient_portrait.document_head_with_orientation(@codeblock_box) @@tex_head[ps][:l]=orient_landscape.document_head_with_orientation(@codeblock_box) end @@ -709,13 +709,13 @@ WOK @copymark='' #check and remove as now is superflous x={} txt_obj={ title: @md.title.full } - x[:l]=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).title_landscape - x[:p]=SiSU_TeX_Pdf::Format_text_object.new(@md,txt_obj).title_portrait + x[:l]=SiSU_TeX_Pdf::FormatTextObject.new(@md,txt_obj).title_landscape + x[:p]=SiSU_TeX_Pdf::FormatTextObject.new(@md,txt_obj).title_portrait @tex_file << x x=nil if defined? @md.creator.author \ and @md.creator.author - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,@md.creator.author) + sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.creator.author) author=sp_char.special_characters @tex_file << if @md.author_home < { p: 0, l: 0 }, @@ -91,7 +91,7 @@ module SiSU_TeX_Pdf 'letter' => { p: 0, l: 0 }, 'legal' => { p: 0, l: 0 } } - @@sys=SiSU_Env::System_call.new + @@sys=SiSU_Env::SystemCall.new def initialize(md,dob=nil) @md,@dob=md,dob if defined? @md.image \ @@ -100,10 +100,10 @@ module SiSU_TeX_Pdf else @center_begin,@center_end='','' end @start_table='' - @tx=SiSU_Env::Get_init.instance.tex + @tx=SiSU_Env::GetInit.instance.tex @brace_rel=SiSU_Viz::Skin.new.rel_decoration - @env ||=SiSU_Env::Info_env.new(@md.fns) - @tex2pdf=@@tex3pdf ||=SiSU_Env::System_call.new.tex2pdf_engine + @env ||=SiSU_Env::InfoEnv.new(@md.fns) + @tex2pdf=@@tex3pdf ||=SiSU_Env::SystemCall.new.tex2pdf_engine end def ocn_display(dob) "\\begin{tiny}\\hspace{0mm}\\end{tiny}{\\marginpar{\\begin{tiny}\\hspace{0mm}\\hypertarget{#{dob.ocn}}{#{dob.ocn}}\\end{tiny}}}" #ocn object citation numbering @@ -462,7 +462,7 @@ module SiSU_TeX_Pdf blt end def symbol_graphic - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) image='c_' + /<:=\s*(\S+?)\s*>/m.match(@txt).captures.join + '.png' #watch if FileTest.file?("#{dir.path.image_source_include}/#{image}") @txt.gsub!(/<:=\s*(\S+?)\s*>/, @@ -473,7 +473,7 @@ module SiSU_TeX_Pdf end end def image - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) image,m=/#{Mx[:lnk_o]}\s*(\S+)\s+.+?width=``(\d+)''.+?#{Mx[:lnk_c]}/m.match(@txt).captures width=m[1] || '100' width=width.to_i*0.4 @@ -496,7 +496,7 @@ module SiSU_TeX_Pdf end end def png(ps='') #fc missing image check - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) # messy clean up z=@txt[/#{Mx[:lnk_o]}(\S.+?)#{Mx[:lnk_c]}(?:image|png)/,1].strip if @txt =~ /#{Mx[:lnk_o]}\S.+?#{Mx[:lnk_c]}(?:image|png)/ # match operator for z \\ fragile ! if z #debug 2004w14 @@ -534,7 +534,7 @@ module SiSU_TeX_Pdf end end def url_str_internal(str,idx=nil) - map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags + map_nametags=SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map #p map_nametags rgx_url_generic=/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/m rgx_url_relative=/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}:\S+?#{Mx[:rel_c]}/m rgx_url_internal=/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}#?\S+?#{Mx[:rel_c]}/m @@ -616,7 +616,7 @@ module SiSU_TeX_Pdf end def urls_txt_and_images dob=@dob - dir=SiSU_Env::Info_env.new(@md.fns) + dir=SiSU_Env::InfoEnv.new(@md.fns) @dm={ 'a4'=> @tx.a4.landscape.img_px, 'letter'=> @tx.letter.landscape.img_px, @@ -737,7 +737,7 @@ module SiSU_TeX_Pdf dob end def title - title=SiSU_TeX_Pdf::Special_characters.new(@md,@md.title.full).special_characters_safe + title=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.title.full).special_characters_safe "\n\\title{#{title}}" end def title_landscape @@ -747,11 +747,11 @@ module SiSU_TeX_Pdf title end end - class Format_head + class FormatHead require_relative 'prog_text_translation' # prog_text_translation.rb def initialize(md,t_o) @md,@t_o=md,t_o - @env=SiSU_Env::Info_env.new(@md.fns) + @env=SiSU_Env::InfoEnv.new(@md.fns) if t_o.class==Hash @txt =t_o[:txt] || nil @subtitle=t_o[:subtitle] || nil @@ -762,24 +762,24 @@ module SiSU_TeX_Pdf p t_o.class p caller end - @tx=SiSU_Env::Get_init.instance.tex + @tx=SiSU_Env::GetInit.instance.tex @brace_url=SiSU_Viz::Skin.new.url_decoration - @tex2pdf=@@tex3pdf ||=SiSU_Env::System_call.new.tex2pdf_engine + @tex2pdf=@@tex3pdf ||=SiSU_Env::SystemCall.new.tex2pdf_engine @ps=@txt if @txt=~/(?:a4|letter|legal|book|a5|b5)/i @lang ||=SiSU_i18n::Languages.new #.list[@md.opt.lng][:xlp] @author=if defined? @md.creator.author \ and @md.creator.author=~/\S+/ - SiSU_TeX_Pdf::Special_characters.new(@md,@md.creator.author).special_characters_safe + SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.creator.author).special_characters_safe else '' end @subject=if defined? @md.classify.subject \ and @md.classify.subject=~/\S+/ - SiSU_TeX_Pdf::Special_characters.new(@md,@md.classify.subject).special_characters_safe + SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.classify.subject).special_characters_safe else '' end @keywords=if defined? @md.classify.keywords \ and @md.classify.keywords=~/\S+/ - SiSU_TeX_Pdf::Special_characters.new(@md,@md.classify.keywords).special_characters_safe + SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.classify.keywords).special_characters_safe else '' end end @@ -1171,11 +1171,11 @@ WOK def a4generic end end - class Special_characters + class SpecialCharacters def initialize(md,str,is='') @md,@txt,@is=md,str,is @brace_url=SiSU_Viz::Skin.new.url_decoration - @tex2pdf=@@tex3pdf ||=SiSU_Env::System_call.new.tex2pdf_engine + @tex2pdf=@@tex3pdf ||=SiSU_Env::SystemCall.new.tex2pdf_engine end def xetex_code_listings(str,is='') # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list word=str.scan(/\S+|\n/) #unless line =~/^(?:@\S|%+\s)/ @@ -1411,12 +1411,12 @@ WOK str end end - class Use_TeX + class UseTeX attr_accessor :url,:txt,:date def initialize(md) @md=md - @vz=SiSU_Env::Get_init.instance.skin - @date=SiSU_Env::Info_date.new # #{@date.year} + @vz=SiSU_Env::GetInit.instance.skin + @date=SiSU_Env::InfoDate.new # #{@date.year} @copymark='{\\begin{footnotesize}\\raisebox{1ex}{\\copyright}\\end{footnotesize}}' @brace_url=SiSU_Viz::Skin.new.url_decoration end @@ -1490,7 +1490,7 @@ WOK end end def sisu_rights - v=SiSU_Env::Info_version.instance.get_version + v=SiSU_Env::InfoVersion.instance.get_version base_prog_txt=if @md.base_program case @md.base_program when /kdissert/i; "\n\\\\ This document prepared using \\href{http://freehackers.org/~tnagy/kdissert/}{Kdissert \\ http://freehackers.org/~tnagy/kdissert/ } \\\\ Kdissert is Document Mapping software by Thomas Nagy" @@ -1518,7 +1518,7 @@ WOK " \\footnote{%\nGenerated by \\href{http://www.jus.uio.no/sisu}{SiSU} \\ \\href{http://www.jus.uio.no/sisu}{www.jus.uio.no/sisu} \\newline \\href{http://www.sisudoc.org}{www.sisudoc.org} \\\n}" end def doc_sc_info - v=SiSU_Env::Info_version.instance.get_version + v=SiSU_Env::InfoVersion.instance.get_version <.*/ #watch change paranum=para[@regx,3] - @p_num=Format::Paragraph_number.new(paranum) + @p_num=Format::ParagraphNumber.new(paranum) end - @sto=Split_text_object.new(para).lev_segname_para_ocn + @sto=SplitTextObject.new(para).lev_segname_para_ocn ### problem in scroll, it appears tables are getting paragraph numbers m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/ if para =~m \ @@ -281,7 +281,7 @@ WOK when /^(3)~(?:(\S+))?/ wiki_structure(para,$1,@sto.ocn,$2) @sto.lev_para_ocn.heading_body3 - when /^(4)~(\S+)/ # work on see SiSU_text_parts::Split_text_object + when /^(4)~(\S+)/ # work on see SiSU_text_parts::SplitTextObject wiki_structure(para,$1,@sto.ocn,$2) @sto.lev_para_ocn.heading_body4 when /^(5)~(?:(\S+))?/ @@ -305,7 +305,7 @@ WOK elsif para =~/(#{Mx[:tc_p]}|#{Mx[:gr_o]}Th?)/u #tables ! #fix elsif para =~/(.*)(.*)/ one,two=$1,$2 - format_text=Format_text_object.new(one,two) + format_text=FormatTextObject.new(one,two) para=format_text.seg_no_paranum end if (para =~// \ @@ -315,12 +315,12 @@ WOK case para when /<:i1>/ if para =~/.*<:#>.*$/ - format_text=Format_text_object.new(para,'') + format_text=FormatTextObject.new(para,'') para=format_text.scr_indent_one_no_paranum end when /<:i2>/ if para =~/.*<:#>.*$/ - format_text=Format_text_object.new(para,'') + format_text=FormatTextObject.new(para,'') para=format_text.scr_indent_one_no_paranum end end @@ -329,7 +329,7 @@ WOK end if para =~/<:center>/ one,two=/(.*)<:center>(.*)/.match(para)[1,2] - format_text=Format_text_object.new(one,two) + format_text=FormatTextObject.new(one,two) para=format_text.center end para.gsub!(//,' ') if para ## Clean Prepared Text diff --git a/lib/sisu/v3dv/xhtml.rb b/lib/sisu/v3dv/xhtml.rb index bd4bdd6a..353309d4 100644 --- a/lib/sisu/v3dv/xhtml.rb +++ b/lib/sisu/v3dv/xhtml.rb @@ -75,7 +75,7 @@ module SiSU_XHTML class Source def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) end def read begin @@ -94,7 +94,7 @@ module SiSU_XHTML SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"/#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}").flow if @opt.cmd =~/[MV]/ end SiSU_XHTML::Source::Songsheet.new(@particulars).song - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -109,7 +109,7 @@ module SiSU_XHTML SiSU_XHTML::Source::Scroll.new(@particulars).songsheet SiSU_XHTML::Source::Tidy.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -122,10 +122,10 @@ module SiSU_XHTML @@xml={ body: [], sisu: [], open: [], close: [], head: [] } def initialize(particulars) @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @tab="\t" @trans=SiSU_XML_Munge::Trans.new(@md) - @sys=SiSU_Env::System_call.new + @sys=SiSU_Env::SystemCall.new end def songsheet pre @@ -267,7 +267,7 @@ WOK end def table_structure(dob) named=name_tags(dob) - table=SiSU_XHTML_Shared::Table_xhtml.new(dob) + table=SiSU_XHTML_Shared::TableXHTML.new(dob) @@xml[:body] << %{#{Ax[:tab]*0}} @@xml[:body] << %{#{Ax[:tab]*1}#{dob.ocn}} @@xml[:body] << %{#{Ax[:tab]*2}#{named}#{table.table.obj}} @@ -291,10 +291,10 @@ WOK if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ if defined? dob.ocn #look to move to format section ocn=(dob.ocn.to_s =~/\d+/) ? dob.ocn : nil - @p_num=SiSU_XML_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_XML_Format::ParagraphNumber.new(@md,ocn) end if not @rcdc - x=SiSU_XML_Format::Format_seg.new(@md,dob) + x=SiSU_XML_Format::FormatSeg.new(@md,dob) if dob.is=='heading' xml_structure(dob) dob.obj=case dob.ln @@ -334,7 +334,7 @@ WOK if dob.obj =~/.*<:#>.*$/ #investigate removal dob.obj=if dob.obj =~ /#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]}/ txt_obj={ txt: dob } - format_text=Format_text_object.new(@md,txt_obj) + format_text=FormatTextObject.new(@md,txt_obj) format_text.scr_inden_ocn_e_no_paranum end end @@ -356,9 +356,9 @@ WOK end def pre rdf=SiSU_XML_Tags::RDF.new(@md) - dir=SiSU_Env::Info_env.new + dir=SiSU_Env::InfoEnv.new @@xml[:head],@@xml[:body]=[],[] - css=SiSU_Env::CSS_stylesheet.new(@md) + css=SiSU_Env::CSS_Stylesheet.new(@md) encoding=(@sys.locale =~/utf-?8/i) ? '' : '' @@xml[:open] =<" end def table_structure(dob) - table=SiSU_XHTML_Shared::Table_xhtml.new(dob) + table=SiSU_XHTML_Shared::TableXHTML.new(dob) @@xml[:body] << %{#{Ax[:tab]*0}} @@xml[:body] << %{#{Ax[:tab]*1}#{dob.ocn}} @@xml[:body] << %{#{Ax[:tab]*1}#{Ax[:tab]*1}} @@ -314,12 +314,12 @@ WOK if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ if defined? dob.ocn #look to move to format section ocn=((dob.ocn.to_s =~/\d+/) ? dob.ocn : nil) - @p_num=SiSU_XML_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_XML_Format::ParagraphNumber.new(@md,ocn) end if not @rcdc if defined? dob.ocn \ and dob.ocn.to_s =~/\d+/ - x=SiSU_XML_Format::Format_seg.new(@md,dob) + x=SiSU_XML_Format::FormatSeg.new(@md,dob) if dob.is=='heading' xml_structure(dob) dob.obj=case dob.ln @@ -359,11 +359,11 @@ WOK elsif dob.obj =~/(#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ elsif dob.obj =~/MetaData/ txt_obj={ txt: '
MetaData' } - format_scroll=Format_scroll.new(@md,txt_obj) + format_scroll=FormatScroll.new(@md,txt_obj) dob.obj=format_scroll.bold_para elsif dob.obj =~/(Owner Details)/ # txt_obj={ txt: '
Owner Details' } -# format_scroll=Format_scroll.new(@md,txt_obj) +# format_scroll=FormatScroll.new(@md,txt_obj) # @@xml[:owner_details]=format_scroll.bold_para dob.obj='' end @@ -374,7 +374,7 @@ WOK if dob.obj =~/.*<:#>.*$/ #investigate removal dob.obj=if dob.obj =~ /#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]}/ txt_obj={ txt: dob } - format_text=Format_text_object.new(@md,txt_obj) + format_text=FormatTextObject.new(@md,txt_obj) format_text.scr_inden_ocn_e_no_paranum end end @@ -395,9 +395,9 @@ WOK end def pre rdf=SiSU_XML_Tags::RDF.new(@md) - dir=SiSU_Env::Info_env.new + dir=SiSU_Env::InfoEnv.new @@xml[:head],@@xml[:body]=[],[] - css=SiSU_Env::CSS_stylesheet.new(@md) + css=SiSU_Env::CSS_Stylesheet.new(@md) encoding=if @sys.locale =~/utf-?8/i; '' else '' end @@ -444,7 +444,7 @@ WOK class Tidy def initialize(md,file) @md,@file=md,file - @prog=SiSU_Env::Info_program.new + @prog=SiSU_Env::InfoProgram.new end def xml if @prog.tidy !=false #note values can be other than true @@ -455,7 +455,7 @@ WOK tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new(@file,tidyfile) + tidy=SiSU_Env::SystemCall.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end diff --git a/lib/sisu/v3dv/xml_dom.rb b/lib/sisu/v3dv/xml_dom.rb index 8a6394ad..63a7814a 100644 --- a/lib/sisu/v3dv/xml_dom.rb +++ b/lib/sisu/v3dv/xml_dom.rb @@ -73,7 +73,7 @@ module SiSU_XML_DOM class Source def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) end def read begin @@ -91,7 +91,7 @@ module SiSU_XML_DOM SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_DOM::Source::Songsheet.new(@particulars).songsheet - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -106,7 +106,7 @@ module SiSU_XML_DOM SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -118,9 +118,9 @@ module SiSU_XML_DOM @@xml={ body: [], open: [], close: [], head: [], sc: [] } def initialize(particulars) @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @trans=SiSU_XML_Munge::Trans.new(@md) - @sys=SiSU_Env::System_call.new + @sys=SiSU_Env::SystemCall.new end def songsheet pre @@ -333,7 +333,7 @@ WOK dob end def table_structure(dob) #tables - table=SiSU_XHTML_Shared::Table_xhtml.new(dob) + table=SiSU_XHTML_Shared::TableXHTML.new(dob) end def markup(data) xml_sc(@md) @@ -352,12 +352,12 @@ WOK @rcdc=true end if dob !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ - @p_num=SiSU_XML_Format::Paragraph_number.new(@md,dob.ocn) if defined? dob.ocn + @p_num=SiSU_XML_Format::ParagraphNumber.new(@md,dob.ocn) if defined? dob.ocn if not @rcdc if defined? dob.ocn \ and dob.ocn.to_s =~/\d+/ - format_scroll=SiSU_XML_Format::Format_scroll.new(@md,dob) if dob.is=='para' and dob.indent ##FIX - x=SiSU_XML_Format::Format_seg.new(@md,dob) + format_scroll=SiSU_XML_Format::FormatScroll.new(@md,dob) if dob.is=='para' and dob.indent ##FIX + x=SiSU_XML_Format::FormatSeg.new(@md,dob) if dob.is=='heading' if dob.ln==1 type="heading_section_#{dob.ln.to_s}" @@ -430,7 +430,7 @@ WOK elsif dob.obj =~/(#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/ elsif dob.obj =~/(MetaData)/ txt_obj={ txt: '
MetaData' } - format_scroll=Format_scroll.new(@md,txt_obj) + format_scroll=FormatScroll.new(@md,txt_obj) dob.obj=format_scroll.bold_para elsif dob.obj =~/(Owner Details)/ dob.obj='' @@ -442,7 +442,7 @@ WOK if dob.obj =~/.*<:#>.*$/ dob.obj=if dob.obj =~ /#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]}/ txt_obj={ txt: dob.obj } - format_text=Format_text_object.new(@md,txt_obj) + format_text=FormatTextObject.new(@md,txt_obj) format_text.scr_inden_ocn_e_no_paranum end end @@ -472,8 +472,8 @@ WOK end def pre rdf=SiSU_XML_Tags::RDF.new(@md) - dir=SiSU_Env::Info_env.new - css=SiSU_Env::CSS_stylesheet.new(@md) + dir=SiSU_Env::InfoEnv.new + css=SiSU_Env::CSS_Stylesheet.new(@md) encoding=if @sys.locale =~/utf-?8/i; '' else '' end @@ -521,7 +521,7 @@ WOK class Tidy def initialize(md,file) @md,@file=md,file - @prog=SiSU_Env::Info_program.new + @prog=SiSU_Env::InfoProgram.new end def xml if @prog.tidy !=false @@ -530,7 +530,7 @@ WOK tell=SiSU_Screen::Ansi.new(@md.opt.cmd,'invert','','') tell.grey_open unless @md.opt.cmd =~/q/ tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new(@file,tidyfile) + tidy=SiSU_Env::SystemCall.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end diff --git a/lib/sisu/v3dv/xml_fictionbook.rb b/lib/sisu/v3dv/xml_fictionbook.rb index 31dcd126..8a0819eb 100644 --- a/lib/sisu/v3dv/xml_fictionbook.rb +++ b/lib/sisu/v3dv/xml_fictionbook.rb @@ -76,7 +76,7 @@ module SiSU_XML_Fictionbook @md=SiSU_Param::Parameters.new(@opt).get @dal_array=SiSU_DAL::Source.new(@opt).get SiSU_XML_Fictionbook::Source::Scroll.new(@dal_array,@md).songsheet - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -103,8 +103,8 @@ module SiSU_XML_Fictionbook tail end def head - version=SiSU_Env::Info_version.instance.get_version - rb_ver=SiSU_Env::Info_version.instance.rbversion + version=SiSU_Env::InfoVersion.instance.get_version + rb_ver=SiSU_Env::InfoVersion.instance.rbversion date_available=if defined? @md.date.available; "\n

#{@md.date.available} Initial version

" else '' end diff --git a/lib/sisu/v3dv/xml_format.rb b/lib/sisu/v3dv/xml_format.rb index f2305260..e3e4b380 100644 --- a/lib/sisu/v3dv/xml_format.rb +++ b/lib/sisu/v3dv/xml_format.rb @@ -61,7 +61,7 @@ module SiSU_XML_Format require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz - class Paragraph_number + class ParagraphNumber def initialize(md,paranum) @md=md @paranum=(paranum ? (/(\d+)/m.match(paranum)[1]) : nil) @@ -84,7 +84,7 @@ module SiSU_XML_Format p_num_goto end end - class Head_information + class HeadInformation def initialize #dc rdf @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords='' @md=@@md @@ -193,7 +193,7 @@ module SiSU_XML_Format @copyright=%{\n} if @md.rights.copyright.all # possibly redundant see dc.rights @owner=%{\n} if @md.owner @keywords=%{\n} if @md.keywords - @vz=SiSU_Env::Get_init.instance.skin #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php + @vz=SiSU_Env::GetInit.instance.skin #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php @index='index' end def toc_head_escript #embedded script in this case PHP @@ -274,7 +274,7 @@ module SiSU_XML_Format WOK end end - class Format_text_object + class FormatTextObject attr_accessor :md,:txt,:format,:paranum,:p_num,:para_id,:headname,:font def initialize(md,dob) @md,@dob=md,dob @@ -282,19 +282,19 @@ WOK @paranum=/(\d+)/m.match(@dob[:ocn])[1] @headname='' @headname=%{} if defined? dob.name - @p_num=SiSU_XML_Format::Paragraph_number.new(@md,dob.ocn) + @p_num=SiSU_XML_Format::ParagraphNumber.new(@md,dob.ocn) end rgx=/^[1-6-]~{1,2}/ #watch @lnk_url=@lnk_url.gsub(rgx,'') if @lnk_url =~rgx rgx=/~\{\d+\s+(.+?)\}~/ @lnk_url=@lnk_url.gsub(rgx,'\1') if @lnk_url =~rgx - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def scr_endnote_body "#{@txt} " end end - class Format_scroll < Format_text_object + class FormatScroll < FormatTextObject def initialize(md,dob) super(md,dob) end @@ -327,11 +327,11 @@ WOK %{

  #{@dob.ocn}

\n} end end - class Paragraph_number + class ParagraphNumber def initialize(md,ocn) @md,@ocn=md,ocn.to_s @ocn ||='' - vz=SiSU_Env::Get_init.instance.skin + vz=SiSU_Env::GetInit.instance.skin @skin_no_ocn=if not ocn true elsif defined? vz.ocn_display_off \ @@ -366,15 +366,15 @@ WOK %{} end end - class Head_information + class HeadInformation include SiSU_Viz attr_reader :md,:sfx,:pdf,:rdf,:vz def initialize(md) @md=md @rdf=SiSU_XML_Tags::RDF.new(md) # DublinCore 1 - title - @vz=SiSU_Env::Get_init.instance.skin - @css=SiSU_Env::CSS_stylesheet.new(md) + @vz=SiSU_Env::GetInit.instance.skin + @css=SiSU_Env::CSS_Stylesheet.new(md) @seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || []) @seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || []) @index='index' @@ -406,11 +406,11 @@ WOK } end end - class Widget < Head_information + class Widget < HeadInformation def initialize(md) super(md) @md=md - @cf_defaults=SiSU_Env::Info_processing_flag.new + @cf_defaults=SiSU_Env::InfoProcessingFlag.new end def home %{
@@ -927,7 +927,7 @@ WOK } end end - class Head_scroll < Head_toc + class HeadScroll < HeadToc def initialize(md) super(md) end @@ -944,8 +944,8 @@ WOK #{@vz.table_close}} end end - class Format_text_object - @vz=SiSU_Env::Get_init.instance.skin + class FormatTextObject + @vz=SiSU_Env::GetInit.instance.skin attr_accessor :md,:t_o,:txt,:ocn,:format,:table,:link,:linkname,:paranum,:p_num,:headname,:banner,:url def initialize(md,t_o) @md,@t_o=md,t_o @@ -976,8 +976,8 @@ WOK if @txt and not @txt.empty? @txt.gsub!(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'') end - @p_num=Paragraph_number.new(@md,@ocn) - @vz=SiSU_Env::Get_init.instance.skin + @p_num=ParagraphNumber.new(@md,@ocn) + @vz=SiSU_Env::GetInit.instance.skin end def nametags_scroll(dob) tags='' @@ -1074,7 +1074,7 @@ WOK end def table @txt=if @t_o.obj !~/^#{@txt}

\n} end end - class Format_scroll < Format_text_object + class FormatScroll < FormatTextObject def initialize(md,txt) super(md,txt) - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end end - class Format_seg < Format_text_object + class FormatSeg < FormatTextObject def initialize(md,txt) super(md,txt) end @@ -1364,7 +1364,7 @@ WOK "
#{@txt}
" end end - class Format_toc < Format_text_object + class FormatToc < FormatTextObject def initialize(md,txt) super(md,txt) end @@ -1455,7 +1455,7 @@ WOK } end end - class Format_str + class FormatStr def initialize(md,str) @str=str end diff --git a/lib/sisu/v3dv/html_minitoc.rb b/lib/sisu/v3dv/html_minitoc.rb index d2bfd46f..7f891a2e 100644 --- a/lib/sisu/v3dv/html_minitoc.rb +++ b/lib/sisu/v3dv/html_minitoc.rb @@ -60,7 +60,7 @@ module SiSU_HTML_MiniToc require_relative 'html_tune' # html_tune.rb include SiSU_HTML_Tune - class Toc_mini + class TocMini @@seg_mini=nil @@seg_url='' @@firstseg=nil @@ -80,12 +80,12 @@ txt.obj.gsub!(@pat_strip_heading_name,'\1') txt.obj.gsub(/(.*?)<\/a>(.*)/,'\1') #2002w42 altered gsub! - problematic? - suspect toc=case txt.ln - when 1; Toc_mini.new(@md,txt).level_1 - when 2; Toc_mini.new(@md,txt).level_2 - when 3; Toc_mini.new(@md,txt).level_3 - when 4; Toc_mini.new(@md,txt).level_4 - when 5; Toc_mini.new(@md,txt).level_5 - when 6; Toc_mini.new(@md,txt).level_6 + when 1; TocMini.new(@md,txt).level_1 + when 2; TocMini.new(@md,txt).level_2 + when 3; TocMini.new(@md,txt).level_3 + when 4; TocMini.new(@md,txt).level_4 + when 5; TocMini.new(@md,txt).level_5 + when 6; TocMini.new(@md,txt).level_6 else end @toc << toc @@ -95,15 +95,15 @@ end protected def level_concordance - format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) @@seg_mini << format_head_toc.mini_seg_concordance end def level_metadata - format_head_toc=SiSU_HTML_Format::Head_toc.new(@md) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) @@seg_mini << format_head_toc.mini_seg_metadata end def level_word_index - format_head_toc=SiSU_HTML_Format::Head_toc.new(@d0c) + format_head_toc=SiSU_HTML_Format::HeadToc.new(@d0c) @@seg_mini << format_head_toc.mini_concordance end def level_1 @@ -119,7 +119,7 @@ end toc={} txt_obj={ txt: title } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc_mini=if txt.name =~/^meta/ and txt.obj=~/Document Information/ format_toc.mini_tail else format_toc.mini_lev1 @@ -133,14 +133,14 @@ txt.obj.gsub!(@pat_strip_heading_name,'\1') end txt_obj={ txt: txt.obj } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc_mini=format_toc.mini_lev2 toc_mini end def level_3 txt=@data txt_obj={ txt: txt.obj } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc_mini=format_toc.mini_lev3 toc_mini end @@ -158,7 +158,7 @@ %{target="_top">\\1 \\2 }) end txt_obj={ txt: seg_link } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc_mini=format_toc.mini_lev4 toc_mini end @@ -174,7 +174,7 @@ #{txt.obj} } txt_obj={ txt: lnk_n_txt } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc_mini=format_toc.mini_lev5 toc_mini end @@ -189,7 +189,7 @@ #{txt.obj} } txt_obj={ txt: lnk_n_txt } - format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) toc_mini=format_toc.mini_lev6 toc_mini end diff --git a/lib/sisu/v3dv/html_promo.rb b/lib/sisu/v3dv/html_promo.rb index f5595658..7617b52c 100644 --- a/lib/sisu/v3dv/html_promo.rb +++ b/lib/sisu/v3dv/html_promo.rb @@ -62,10 +62,10 @@ module SiSU_HTML_Promo class Ad def initialize(md) @md=md - @env=SiSU_Env::Info_env.new(@md.fns,@md) - @rc=SiSU_Env::Get_init.instance.sisu_yaml.rc - @ad=SiSU_Env::Get_init.instance.ads - @vz=SiSU_Env::Get_init.instance.skin + @env=SiSU_Env::InfoEnv.new(@md.fns,@md) + @rc=SiSU_Env::GetInit.instance.sisu_yaml.rc + @ad=SiSU_Env::GetInit.instance.ads + @vz=SiSU_Env::GetInit.instance.skin @flag=@env.widget.promo? end def div diff --git a/lib/sisu/v3dv/html_scroll.rb b/lib/sisu/v3dv/html_scroll.rb index 2efdb8bd..b14d841f 100644 --- a/lib/sisu/v3dv/html_scroll.rb +++ b/lib/sisu/v3dv/html_scroll.rb @@ -64,14 +64,14 @@ module SiSU_HTML_Scroll class Scroll def initialize(md='',data='',endnotes='') @md,@data,@endnotes=md,data,endnotes - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def songsheet begin scr=Scroll.new(@md,@data,@endnotes).markup scr[:tails]=Scroll.new(@md).tails scr - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -103,9 +103,9 @@ module SiSU_HTML_Scroll unless dob.is =~/^code/; dob.obj.gsub!(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') end if defined? dob.ocn - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,dob.ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,dob.ocn) end - sto=SiSU_HTML_Format::Format_text_object.new(@md,dob) + sto=SiSU_HTML_Format::FormatTextObject.new(@md,dob) para_html=if dob.is=='heading' x=if dob.ln==1 sto.heading_body1 @@ -137,7 +137,7 @@ module SiSU_HTML_Scroll elsif dob.ln==4 \ and dob.obj=='Index' sto.heading_body4 - book_idx=SiSU_Particulars::Combined_singleton.instance.get_idx_html(@md.opt).html_idx + book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx book_idx.each do |x| #takes book index prepared for segments and strips segment identifying info x.gsub!(/(\1(?:-\d+)?)<\/a>/,'\2') end @@ -199,7 +199,7 @@ module SiSU_HTML_Scroll end def tails scr_tail=[] - format_head_scroll=SiSU_HTML_Format::Head_toc.new(@md) + format_head_scroll=SiSU_HTML_Format::HeadToc.new(@md) ads=SiSU_HTML_Promo::Ad.new(@md) scr_tail << format_head_scroll.scroll_tail << ads.div.close << ads.display << format_head_scroll.html_close scr_tail diff --git a/lib/sisu/v3dv/html_segments.rb b/lib/sisu/v3dv/html_segments.rb index 39b3984f..69388229 100644 --- a/lib/sisu/v3dv/html_segments.rb +++ b/lib/sisu/v3dv/html_segments.rb @@ -61,10 +61,10 @@ module SiSU_HTML_Seg require_relative 'html' # html.rb require_relative 'html_promo' # html_promo.rb require_relative 'shared_metadata' # shared_metadata.rb - class Seg_output + class SegOutput def initialize(md,outputfile,seg,minitoc,type='') @md,@output_seg_file,@seg,@minitoc,@type=md,outputfile,seg,minitoc,type - @title_banner_=SiSU_Env::Create_site.new(@md.opt.cmd).html_seg_title_banner? + @title_banner_=SiSU_Env::CreateSite.new(@md.opt.cmd).html_seg_title_banner? @file=SiSU_Env::FileOp.new(@md) end def output @@ -73,33 +73,33 @@ module SiSU_HTML_Seg filename_seg << @seg[:title] << @seg[:tocband_banner] if @type=='endnotes' @seg[:headings]=[] - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if @title_banner_ @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) end txt_obj={ txt: 'Endnotes', ocn_display: '' } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_endnotes] << @minitoc << @seg[:headings] << %{\n
\n} << @seg[:endnote_all] << '
' # << '' elsif @type=='idx' @seg[:headings]=[] - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if @title_banner_ @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) end txt_obj={ txt: 'Index', ocn_display: '' } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_idx] << @minitoc << @seg[:headings] << %{\n
\n} << @seg[:idx] << '
' # << '' elsif @type=='metadata' metadata=Metadata::Summary.new(@md).xhtml_display.metadata @seg[:headings]=[] - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if @title_banner_ @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) end txt_obj={ txt: 'Metadata', ocn_display: '' } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_idx] << @minitoc << @seg[:headings] << %{\n
\n} << metadata << '
' # << '' else @@ -134,12 +134,12 @@ module SiSU_HTML_Seg attr_reader :seg_name_html,:seg_name_html_tracker def initialize(md=nil,data='') @md,@data=md,data - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin @seg_name_html=@@seg_name_html || nil @seg_name_html_tracker=@@tracker || nil - @env=SiSU_Env::Info_env.new(@md.fns) if @md + @env=SiSU_Env::InfoEnv.new(@md.fns) if @md if @md - @title_banner_=SiSU_Env::Create_site.new(@md.opt.cmd).html_seg_title_banner? + @title_banner_=SiSU_Env::CreateSite.new(@md.opt.cmd).html_seg_title_banner? end end def songsheet @@ -149,7 +149,7 @@ module SiSU_HTML_Seg data=articles(data) Seg.new.cleanup # (((( added )))) #### (((( END )))) #### - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@seg_name=[] end @@ -161,8 +161,8 @@ module SiSU_HTML_Seg printed_endnote_seg='n' idx_html=nil if @md.book_idx - #my_make_source_file=SiSU_Env::Create_file.new(@md.fns) - idx_html=SiSU_Particulars::Combined_singleton.instance.get_idx_html(@md.opt).html_idx + #my_make_source_file=SiSU_Env::CreateFile.new(@md.fns) + idx_html=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx idx_html.each {|x| @@seg[:idx] << x } @@seg[:heading_idx]='' end @@ -177,7 +177,7 @@ module SiSU_HTML_Seg @@seg_total=@@seg_name.length testforartnum=@@seg_name_html SiSU_Screen::Ansi.new(@md.opt.cmd,@@seg_name.length).segmented if @md.opt.cmd =~/[MVv]/ - map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags + map_nametags=SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map #p map_nametags data.each do |dob| if defined? dob.obj \ and dob.obj =~/href="#{Xx[:segment]}#+\S+?"/ @@ -228,7 +228,7 @@ module SiSU_HTML_Seg if (dob.is=='heading' or dob.is=='heading_insert') \ and dob.ln==4 if tracking != 0 - dirout=SiSU_Env::Info_env.new(@md.fns) + dirout=SiSU_Env::InfoEnv.new(@md.fns) dir_sisu=dirout.path.output @file=SiSU_Env::FileOp.new(@md) unless FileTest.directory?(@file.output_path.html_seg.dir) @@ -242,15 +242,15 @@ module SiSU_HTML_Seg : '' if dob.is=='heading' \ or @@seg_name_html[tracking-1] !~/endnotes|book_index|metadata/ - Seg_output.new(@md,output_seg_file,@@seg,minitoc).output + SegOutput.new(@md,output_seg_file,@@seg,minitoc).output elsif dob.is=='heading_insert' if @@seg_name_html[tracking-1]=='endnotes' - Seg_output.new(@md,output_seg_file,@@seg,minitoc,'endnotes').output + SegOutput.new(@md,output_seg_file,@@seg,minitoc,'endnotes').output elsif @@seg_name_html[tracking-1]=='book_index' - Seg_output.new(@md,output_seg_file,@@seg,minitoc,'idx').output + SegOutput.new(@md,output_seg_file,@@seg,minitoc,'idx').output @@seg[:idx]=[] elsif @@seg_name_html[tracking-1]=='metadata' - Seg_output.new(@md,output_seg_file,@@seg,minitoc,'metadata').output + SegOutput.new(@md,output_seg_file,@@seg,minitoc,'metadata').output else puts "#{__FILE__}::#{__LINE__}" end else puts "#{__FILE__}::#{__LINE__}" @@ -262,7 +262,7 @@ module SiSU_HTML_Seg #if @@seg_name_html[tracking] =~/metadata/ # this is for metadata # segfilename="#{@md.dir_out}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" # output_seg_file=File.new(segfilename,'w') - # Seg_output.new(@md,output_seg_file,@@seg,minitoc,'metadata').output + # SegOutput.new(@md,output_seg_file,@@seg,minitoc,'metadata').output # Seg.new.reinitialise #end end @@ -292,7 +292,7 @@ module SiSU_HTML_Seg data end def heading_art(dob) - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if (dob.is=='heading' or dob.is=='heading_insert') \ and dob.ln.to_s =~/^[1-6]/ if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next @@ -304,7 +304,7 @@ module SiSU_HTML_Seg end def head(dob) clean=/|<:.*?>/ - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if @@tracker < @@seg_total-1 if @@tracker==0; @@segtocband=format_head_seg.toc_next2 #if format_head_seg.toc_next2 else @@segtocband=format_head_seg.toc_pre_next2 #if format_head_seg.toc_pre_next2 @@ -320,16 +320,16 @@ module SiSU_HTML_Seg else '' end @@seg[:tocband_bannerless] << '
' << conditional_div_close << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) - @@seg[:headings] << format_head_seg.seg_head_escript if SiSU_HTML_Format::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug + @@seg[:headings] << format_head_seg.seg_head_escript if SiSU_HTML_Format::HeadSeg.method_defined? :seg_head_escript #debug PHP move up in text #bug if @title_banner_ @@seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author).gsub(clean,'') end ocn=if @@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: @@heading1, ocn_display: @p_num.ocn_display } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading1.gsub(clean,'') @@heading1.gsub!(/  [\d*+]+<\/sup> <\/a>/,'') end @@ -338,9 +338,9 @@ module SiSU_HTML_Seg ocn=if heading2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading2.gsub(clean,'') @@heading2.gsub!(/  [\d*+]+<\/sup> <\/a>/,'') end @@ -349,9 +349,9 @@ module SiSU_HTML_Seg ocn=if heading3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading3.gsub(clean,'') @@heading3.gsub!(/  [\d*+]+<\/sup> <\/a>/,'') end @@ -360,21 +360,21 @@ module SiSU_HTML_Seg ocn=if heading4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) @@seg[:headings] << format_seg.title_heading4.gsub(clean,'') end @@tracker=@@tracker+1 end def markup(dob) @debug=[] - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if dob.is !~/meta/ if dob.is =~/(?:heading|para)/ #extend as necessary FIX - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,dob.ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,dob.ocn) end - sto=SiSU_HTML_Format::Format_text_object.new(@md,dob) + sto=SiSU_HTML_Format::FormatTextObject.new(@md,dob) dob_html=if dob.is =~/heading|para/ dob_html=if (dob.is=='heading' \ or dob.is=='heading_insert') @@ -425,11 +425,11 @@ module SiSU_HTML_Seg end if dob.obj !~/#{@vz.margin_txt_w1}|#{@vz.margin_txt_w2}/ if dob.is =~/heading|para/ and (not dob.ocn or dob.ocn.to_s.empty?) - format_seg=SiSU_HTML_Format::Format_seg.new(@md,dob) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,dob) end dob.obj.gsub!(/\s*(-\{{2}~\d+|<:e[:_]\d+>).*/,'') #potentially dagerous - removes all paragraphs with #?? workpoint if dob.obj =~/ / #endnote- note- - format_seg=SiSU_HTML_Format::Format_seg.new(@md,dob) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,dob) dob=format_seg.no_paranum end end @@ -445,7 +445,7 @@ module SiSU_HTML_Seg end end def tail - format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) + format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if @md.flag_auto_endnotes and @@seg_endnotes[@@get_hash_fn] @@seg[:tail] << %{\n
\n
\n} if @@seg_endnotes[@@get_hash_fn].flatten.length > 0 @@ -501,11 +501,11 @@ module SiSU_HTML_Seg case dob.ln when 5 txt_obj={ txt: dob.obj.strip, ocn: dob.ocn } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) subtoc=format_seg.subtoc_lev5 #keep and make available, this is the subtoc when 6 txt_obj={ txt: dob.obj.strip, ocn: dob.ocn } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) subtoc=format_seg.subtoc_lev6 #keep and make available, this is the subtoc end @@seg_subtoc_array << subtoc @@ -531,7 +531,7 @@ module SiSU_HTML_Seg try=e_n.split(/
/) try.each do |e| txt_obj={ txt: e } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) note_match=if e =~/#{Mx[:pa_o]}i[1-9]#{Mx[:pa_c]}/ format_seg.endnote_body_indent else format_seg.endnote_body @@ -544,7 +544,7 @@ module SiSU_HTML_Seg endnote_part_a=note_match_seg[m,1] endnote_part_b=note_match_seg[m,2] txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b } - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) + format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj) note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408 @@seg[:endnote_all] << note_match_all_seg end diff --git a/lib/sisu/v3dv/html_table.rb b/lib/sisu/v3dv/html_table.rb index ba21cac4..87a4c4b6 100644 --- a/lib/sisu/v3dv/html_table.rb +++ b/lib/sisu/v3dv/html_table.rb @@ -59,7 +59,7 @@ module SiSU_HTML_Table require_relative 'defaults' # defaults.rb require_relative 'xhtml_table.rb' # xhtml_table.rb - class Table_html /,'<\1 />') - dob=SiSU_HTML_Tune::Clean_html.new(dob).clean + dob=SiSU_HTML_Tune::CleanHTML.new(dob).clean dob end def output diff --git a/lib/sisu/v3dv/hub.rb b/lib/sisu/v3dv/hub.rb index 243b2f14..dbcf3c8e 100644 --- a/lib/sisu/v3dv/hub.rb +++ b/lib/sisu/v3dv/hub.rb @@ -63,7 +63,7 @@ module SiSU include SiSU_Screen @@pwd_the=Dir.pwd class Op - @@env=SiSU_Env::Info_env.new + @@env=SiSU_Env::InfoEnv.new def initialize(opt,req,message) @opt,@req,@message=opt,req,message @n_do=0 @@ -129,11 +129,11 @@ module SiSU end if not @opt.files.empty? @opt.files.each_with_index do |fns,i| - env=SiSU_Env::Info_env.new(fns) + env=SiSU_Env::InfoEnv.new(fns) if fns =~ /sisupod(?:\.txz)?|\S+?(?:\.ss[mt]\.txz|\.ssp)$/ require_relative 'remote' # remote.rb #check pod_name=if fns =~ /http:\/\/\S+?(?:\.ss[mt]\.txz|\.ssp)$/ - SiSU_Remote::Remote_download.new(fns).pod.name + SiSU_Remote::RemoteDownload.new(fns).pod.name else re_p=/(\S+?\.ss[mt](?:\.txz)?)$/ re_p.match(fns).captures.join @@ -145,7 +145,7 @@ module SiSU elsif fns =~ /sisupod(?:\.zip)?|\S+?(?:\.ss[mt]\.zip|\.ssp)$/ require_relative 'remote' # remote.rb #check pod_name=if fns =~ /http:\/\/\S+?(?:\.ss[mt]\.zip|\.ssp)$/ - SiSU_Remote::Remote_download.new(fns).pod.name + SiSU_Remote::RemoteDownload.new(fns).pod.name else re_p=/(\S+?\.ss[mt](?:\.zip)?)$/ re_p.match(fns).captures.join @@ -171,7 +171,7 @@ module SiSU @@pwd=@opt.pth end Dir.chdir(@opt.pth) #watch - env=SiSU_Env::Info_env.new(fns) + env=SiSU_Env::InfoEnv.new(fns) if @req !~/(?:urls|remote)$/ if @opt.cmd.inspect =~/-P/\ and @req =~ /^po4a$/ @@ -338,7 +338,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ class Processing require 'fileutils' include FileUtils - @@env=SiSU_Env::Info_env.new + @@env=SiSU_Env::InfoEnv.new attr_accessor :op def initialize(opt) @opt=opt @@ -362,7 +362,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ \ or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ @cX=SiSU_Screen::Ansi.new(@opt.cmd).cX - flag=SiSU_Env::Info_processing_flag.new + flag=SiSU_Env::InfoProcessingFlag.new if @opt.cmd =~/[vVM]/ #% version information if @opt.cmd =~/V/ \ and @opt.files.empty? #% environment @@ -470,7 +470,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ SiSU_Remote::Get.new(@opt,@get_p).sisupod end rescue - SiSU_Errors::Info_error.new($!,$@,@opt,@fns).error #ok + SiSU_Errors::InfoError.new($!,$@,@opt,@fns).error #ok @retry_count +=1 retry unless @retry_count > 1 ensure @@ -593,10 +593,10 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ end elsif @opt.mod.inspect =~/--query/ require_relative 'sst_identify_markup' # sst_identify_markup.rb - puts SiSU_Markup::Markup_history.new(@opt).query + puts SiSU_Markup::MarkupHistory.new(@opt).query elsif @opt.mod.inspect =~/--identify/ require_relative 'sst_identify_markup' # sst_identify_markup.rb - markup_version=SiSU_Markup::Markup_identify.new(@opt).markup_version? + markup_version=SiSU_Markup::MarkupIdentify.new(@opt).markup_version? elsif @opt.mod.inspect =~/--about/ #% help instructions if @opt.mod.inspect =~/--about/ \ and not @opt.what.empty? diff --git a/lib/sisu/v3dv/manifest.rb b/lib/sisu/v3dv/manifest.rb index 36988cec..30e645b4 100644 --- a/lib/sisu/v3dv/manifest.rb +++ b/lib/sisu/v3dv/manifest.rb @@ -72,15 +72,15 @@ module SiSU_Manifest class Source def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) - l=SiSU_Env::Standardise_language.new(@opt.lng).language + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) + l=SiSU_Env::StandardiseLanguage.new(@opt.lng).language @doc_language=l[:n] end def read begin - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) @md=SiSU_Param::Parameters.new(@opt).get - SiSU_Env::Info_skin.new(@md).select + SiSU_Env::InfoSkin.new(@md).select xbrowser=@env.program.web_browser browser=@env.program.console_web_browser # webserv_url=@env.path.url.output_tell #fix in sysenv @@ -91,25 +91,25 @@ module SiSU_Manifest : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i end - data=SiSU_HTML::Source::Html_environment.new(@particulars).tuned_file_instructions - Output_Info.new(@md).check_output(data) - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions + OutputInfo.new(@md).check_output(data) + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end private - class Output_Info

#{img}#{id}

#{file}

#{@brace_url.xml_open}#{url}/#{file}#{@brace_url.xml_close}

#{kb}

@@ -438,7 +438,7 @@ WOK } end def search - env=SiSU_Env::Info_env.new(@md.fns,@md) + env=SiSU_Env::InfoEnv.new(@md.fns,@md) env.widget.search_form('sisusearch',nil,nil,true) end def manifest @@ -491,7 +491,7 @@ WOK end class XML end - class Head_toc < Head_information + class HeadToc < HeadInformation def initialize(md) super(md) @md=md @@ -864,7 +864,7 @@ WOK } end end - class Head_seg < Head_information + class HeadSeg < HeadInformation def initialize(md) #(md='') super(md) end @@ -979,7 +979,7 @@ WOK def doc_types #used in seg_nav_band ### scroll=seg='' wgt=Widget.new(@md) - #dir=SiSU_Env::Info_env.new(@md.fns) + #dir=SiSU_Env::InfoEnv.new(@md.fns) x=if @md.concord_make %{ @@ -1025,7 +1025,7 @@ WOK } end def header_advert_local_1 - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{
@@ -1037,7 +1037,7 @@ WOK } end def header_advert_local_2 - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{
@@ -1049,7 +1049,7 @@ WOK } end def header_advert_external - dir=SiSU_Env::Info_env.new(@fns) + dir=SiSU_Env::InfoEnv.new(@fns) %{
@@ -1163,7 +1163,7 @@ WOK } end end - class Head_scroll < Head_toc + class HeadScroll < HeadToc def initialize(md) #(md='') super(md) end @@ -1197,8 +1197,8 @@ WOK #{@vz.paragraph_txt}} end end - class Format_text_object - @vz=SiSU_Env::Get_init.instance.skin + class FormatTextObject + @vz=SiSU_Env::GetInit.instance.skin attr_accessor :md,:dob,:txt,:ocn,:format,:table,:link,:linkname,:paranum,:p_num,:headname,:banner,:url def initialize(md,t_o) @md,@t_o=md,t_o @@ -1233,7 +1233,7 @@ WOK end if defined? @t_o.ocn ocn=((@t_o.ocn.to_s =~/\d+/) ? @t_o.ocn : nil) - @p_num=Paragraph_number.new(@md,ocn) + @p_num=ParagraphNumber.new(@md,ocn) end if @format and not @format.empty? if @format=~/^\d:(\S+)/ #need more reliable marker #if @format =~ /#{Rx[:lv]}/ @@ -1244,7 +1244,7 @@ WOK end end @dob=t_o if defined? t_o.is - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def endnote_body %{ @@ -1417,13 +1417,13 @@ WOK %{

#{@txt}

\n} end end - class Format_scroll < Format_text_object + class FormatScroll < FormatTextObject def initialize(md,txt) super(md,txt) - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end end - class Format_seg < Format_text_object + class FormatSeg < FormatTextObject def initialize(md,txt) super(md,txt) end @@ -1557,7 +1557,7 @@ WOK "
#{@txt}
" end end - class Format_toc < Format_text_object + class FormatToc < FormatTextObject def initialize(md,txt) super(md,txt) end diff --git a/lib/sisu/v3dv/xml_scaffold.rb b/lib/sisu/v3dv/xml_scaffold.rb index 31db19a2..1ae31d0f 100644 --- a/lib/sisu/v3dv/xml_scaffold.rb +++ b/lib/sisu/v3dv/xml_scaffold.rb @@ -66,14 +66,14 @@ module SiSU_XML_Scaffold class Source def initialize(opt) @opt=opt - @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt) + @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @sp=' ' end def read begin @md,@dal_array=@particulars.md,@particulars.dal_array SiSU_XML_Scaffold::Source::Scroll.new(@dal_array,@md).songsheet - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end diff --git a/lib/sisu/v3dv/xml_tables.rb b/lib/sisu/v3dv/xml_tables.rb index 1f154bda..7782bb88 100644 --- a/lib/sisu/v3dv/xml_tables.rb +++ b/lib/sisu/v3dv/xml_tables.rb @@ -63,22 +63,22 @@ module SiSU_Tables @@tablehead=0 @@tablefoot=[] #watch #bug??? #check was @@tablefoot def initialize(one,ocn='') - @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Env::Get_init.instance.skin + @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Env::GetInit.instance.skin end def table_split #% used but, no longer operational, revisit @new_content=[] @one.split(/\n/).each do |parablock| - table=Table_xml.new("#{parablock}\n") + table=TableXML.new("#{parablock}\n") @new_content << table.table end @new_content.join end end - class Table_xml /,1] @@ -122,11 +122,11 @@ module SiSU_Tables @parablock end end - class Table_xml_exp
diff --git a/lib/sisu/v3dv/zap.rb b/lib/sisu/v3dv/zap.rb index 3e967e32..9c9b61eb 100644 --- a/lib/sisu/v3dv/zap.rb +++ b/lib/sisu/v3dv/zap.rb @@ -63,12 +63,12 @@ module SiSU_Zap class Source def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns) @zap_path="#{@env.path.output}/#{@env.fnb}" - @zap=SiSU_Env::Clean_output.new(@opt) + @zap=SiSU_Env::CleanOutput.new(@opt) end def read - if SiSU_Env::Info_settings.new.permission?('zap') + if SiSU_Env::InfoSettings.new.permission?('zap') tell=SiSU_Screen::Ansi.new(@opt.cmd,"Clean files related to processing #{@opt.cmd} ->","#{@opt.fns} -> #{@zap_path}") @zap.zap.main_output @zap.zap.site_map -- cgit v1.2.3