aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-10-03 00:19:18 -0400
committerRalph Amissah <ralph@amissah.com>2012-10-03 00:19:18 -0400
commit2099cce12c2ffb53023c3c644b329b235e442ae0 (patch)
treeec14544068e21b59c7bfd34e389344e3eaede296 /lib/sisu/v4
parentv4: defaults, some cleaning (diff)
v4: skins, remove
* remove skins * defaults, rename class Defaults (was InfoSkin) * sisupod, remove skin * db * no skin info to store, omitted from structure * change prefix name (structure changed)
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/composite.rb30
-rw-r--r--lib/sisu/v4/concordance.rb4
-rw-r--r--lib/sisu/v4/constants.rb5
-rw-r--r--lib/sisu/v4/css.rb2
-rw-r--r--lib/sisu/v4/dal_substitutions_and_insertions.rb9
-rw-r--r--lib/sisu/v4/dal_syntax.rb4
-rw-r--r--lib/sisu/v4/db_columns.rb69
-rw-r--r--lib/sisu/v4/db_create.rb6
-rw-r--r--lib/sisu/v4/db_load_tuple.rb6
-rw-r--r--lib/sisu/v4/defaults.rb6
-rw-r--r--lib/sisu/v4/digests.rb5
-rw-r--r--lib/sisu/v4/epub.rb7
-rw-r--r--lib/sisu/v4/epub_concordance.rb5
-rw-r--r--lib/sisu/v4/epub_format.rb10
-rw-r--r--lib/sisu/v4/epub_segments.rb2
-rw-r--r--lib/sisu/v4/epub_tune.rb4
-rw-r--r--lib/sisu/v4/git.rb50
-rw-r--r--lib/sisu/v4/harvest_authors.rb2
-rw-r--r--lib/sisu/v4/harvest_topics.rb2
-rw-r--r--lib/sisu/v4/html.rb7
-rw-r--r--lib/sisu/v4/html_format.rb8
-rw-r--r--lib/sisu/v4/html_promo.rb4
-rw-r--r--lib/sisu/v4/html_scroll.rb2
-rw-r--r--lib/sisu/v4/html_segments.rb2
-rw-r--r--lib/sisu/v4/html_tune.rb4
-rw-r--r--lib/sisu/v4/hub.rb1
-rw-r--r--lib/sisu/v4/manifest.rb5
-rw-r--r--lib/sisu/v4/manpage.rb8
-rw-r--r--lib/sisu/v4/manpage_format.rb2
-rw-r--r--lib/sisu/v4/odf.rb5
-rw-r--r--lib/sisu/v4/odf_format.rb4
-rw-r--r--lib/sisu/v4/param.rb21
-rw-r--r--lib/sisu/v4/plaintext.rb6
-rw-r--r--lib/sisu/v4/plaintext_format.rb2
-rw-r--r--lib/sisu/v4/po4a.rb8
-rw-r--r--lib/sisu/v4/po4a_set.rb1
-rw-r--r--lib/sisu/v4/qrcode.rb5
-rw-r--r--lib/sisu/v4/relaxng.rb3
-rw-r--r--lib/sisu/v4/remote.rb8
-rw-r--r--lib/sisu/v4/shared_html_lite.rb4
-rw-r--r--lib/sisu/v4/shared_images.rb36
-rw-r--r--lib/sisu/v4/shared_metadata.rb23
-rw-r--r--lib/sisu/v4/shared_sisupod_source.rb78
-rw-r--r--lib/sisu/v4/shared_txt.rb1
-rw-r--r--lib/sisu/v4/shared_xml.rb4
-rw-r--r--lib/sisu/v4/sisupod_make.rb12
-rw-r--r--lib/sisu/v4/sst_do_inline_footnotes.rb2
-rw-r--r--lib/sisu/v4/sst_to_s_xml_sax.rb2
-rw-r--r--lib/sisu/v4/sysenv.rb118
-rw-r--r--lib/sisu/v4/texinfo.rb4
-rw-r--r--lib/sisu/v4/texinfo_format.rb2
-rw-r--r--lib/sisu/v4/texpdf.rb5
-rw-r--r--lib/sisu/v4/texpdf_format.rb12
-rw-r--r--lib/sisu/v4/wikispeak.rb6
-rw-r--r--lib/sisu/v4/xhtml.rb2
-rw-r--r--lib/sisu/v4/xhtml_table.rb2
-rw-r--r--lib/sisu/v4/xml.rb2
-rw-r--r--lib/sisu/v4/xml_dom.rb2
-rw-r--r--lib/sisu/v4/xml_format.rb12
-rw-r--r--lib/sisu/v4/xml_tables.rb6
60 files changed, 110 insertions, 559 deletions
diff --git a/lib/sisu/v4/composite.rb b/lib/sisu/v4/composite.rb
index d73b0c73..2f58567b 100644
--- a/lib/sisu/v4/composite.rb
+++ b/lib/sisu/v4/composite.rb
@@ -83,21 +83,6 @@ module SiSU_Assemble
FileUtils::mkdir_p(output_path) unless FileTest.directory?(output_path)
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"
- FileUtils::mkdir_p(path) unless FileTest.directory?(path)
- download_from=doc_skin.shift
- doc_skin.each do |i|
- skin="#{path}/#{i}.rb"
- unless FileTest.exists?(skin)
- skinfile=File.new(skin,'w+')
- open("#{download_from}/#{i}.rb") do |g|
- skinfile << g.read
- end
- skinfile.close
- end
- end
- end
end
class Composite
@@imager={}
@@ -139,21 +124,6 @@ module SiSU_Assemble
end
end
end
- def download_doc_skin(doc_skin) #first element in array is source url
- path="#{@env.processing_path.processing}/external_document/skin/doc"
- FileUtils::mkdir_p(path) unless FileTest.directory?(path)
- download_from=doc_skin.shift
- doc_skin.each do |i|
- skin="#{path}/#{i}.rb"
- unless FileTest.exists?(skin)
- skinfile=File.new(skin,'w+')
- open("#{download_from}/#{i}.rb") do |g|
- skinfile << g.read
- end
- skinfile.close
- end
- end
- end
def insertion(fni,insert_array)
file={ prepared: [], images: [] }
rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
diff --git a/lib/sisu/v4/concordance.rb b/lib/sisu/v4/concordance.rb
index 15bd2dbe..f93fbd6a 100644
--- a/lib/sisu/v4/concordance.rb
+++ b/lib/sisu/v4/concordance.rb
@@ -112,9 +112,7 @@ module SiSU_Concordance
@particulars,@md=particulars,particulars.md
@data=SiSU_HTML::Source::HTML_Environment.new(particulars).tuned_file_instructions
@file=SiSU_Env::FileOp.new(@md)
- @vz=SiSU_Env::GetInit.new.skin
txt_path=%{#{@md.dir_out}}
- SiSU_Env::InfoSkin.new(@md).select
@fnb=@md.fnb
@lex_button=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="#{@file.path_rel_links.html_seg_2}_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
@doc_details =<<WOK
@@ -197,7 +195,6 @@ WOK
def initialize(particulars)
@particulars=particulars
begin
- @vz=SiSU_Env::GetInit.new.skin
@env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array
@file=SiSU_Env::FileOp.new(@md)
@freq=Hash.new(0)
@@ -366,7 +363,6 @@ WOK
end
# special cases endnotes and header levels 1 - 3
end
- credits=@vz.credits_sisu
@file_concordance << %{</div></body>\n</html>} # footer
SiSU_Screen::Ansi.new(@md.opt.cmd,@md.fns,"#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").flow if @md.opt.cmd =~/[MV]/
end
diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb
index fdb6b680..261756df 100644
--- a/lib/sisu/v4/constants.rb
+++ b/lib/sisu/v4/constants.rb
@@ -203,8 +203,8 @@ Ep={
f_opf: 'content.opf',
}
Db={
- name_prefix: "SiSU#{SiSU_version_dir}__",
- name_prefix_db: "sisu_#{SiSU_version_dir}__",
+ name_prefix: "SiSU#{SiSU_version_dir}a_",
+ name_prefix_db: "sisu_#{SiSU_version_dir}a_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
@@ -239,7 +239,6 @@ Gt={
audio: 'audio',
video: 'video',
conf: 'doc/_sisu',
- skin: 'doc/_sisu/skin', #Gt[:skin: 'conf/skin/doc'
}
DISABLE={
epub: {
diff --git a/lib/sisu/v4/css.rb b/lib/sisu/v4/css.rb
index 0b43edcc..52e2d997 100644
--- a/lib/sisu/v4/css.rb
+++ b/lib/sisu/v4/css.rb
@@ -152,7 +152,7 @@ module SiSU_Style
end
class CSS
def initialize
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def fonts
@vz.font_fonts
diff --git a/lib/sisu/v4/dal_substitutions_and_insertions.rb b/lib/sisu/v4/dal_substitutions_and_insertions.rb
index 8478b6e7..92e19034 100644
--- a/lib/sisu/v4/dal_substitutions_and_insertions.rb
+++ b/lib/sisu/v4/dal_substitutions_and_insertions.rb
@@ -59,7 +59,6 @@ module SiSU_DAL_SubstituteAndInsert
class SI
def initialize(md,data)
@md,@data=md,data
- @skin=SiSU_Env::InfoSkin.new(@md)
end
def substitutions_and_insertions?
data=@data
@@ -75,7 +74,6 @@ module SiSU_DAL_SubstituteAndInsert
data.each do |para|
if para =~/<:(insert\d+)!?>/ \
and para !~/^%\s+/
- @skin.select
ins=SiSU_Viz::Inserts.new
case para
when /^\s*<:(insert1)>\s*$/
@@ -83,49 +81,42 @@ module SiSU_DAL_SubstituteAndInsert
if defined? ins.insert1
para=[]
ins.insert1.split(/\n\n/).each {|x| para << x }
- else p "skin #{i} not found in #{@skin.select}"
end
when /^\s*<:(insert2)>\s*$/
i=$1
if defined? ins.insert2
para=[]
ins.insert2.split(/\n\n/).each {|x| para << x }
- else p "skin #{i} not found in #{@skin.select}"
end
when /^\s*<:(insert3)>\s*$/
i=$1
if defined? ins.insert3
para=[]
ins.insert3.split(/\n\n/).each {|x| para << x << "\n"}
- else p "skin #{i} not found in #{@skin.select}"
end
when /^\s*<:(insert4)>\s*$/
i=$1
if defined? ins.insert4
para=[]
ins.insert4.split(/\n\n/).each {|x| para << x << "\n"}
- else p "skin #{i} not found in #{@skin.select}"
end
when /^\s*<:(insert5)>\s*$/
i=$1
if defined? ins.insert5
para=[]
ins.insert5.split(/\n\n/).each {|x| para << x << "\n"}
- else p "skin #{i} not found in #{@skin.select}"
end
when /^\s*<:(insert6)>\s*$/
i=$1
if defined? ins.insert6
para=[]
ins.insert6.split(/\n\n/).each {|x| para << x << "\n"}
- else p "skin #{i} not found in #{@skin.select}"
end
when /^\s*<:(insert7)>\s*$/
i=$1
if defined? ins.insert7
para=[]
ins.insert7.split(/\n\n/).each {|x| para << x << "\n"}
- else p "skin #{i} not found in #{@skin.select}"
end
end
para.each {|x| data_expand << x }
diff --git a/lib/sisu/v4/dal_syntax.rb b/lib/sisu/v4/dal_syntax.rb
index 4a9dcbd4..fba2e765 100644
--- a/lib/sisu/v4/dal_syntax.rb
+++ b/lib/sisu/v4/dal_syntax.rb
@@ -64,7 +64,7 @@ module SiSU_DAL_Syntax
class Markup
def initialize(md='',data='')
@data,@md=data,md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@data_new=[]
url_and_stub=SiSU_Env::InfoEnv.new.url
@output_url="#{url_and_stub.remote}"
@@ -281,7 +281,7 @@ module SiSU_DAL_Syntax
and @md.make.bold[:regx] #document header: @bold: [bold word list]
w=w.gsub(@md.make.bold[:regx],"#{Mx[:fa_bold_o]}\\1#{Mx[:fa_bold_c]}")
elsif defined? @vz.markup_make_bold \
- and @vz.markup_make_bold #defaults and skin adjusted bold word list
+ and @vz.markup_make_bold #defaults adjusted bold word list
w=w.gsub(@vz.markup_make_bold,"#{Mx[:fa_bold_o]}\\1#{Mx[:fa_bold_c]}")
end
else
diff --git a/lib/sisu/v4/db_columns.rb b/lib/sisu/v4/db_columns.rb
index 7c4fa9eb..4e9b9089 100644
--- a/lib/sisu/v4/db_columns.rb
+++ b/lib/sisu/v4/db_columns.rb
@@ -1966,8 +1966,6 @@ module SiSU_DbColumns
end
=begin
#% misc
-@make:
- :skin:
@links:
=end
def fulltext
@@ -1990,73 +1988,6 @@ module SiSU_DbColumns
end
self
end
- def skin_name #check
- def name
- 'skin_name'
- end
- def create_column
- "#{name} VARCHAR(#{Db[:col_filename]}) NULL,"
- end
- def column_comment
- %{COMMENT ON COLUMN metadata_and_text.#{name}
- IS 'source text skin name';}
- end
- def tuple
- t=if defined? @md.skin_name \
- and @md.skin_name=~/\S+/
- txt=@md.skin_name
- txt=special_character_escape(txt)
- ["#{name}, ","'#{txt}', "]
- else ['','']
- end
- end
- self
- end
- def skin_fingerprint #check
- def name
- 'skin_fingerprint'
- end
- def create_column
- "#{name} VARCHAR(#{Db[:col_digest]}) NULL,"
- end
- def column_comment
- %{COMMENT ON COLUMN metadata_and_text.#{name}
- IS 'source text skin fingerprint';}
- end
- def tuple
- t=if defined? @md.dgst_skin \
- and @md.dgst_skin.is_a?(Array) \
- and @md.dgst_skin[1]=~/\S+/
- txt=@md.dgst_skin[1]
- txt=special_character_escape(txt)
- ["#{name}, ","'#{txt}', "]
- else ['','']
- end
- end
- self
- end
- def skin # you likely want a separate table for skins
- def name
- 'skin'
- end
- def create_column
- "#{name} TEXT NULL,"
- end
- def column_comment
- %{COMMENT ON COLUMN metadata_and_text.#{name}
- IS 'source text skin';}
- end
- def tuple
- t=if defined? @md.skin \
- and @md.skin=~/\S+/
- txt=@md.skin
- txt=special_character_escape(txt)
- ["#{name}, ","'#{txt}', "]
- else ['','']
- end
- end
- self
- end
def links
def name
'links'
diff --git a/lib/sisu/v4/db_create.rb b/lib/sisu/v4/db_create.rb
index e302a94f..64bf5763 100644
--- a/lib/sisu/v4/db_create.rb
+++ b/lib/sisu/v4/db_create.rb
@@ -191,9 +191,6 @@ module SiSU_DbCreate
#{column.src_txt.create_column}
/* misc */
#{column.fulltext.create_column}
- #{column.skin_name.create_column}
- #{column.skin_fingerprint.create_column}
- #{column.skin.create_column}
#{column.links.create_column.gsub(/,$/,'')}
/* subj VARCHAR(64) NULL, */
/* contact VARCHAR(100) NULL, */
@@ -449,9 +446,6 @@ module SiSU_DbCreate
%{#{column.src_word_count.column_comment}},
%{#{column.src_txt.column_comment}},
%{#{column.fulltext.column_comment}},
- %{#{column.skin_name.column_comment}},
- %{#{column.skin_fingerprint.column_comment}},
- %{#{column.skin.column_comment}},
%{#{column.links.column_comment}},
]
conn_execute_array(sql_arr)
diff --git a/lib/sisu/v4/db_load_tuple.rb b/lib/sisu/v4/db_load_tuple.rb
index f55ce66c..78fa987a 100644
--- a/lib/sisu/v4/db_load_tuple.rb
+++ b/lib/sisu/v4/db_load_tuple.rb
@@ -198,9 +198,6 @@ module SiSU_DbTuple
#{@tp.column.src_word_count.tuple[0]}
#{@tp.column.src_txt.tuple[0]}
#{@tp.column.fulltext.tuple[0]}
-#{@tp.column.skin_name.tuple[0]}
-#{@tp.column.skin_fingerprint.tuple[0]}
-#{@tp.column.skin.tuple[0]}
#{@tp.column.links.tuple[0]}
tid)
" +
@@ -283,9 +280,6 @@ tid)
#{@tp.column.src_word_count.tuple[1]}
#{@tp.column.src_txt.tuple[1]}
#{@tp.column.fulltext.tuple[1]}
-#{@tp.column.skin_name.tuple[1]}
-#{@tp.column.skin_fingerprint.tuple[1]}
-#{@tp.column.skin.tuple[1]}
#{@tp.column.links.tuple[1]}
#{@id}
);"
diff --git a/lib/sisu/v4/defaults.rb b/lib/sisu/v4/defaults.rb
index fbb7c8af..aa80c72b 100644
--- a/lib/sisu/v4/defaults.rb
+++ b/lib/sisu/v4/defaults.rb
@@ -62,7 +62,7 @@ module SiSU_Viz
include SiSU_Env
require_relative 'css' # css.rb
include SiSU_Style
- class Skin
+ class Defaults
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::InfoEnv.new
@@ -950,7 +950,7 @@ WOK
''
end
end
- class Home < Skin
+ class Home < Defaults
def initialize
@v=SiSU_Env::InfoVersion.instance.get_version
@dir=SiSU_Env::InfoEnv.new
@@ -1341,7 +1341,7 @@ WOK
end
class Inserts
end
- class TeX < Skin
+ class TeX < Defaults
def initialize(papersize='')
@papersize=papersize
end
diff --git a/lib/sisu/v4/digests.rb b/lib/sisu/v4/digests.rb
index 129b6b10..4bde7511 100644
--- a/lib/sisu/v4/digests.rb
+++ b/lib/sisu/v4/digests.rb
@@ -83,7 +83,6 @@ module SiSU_DigestView
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}").flow if @opt.cmd =~/[MV]/
end
SiSU_DigestView::Source::Scroll.new(@particulars).songsheet
- SiSU_Env::InfoSkin.new(@md).select
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
__LINE__.to_s + ':' + __FILE__
@@ -229,7 +228,7 @@ module SiSU_DigestView
end
else
prefix=''
- metad=[@tr.full_title,@tr.author,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Skin_Digest: ','Generated by: ','Ruby version: ']
+ metad=[@tr.full_title,@tr.author,@tr.translator,@tr.illustrator,@tr.prepared_by,@tr.digitized_by,@tr.description,@tr.subject,@tr.abstract,@tr.publisher,@tr.contributor,@tr.date_created,@tr.date_issued,@tr.date_available,@tr.date_modified,@tr.date_valid,@tr.date,@tr.type,@tr.format,@tr.rights,@tr.identifier,@tr.source,@tr.language,@tr.language_original,@tr.relation,@tr.coverage,@tr.keywords,@tr.comments,@tr.cls_loc,@tr.cls_dewey,@tr.cls_gutenberg,@tr.cls_isbn,@tr.prefix_a,@tr.prefix_b,@tr.sourcefile,@tr.sourcefile_digest,@tr.last_generated,@tr.sisu_version,@tr.ruby_version,@tr.sc_number,@tr.sc_date,'Generated by: ','Ruby version: ']
metad.each do |n|
m=rgx_txt(n)
if m=~/\S+/ \
@@ -257,8 +256,6 @@ module SiSU_DigestView
@c=/#{m_author}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
when /#{m_sourcefile_digest}.+?<u>/ #watch
dgst_extra="\n" + ' '*21 +'source' +' '*4 + @md.dgst[1] + ' '*34 + @md.fns
- when /Skin_Digest: /
- dgst_extra="\n" + ' '*21 + 'skin' +' '*6 + @md.dgst_skin[1] + ' '*34 + /(skin_\S+?\.rb)/.match(@md.dgst_skin[0])[1]
when /#{m_sisu_version}: /
@v=/#{m_sisu_version}: (.+?)#{Mx[:id_o]}~\d;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}[0-9a-f]{#{@dl}}:[0-9a-f]{#{@dl}}#{Mx[:id_c]}/.match(para)[1].gsub(/<\/?u>/,'').strip
when /#{m_last_generated}: /
diff --git a/lib/sisu/v4/epub.rb b/lib/sisu/v4/epub.rb
index 151d30f3..e8430aa5 100644
--- a/lib/sisu/v4/epub.rb
+++ b/lib/sisu/v4/epub.rb
@@ -95,7 +95,6 @@ module SiSU_EPUB
@env.processing_path.epub_bld #(@md)
@env.processing_path.epub_cp_images(@md)
dir_epub=@env.processing_path.epub
- SiSU_Env::InfoSkin.new(@md).select
data=nil
SiSU_Env::FileOp.new(@md).mkdir.output.epub
@tuned_file_array=SiSU_EPUB::Source::XHTML_Environment.new(@particulars).tuned_file_instructions
@@ -132,7 +131,7 @@ module SiSU_EPUB
def initialize(particulars)
@particulars=particulars
@md,@env=particulars.md,particulars.env
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@env,@css=particulars.env,SiSU_Style::CSS.new
end
def directories
@@ -187,7 +186,7 @@ module SiSU_EPUB
@@firstseg=nil
def initialize(md=nil,data='')
@md,@data=md,data
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@epub=SiSU_EPUB_Format::HeadInformation.new(@md)
@tell=SiSU_Screen::Ansi.new(@md.opt.cmd) if @md
@make=SiSU_Env::ProcessingSettings.new(@md)
@@ -478,7 +477,7 @@ module SiSU_EPUB
class ScrollHeadAndSegToc < Toc
def initialize(md='',toc='',links_guide_toc='')
@md,@toc,@links_guide_toc=md,toc,links_guide_toc
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def in_common
toc_shared=[]
diff --git a/lib/sisu/v4/epub_concordance.rb b/lib/sisu/v4/epub_concordance.rb
index f6efa076..e75fb1bf 100644
--- a/lib/sisu/v4/epub_concordance.rb
+++ b/lib/sisu/v4/epub_concordance.rb
@@ -99,9 +99,8 @@ module SiSU_EPUB_Concordance
def initialize(particulars)
@particulars,@md=particulars,particulars.md
@data=SiSU_EPUB::Source::XHTML_Environment.new(particulars).tuned_file_instructions
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
txt_path=%{#{@md.dir_out}}
- SiSU_Env::InfoSkin.new(@md).select
@fnb=@md.fnb
@lex_button=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="../_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
@doc_details =<<WOK
@@ -153,7 +152,7 @@ WOK
def initialize(particulars)
@particulars=particulars
begin
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array
@path="#{@env.processing_path.epub}"
@freq=Hash.new(0)
diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb
index 15028362..2889c7b1 100644
--- a/lib/sisu/v4/epub_format.rb
+++ b/lib/sisu/v4/epub_format.rb
@@ -61,7 +61,7 @@ module SiSU_EPUB_Format
def initialize(md,ocn)
@md,@ocn=md,ocn.to_s
@ocn ||=''
- vz=SiSU_Env::GetInit.new.skin
+ vz=SiSU_Viz::Defaults.new
end
def ocn_display
@make=SiSU_Env::ProcessingSettings.new(@md)
@@ -1223,7 +1223,7 @@ WOK
def initialize(md)
@md=md
# DublinCore 1 - title
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@css=SiSU_Env::CSS_Stylesheet.new(md)
@seg_name_xhtml=(SiSU_EPUB::Source::Seg.new.seg_name_xhtml || [])
@seg_name_xhtml_tracker=(SiSU_EPUB::Source::Seg.new.seg_name_xhtml_tracker || [])
@@ -1802,7 +1802,7 @@ WOK
end
end
class FormatTextObject
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
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
@@ -1846,7 +1846,7 @@ WOK
@txt=@txt.gsub(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'')
end
@p_num=ParagraphNumber.new(@md,@ocn)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def nametags_seg(dob) #FIX
tags=''
@@ -2049,7 +2049,7 @@ WOK
class FormatScroll < FormatTextObject
def initialize(md,txt)
super(md,txt)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
end
class FormatSeg < FormatTextObject
diff --git a/lib/sisu/v4/epub_segments.rb b/lib/sisu/v4/epub_segments.rb
index 8182690a..1261e228 100644
--- a/lib/sisu/v4/epub_segments.rb
+++ b/lib/sisu/v4/epub_segments.rb
@@ -128,7 +128,7 @@ WOK
attr_reader :seg_name_xhtml,:seg_name_xhtml_tracker
def initialize(md='',data='')
@md,@data=md,data
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@seg_name_xhtml=@@seg_name_xhtml || nil
@seg_name_xhtml_tracker=@@tracker || nil
@make=SiSU_Env::ProcessingSettings.new(@md) if @md
diff --git a/lib/sisu/v4/epub_tune.rb b/lib/sisu/v4/epub_tune.rb
index c98f6c52..e99216d5 100644
--- a/lib/sisu/v4/epub_tune.rb
+++ b/lib/sisu/v4/epub_tune.rb
@@ -196,11 +196,11 @@ module SiSU_EPUB_Tune
class Tune
def initialize(data,md)
@data,@md=data,md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@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
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
end
def songsheet
begin
diff --git a/lib/sisu/v4/git.rb b/lib/sisu/v4/git.rb
index 7c0d573a..50521fba 100644
--- a/lib/sisu/v4/git.rb
+++ b/lib/sisu/v4/git.rb
@@ -90,7 +90,6 @@ module SiSU_Git
po: git_path_fnb + '/' + Gt[:po] + '/' + lng,
pot: git_path_fnb + '/' + Gt[:pot],
conf: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:conf],
- skin: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:skin],
image: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:image],
audio: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:audio],
video: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:video],
@@ -127,7 +126,6 @@ module SiSU_Git
FileUtils::mkdir_p(@git_path[:po]) unless FileTest.directory?(@git_path[:po])
FileUtils::mkdir_p(@git_path[:pot]) unless FileTest.directory?(@git_path[:pot])
FileUtils::mkdir_p(@git_path[:conf]) unless FileTest.directory?(@git_path[:conf])
- FileUtils::mkdir_p(@git_path[:skin]) unless FileTest.directory?(@git_path[:skin])
FileUtils::mkdir_p(@git_path[:image]) unless FileTest.directory?(@git_path[:image])
#FileUtils::mkdir_p(@git_path[:audio]) unless FileTest.directory?(@git_path[:audio])
#FileUtils::mkdir_p(@git_path[:video]) unless FileTest.directory?(@git_path[:video])
@@ -197,56 +195,10 @@ module SiSU_Git
else "#{@env.path.pwd}/#{@opt.fns}"
end
end
- def locate_skin
- SiSU_Env::InfoSkin.new(@md).select
- end
def read_composite
#print __FILE__ + ':'
#p __LINE__
end
- def extract_skin
- #print __FILE__ + ':'
- #p __LINE__
- end
- def extract_skin_and_images #(parse_file)
- parse_file_name=locate_parse_file
- parse_file=IO.readlines(parse_file_name,'')
- rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
- #rgx_rb_image=/["'](\S+?\.(?:png|jpg|gif))["']/
- #rgx_rb_image=/[^\/]?([a-z]\S+?\.(?:png|jpg|gif))/
- rgx_rb_image=/([a-z][^ \/]+?\.(?:png|jpg|gif))/
- rgx_skin=/^\s+:skin:\s+(\S+)/
- skin_get=nil
- images=[]
- skin_get
- parse_file.each do |f| #% work area
- if f !~/^%+\s/
- skin_get ||= f.scan(rgx_skin).uniq.flatten if f =~rgx_skin
- if f =~rgx_image
- images << f.scan(rgx_image).uniq
- end
- end
- end
- skin=skin_get[0] if skin_get
- skin=locate_skin
- parse_skin=IO.readlines(skin,"\n")
- parse_skin.each do |f| #% work area
- if f !~/^#/ \
- and f =~rgx_rb_image
- images << f.scan(rgx_rb_image).uniq
- end
- end
- image_path="#{@env.path.pwd}/_sisu/image"
- images.flatten.each do |i|
- if FileTest.file?("#{image_path}/#{i}")
- FileUtils::cp_r("#{image_path}/#{i}",@git_path[:image])
- end
- end
- if FileTest.file?(skin)
- FileUtils::cp_r(skin,"#{@git_path[:conf]}/skin")
- end
- { skin: skin, images: images }
- end
def sisuyaml_rc
sisurc=@env.path.sisurc_path
if FileTest.file?(sisurc)
@@ -265,11 +217,9 @@ module SiSU_Git
if composite_src?
populate.copy_related_sst_ssi
end
- populate.extract_skin
#parse_file_name=locate_parse_file
#parse_file=IO.readlines(parse_file_name,'')
populate.sisuyaml_rc #(parse_file)
- populate.extract_skin_and_images #(parse_file)
#populate.extract_composite_source
#populate.read_composite # or read_each_composite
populate.identify_language_versions
diff --git a/lib/sisu/v4/harvest_authors.rb b/lib/sisu/v4/harvest_authors.rb
index ec2e014e..ef4b89c3 100644
--- a/lib/sisu/v4/harvest_authors.rb
+++ b/lib/sisu/v4/harvest_authors.rb
@@ -176,7 +176,7 @@ module SiSU_HarvestAuthors
@alphabet_list=%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]
@alph=@alphabet_list.dup
@letter=@alph.shift
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def html_file_open
@the_idx.keys.each do |lng|
diff --git a/lib/sisu/v4/harvest_topics.rb b/lib/sisu/v4/harvest_topics.rb
index f472fc0d..ac64c905 100644
--- a/lib/sisu/v4/harvest_topics.rb
+++ b/lib/sisu/v4/harvest_topics.rb
@@ -451,7 +451,7 @@ module SiSU_HarvestTopics
@alphabet_list=%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]
@alph=@alphabet_list.dup
@letter=@alph.shift
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def html_file_open
@the_idx.keys.each do |lng|
diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb
index d65a8ed3..f9162192 100644
--- a/lib/sisu/v4/html.rb
+++ b/lib/sisu/v4/html.rb
@@ -98,7 +98,6 @@ module SiSU_HTML
: SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Env::InfoSkin.new(@md).select
data=nil
@tuned_file_array=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
data=@tuned_file_array
@@ -138,7 +137,7 @@ module SiSU_HTML
def initialize(particulars)
@particulars=particulars
@md,@env=particulars.md,particulars.env
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@env,@css=particulars.env,SiSU_Style::CSS.new
end
def tuned_file_instructions
@@ -223,7 +222,7 @@ module SiSU_HTML
@@firstseg=nil
def initialize(md=nil,data='')
@data,@md=data,md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@tell=SiSU_Screen::Ansi.new(@md.opt.cmd) if @md
end
def songsheet #extracts toc for scroll & seg
@@ -515,7 +514,7 @@ WOK
class ScrollHeadAndSegToc < Toc
def initialize(md='',toc='',links_guide_toc='')
@md,@toc,@links_guide_toc=md,toc,links_guide_toc
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@make=SiSU_Env::ProcessingSettings.new(@md)
end
def in_common
diff --git a/lib/sisu/v4/html_format.rb b/lib/sisu/v4/html_format.rb
index eb39eead..3895c8a1 100644
--- a/lib/sisu/v4/html_format.rb
+++ b/lib/sisu/v4/html_format.rb
@@ -97,7 +97,7 @@ module SiSU_HTML_Format
def initialize(md)
@md=md
# DublinCore 1 - title
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || [])
@seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || [])
@metalink='#metadata'
@@ -861,7 +861,7 @@ WOK
end
end
class FormatTextObject
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
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
@@ -893,7 +893,7 @@ WOK
@txt=@txt.gsub(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'')
end
@p_num=ParagraphNumber.new(@md,@ocn)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@make=SiSU_Env::ProcessingSettings.new(@md)
end
def nametags_scroll(dob)
@@ -1141,7 +1141,7 @@ WOK
class FormatScroll < FormatTextObject
def initialize(md,txt)
super(md,txt)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
end
class FormatSeg < FormatTextObject
diff --git a/lib/sisu/v4/html_promo.rb b/lib/sisu/v4/html_promo.rb
index 2cde2a44..70e63335 100644
--- a/lib/sisu/v4/html_promo.rb
+++ b/lib/sisu/v4/html_promo.rb
@@ -64,7 +64,7 @@ module SiSU_HTML_Promo
@env=SiSU_Env::InfoEnv.new(@md.fns,@md)
@rc=SiSU_Env::GetInit.new.sisu_yaml.rc
@ad=SiSU_Env::GetInit.new.ads
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@flag=@env.widget.promo?
@make=SiSU_Env::ProcessingSettings.new(@md)
end
@@ -95,7 +95,7 @@ module SiSU_HTML_Promo
&& @flag[:ad]
ads=if @md.promo && @md.promo.length > 0 #promo set in document
promo_array=@md.promo
- elsif @flag[:sk] #promo set in associated skin
+ elsif @flag[:sk] #promo set
promo_array=@vz.widget_promo
elsif @flag[:rc] #promo set in rc file
promo_array=if @rc['html']['promo'].is_a?(String)
diff --git a/lib/sisu/v4/html_scroll.rb b/lib/sisu/v4/html_scroll.rb
index 6755fc9b..98f922b2 100644
--- a/lib/sisu/v4/html_scroll.rb
+++ b/lib/sisu/v4/html_scroll.rb
@@ -63,7 +63,7 @@ module SiSU_HTML_Scroll
class Scroll
def initialize(md='',data='',endnotes='')
@md,@data,@endnotes=md,data,endnotes
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def songsheet
begin
diff --git a/lib/sisu/v4/html_segments.rb b/lib/sisu/v4/html_segments.rb
index d41b77c7..97334023 100644
--- a/lib/sisu/v4/html_segments.rb
+++ b/lib/sisu/v4/html_segments.rb
@@ -149,7 +149,7 @@ 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::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@seg_name_html=@@seg_name_html || nil
@seg_name_html_tracker=@@tracker || nil
@env=SiSU_Env::InfoEnv.new(@md.fns) if @md
diff --git a/lib/sisu/v4/html_tune.rb b/lib/sisu/v4/html_tune.rb
index ea558540..9ad44443 100644
--- a/lib/sisu/v4/html_tune.rb
+++ b/lib/sisu/v4/html_tune.rb
@@ -197,11 +197,11 @@ module SiSU_HTML_Tune
class Tune
def initialize(data,md)
@data,@md=data,md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@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
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
end
def songsheet
begin
diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb
index 2e0fb92c..02762d4a 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -586,7 +586,6 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on
@retry_count= -1
begin
path_image='./_sisu/processing/external_document/image'
- path_skin='./_sisu/processing/external_document/skin/doc'
@get_s,@get_p,@get_pl=[],[],[]
re_s=/(\S+?\.-sst)$/
re_p3=/((?:https?|file):\/\/\S+?(?:\/\S+?\.ss[mt]\.txz|sisupod(?:\.txz)?|\.ssp))/
diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb
index 87798fdf..0c290204 100644
--- a/lib/sisu/v4/manifest.rb
+++ b/lib/sisu/v4/manifest.rb
@@ -79,7 +79,6 @@ module SiSU_Manifest
begin
@env=SiSU_Env::InfoEnv.new(@opt.fns)
@md=SiSU_Param::Parameters.new(@opt).get
- 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
@@ -121,7 +120,7 @@ module SiSU_Manifest
l=SiSU_Env::StandardiseLanguage.new(md.opt.lng).language
@language=l[:n]
@translate=SiSU_Translate::Source.new(md,@language)
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet
end
def output
@@ -771,7 +770,7 @@ WOK
begin
minitoc=SiSU_HTML_MiniToc::TocMini.new(@md,data).songsheet.join("\n")
id,file='',''
- vz=SiSU_Env::GetInit.new.skin
+ vz=SiSU_Viz::Defaults.new
search_form=if @f.build.search_form?
"<td>#{@env.widget_static.search_form}</td>"
else ''
diff --git a/lib/sisu/v4/manpage.rb b/lib/sisu/v4/manpage.rb
index 4d5e3144..4d293d92 100644
--- a/lib/sisu/v4/manpage.rb
+++ b/lib/sisu/v4/manpage.rb
@@ -92,7 +92,6 @@ 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::InfoSkin.new(@md).select #watch
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
__LINE__.to_s + ':' + __FILE__
@@ -108,8 +107,8 @@ module SiSU_Manpage
@@endnotes={ para: [], end: [] }
def initialize(md,data)
@md,@data=md,data
- @brace_url=SiSU_Viz::Skin.new.url_decoration
- @vz=SiSU_Env::GetInit.new.skin
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
+ @vz=SiSU_Viz::Defaults.new
@tab="\t"
@br="\n"
@@dostype='unix endnotes'
@@ -164,8 +163,7 @@ GSUB
@manpage[:metadata]=SiSU_Metadata::Summary.new(@md).manpage.metadata
end
def manpage_tail
- SiSU_Env::InfoSkin.new(@md).select
- vz=SiSU_Env::GetInit.new.skin
+ vz=SiSU_Viz::Defaults.new
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}"
diff --git a/lib/sisu/v4/manpage_format.rb b/lib/sisu/v4/manpage_format.rb
index 1f44b63b..57edaeb5 100644
--- a/lib/sisu/v4/manpage_format.rb
+++ b/lib/sisu/v4/manpage_format.rb
@@ -78,7 +78,7 @@ module SiSU_ManpageFormat
@md,@dob=md,dob
rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/
@dob.obj.gsub!(rgx,'\1') if @dob.obj =~rgx
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def scr_endnote_body
"<endnote>#{@dob.obj}</endnote> "
diff --git a/lib/sisu/v4/odf.rb b/lib/sisu/v4/odf.rb
index 4381bfc5..7e4e807c 100644
--- a/lib/sisu/v4/odf.rb
+++ b/lib/sisu/v4/odf.rb
@@ -88,7 +88,6 @@ 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::InfoSkin.new(@md).select
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
__LINE__.to_s + ':' + __FILE__
@@ -106,9 +105,9 @@ module SiSU_ODF
@@fns=nil
def initialize(particulars)
@md,@env,@dal_array=particulars.md,particulars.env,particulars.dal_array
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@tab="\t"
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@br=(@md.opt.cmd =~/M/) ? '' : ''
#@br=(@md.opt.cmd =~/M/) ? "\n" : ''
end
diff --git a/lib/sisu/v4/odf_format.rb b/lib/sisu/v4/odf_format.rb
index edde88ff..a12c09d0 100644
--- a/lib/sisu/v4/odf_format.rb
+++ b/lib/sisu/v4/odf_format.rb
@@ -135,7 +135,7 @@ module SiSU_ODF_Format
end
rgx=/#{Mx[:en_a_o]}\d+\s+(.+?)#{Mx[:en_a_c]}/
@txt=@txt.gsub(rgx,'\1') if @txt =~rgx
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def scr_endnote_body
"<endnote>#{@txt}</endnote> "
@@ -160,7 +160,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::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
if @md.fns != @@fns
@@table_counter=0
@@fns=@md.fns
diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb
index bffba529..d1b00cfc 100644
--- a/lib/sisu/v4/param.rb
+++ b/lib/sisu/v4/param.rb
@@ -949,9 +949,6 @@ module SiSU_Param
end
self
end
- def skin
- @h['skin']
- end
def promo
@h['promo']
end
@@ -1058,9 +1055,9 @@ module SiSU_Param
@doc={ lv: [] }
@doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','',''
@@publisher='SiSU scribe'
- attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy
+ attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy
def initialize(fns_array,opt)
- @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=nil
+ @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_tables=@vocabulary=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=nil
@data,@path,@fns,@fno,@opt=fns_array,opt.pth,opt.fns,opt.fno,opt #@data used as data
@flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=false,false,false,false,false,false,false
@seg_autoname_safe=true
@@ -1274,10 +1271,6 @@ module SiSU_Param
and @make.language[0]
@i18n=@make.language
end
- if defined? @make.skin \
- and @make.skin
- @doc_skin=@make.skin
- end
if defined? @make.manpage \
and @make.manpage
@man_section=(defined? @make.manpage.section) \
@@ -1487,20 +1480,15 @@ module SiSU_Param
fn=@opt.fno #decide what to do a filesize on .ssm tells very little about actual document size
@filesize=(File.size(fn)).to_s
if @sys.openssl !=false
- skin=@doc_skin \
- ? (SiSU_Env::InfoSkin.new(@opt,@doc_skin).select)
- : SiSU_Env::InfoSkin.new(@opt).select
- @dgst,@dgst_skin=[],[]
+ @dgst=[]
if @env.digest.type =~/sha256/
dgst=@sys.sha256(@env.source_file_with_path)
@dgst=dgst[1].length==64 ? dgst : nil
puts 'check document (sha256) digest' if not @dgst
- @dgst_skin=skin ? (@sys.sha256(skin)) : nil
else
dgst=@sys.md5(@env.source_file_with_path)
@dgst=dgst[1].length==32 ? dgst : nil
puts 'check document (md5) digest' if not @dgst
- @dgst_skin=skin ? (@sys.md5(skin)) : nil
end
end
@publisher ||= "#{@@publisher} (this copy)"
@@ -1623,9 +1611,6 @@ module SiSU_Param
@lv4 ||=/^4~/
@lv5 ||=/^5~/
@lv6 ||=/^6~/
- if @doc_skin
- SiSU_Screen::Ansi.new(@opt.cmd,"doc_skin <- #{@doc_skin}").txt_grey if @opt.cmd =~/v/
- end
@data=nil #else whole file's contents are stored in md pstore & is not required to be... big waste actually
@file=SiSU_Env::FileOp.new(self) #watch
Store.new(self,@env).store #% pstore
diff --git a/lib/sisu/v4/plaintext.rb b/lib/sisu/v4/plaintext.rb
index 9e5719b7..5ad35447 100644
--- a/lib/sisu/v4/plaintext.rb
+++ b/lib/sisu/v4/plaintext.rb
@@ -101,7 +101,6 @@ 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::InfoSkin.new(md).select #watch
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
__LINE__.to_s + ':' + __FILE__
@@ -118,7 +117,7 @@ module SiSU_Plaintext
def initialize(data,md,wrap_width)
@data,@md,@wrap_width=data,md,wrap_width
@env=SiSU_Env::InfoEnv.new(@md.fns)
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@tab="\t"
@@endnotes_=case md.opt.mod.inspect
when /--footnote/; false
@@ -188,9 +187,8 @@ WOK
end
end
def plaintext_tail
- SiSU_Env::InfoSkin.new(@md).select
# env=SiSU_Env::InfoEnv.new(@md.fns)
- vz=SiSU_Env::GetInit.new.skin
+ vz=SiSU_Viz::Defaults.new
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}"
diff --git a/lib/sisu/v4/plaintext_format.rb b/lib/sisu/v4/plaintext_format.rb
index d98511d2..745fa715 100644
--- a/lib/sisu/v4/plaintext_format.rb
+++ b/lib/sisu/v4/plaintext_format.rb
@@ -88,7 +88,7 @@ module SiSU_PlaintextFormat
@txt=@txt.gsub(rgx,'') if @txt =~rgx
rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/
@txt=@txt.gsub(rgx,'\1') if @txt =~rgx
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def scr_endnote_body
"<endnote>#{@txt}</endnote> "
diff --git a/lib/sisu/v4/po4a.rb b/lib/sisu/v4/po4a.rb
index 534569f5..0cda6475 100644
--- a/lib/sisu/v4/po4a.rb
+++ b/lib/sisu/v4/po4a.rb
@@ -149,7 +149,6 @@ 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::InfoSkin.new(md).select #watch
end
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
@@ -169,8 +168,8 @@ module SiSU_Po4a
@md=(md_trn.nil?) \
? md_src
: md_trn
- @brace_url=SiSU_Viz::Skin.new.url_decoration
- @vz=SiSU_Env::GetInit.new.skin
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
+ @vz=SiSU_Viz::Defaults.new
@tab="\t"
@@endnotes_=(@md.opt.mod.inspect =~/--endnote/) ? true : false # --footnote
@br=(@md.opt.mod.inspect =~/--dos/) ? "\r\n" : "\n" # --unix
@@ -327,7 +326,6 @@ GSUB
meta_src.processing_tags.make.bold,
meta_src.processing_tags.make.italics,
meta_src.processing_tags.make.texpdf_font,
- meta_src.processing_tags.make.skin,
'msgstr ""',
]
w.each do |y|
@@ -475,7 +473,6 @@ GSUB
meta_src.processing_tags.make.bold,
meta_src.processing_tags.make.italics,
meta_src.processing_tags.make.texpdf_font,
- meta_src.processing_tags.make.skin,
'msgstr ""',
meta_trn.processing_tags.make.language,
meta_trn.processing_tags.make.headings,
@@ -485,7 +482,6 @@ GSUB
meta_trn.processing_tags.make.bold,
meta_trn.processing_tags.make.italics,
meta_trn.processing_tags.make.texpdf_font,
- meta_trn.processing_tags.make.skin,
]
w.each do |y|
z=''
diff --git a/lib/sisu/v4/po4a_set.rb b/lib/sisu/v4/po4a_set.rb
index 0dcc25a9..020f521c 100644
--- a/lib/sisu/v4/po4a_set.rb
+++ b/lib/sisu/v4/po4a_set.rb
@@ -251,7 +251,6 @@ WOK
when /^#{Mx[:meta_o]}(bold)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
when /^#{Mx[:meta_o]}(italics|itali[sz]e)#{Mx[:meta_c]}\s*(.+?)$/; header('italicize',$2,'process','instruct')
when /^#{Mx[:meta_o]}(vocabulary|wordlist)#{Mx[:meta_c]}\s*(.+?)$/; header('vocabulary',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(skin)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
when /^#{Mx[:meta_o]}(css|stylesheet)#{Mx[:meta_c]}\s*(.+?)$/; header('css',$2,'process','instruct')
when /^#{Mx[:meta_o]}(links)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
when /^#{Mx[:meta_o]}(prefix)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct') #add a & b
diff --git a/lib/sisu/v4/qrcode.rb b/lib/sisu/v4/qrcode.rb
index 151b38d2..2db0cf62 100644
--- a/lib/sisu/v4/qrcode.rb
+++ b/lib/sisu/v4/qrcode.rb
@@ -77,7 +77,6 @@ module SiSU_QRcode
begin
@env=SiSU_Env::InfoEnv.new(@opt.fns)
@md=SiSU_Param::Parameters.new(@opt).get
- SiSU_Env::InfoSkin.new(@md).select
xbrowser=@env.program.web_browser
browser=@env.program.console_web_browser
unless @opt.cmd =~/q/
@@ -111,7 +110,7 @@ module SiSU_QRcode
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
@language=l[:n]
@translate=SiSU_Translate::Source.new(@md,@language)
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@f.make_path(@f.output_path.qrcode.dir)
end
def output_metadata
@@ -707,7 +706,7 @@ WOK
def check_output(data)
begin
id,file='',''
- vz=SiSU_Env::GetInit.new.skin
+ vz=SiSU_Viz::Defaults.new
@f=SiSU_Env::FileOp.new(@md) #.base_filename
url=@f.output_path.base.url
@en_manifest=if @env.output_dir_structure.by_language_code?
diff --git a/lib/sisu/v4/relaxng.rb b/lib/sisu/v4/relaxng.rb
index da40313d..f2ceec58 100644
--- a/lib/sisu/v4/relaxng.rb
+++ b/lib/sisu/v4/relaxng.rb
@@ -980,7 +980,6 @@ start =
| element links { text }
| element markup { text }
| element rights { text }
- | element skin { xsd:NCName }
| element subject { text }
| element title { text }
| element type { xsd:NCName }
@@ -1031,7 +1030,6 @@ start =
| element links { text }
| element markup { text }
| element rights { text }
- | element skin { xsd:NCName }
| element subject { text }
| element title { text }
| element type { xsd:NCName }
@@ -1104,7 +1102,6 @@ start =
| element links { text }
| element markup { text }
| element rights { text }
- | element skin { xsd:NCName }
| element subject { text }
| element title { text }
| element type { xsd:NCName }
diff --git a/lib/sisu/v4/remote.rb b/lib/sisu/v4/remote.rb
index c03dad7a..d593f44b 100644
--- a/lib/sisu/v4/remote.rb
+++ b/lib/sisu/v4/remote.rb
@@ -112,7 +112,6 @@ module SiSU_Remote
require 'pp'
require_relative 'composite' # composite.rb
@rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
- @rgx_skin=/@skin:\s+(\S+)/
threads=[]
for requested_page in @get_s
re_fnb=/((?:https?|file):\/\/[^\/ ]+?\/[^\/ ]+?)\/\S+?\/([^\/]+?)\.ss(t)/ #revisit and remove DO
@@ -121,14 +120,11 @@ module SiSU_Remote
raise "#{url} not found" unless f
base_uri,fnb,instr=re_fnb.match(url)[1..3] if re_fnb
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::RemoteImage.new.image(imagedir)
images=[]
- 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
if r !~/^%+\s/ \
and r =~@rgx_image
images << r.scan(@rgx_image).uniq
@@ -136,10 +132,6 @@ module SiSU_Remote
end
downloaded_file << r
end
- if skin \
- and skin.length > 0
- SiSU_Assemble::RemoteImage.new.download_doc_skin(skin)
- end
if images \
and images.length > 1
images=images.flatten.uniq
diff --git a/lib/sisu/v4/shared_html_lite.rb b/lib/sisu/v4/shared_html_lite.rb
index 8afb14c9..dfb98ad0 100644
--- a/lib/sisu/v4/shared_html_lite.rb
+++ b/lib/sisu/v4/shared_html_lite.rb
@@ -77,9 +77,9 @@ module SiSU_FormatShared
else @@hname
end
@tab="\t"
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@@tablehead,@@tablefoot=[],[]
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@env=SiSU_Env::InfoEnv.new(@md.fns)
@base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html"
end
diff --git a/lib/sisu/v4/shared_images.rb b/lib/sisu/v4/shared_images.rb
index e55f03ad..48fd81a6 100644
--- a/lib/sisu/v4/shared_images.rb
+++ b/lib/sisu/v4/shared_images.rb
@@ -73,9 +73,6 @@ module SiSU_Images
def songsheet
images_set.select_sisu_base
images_set.select_with_document
- if @md.opt.cmd =~/h/
- images_set.select_with_document_skin
- end
end
def images_set
@pwd=(/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1]
@@ -126,39 +123,6 @@ module SiSU_Images
dest=dest_path(:image)
copy(src_path,dest,images)
end
- def select_with_document_skin
- rgx_rb_image=/["']\S*?([a-zA-Z0-9_-]+?\.(?:png|jpg|gif))["']/
- skin_source=SiSU_Env::InfoSkin.new(@md).apply
- docskin=nil
- if skin_source \
- and skin_source[:type] == :dir
- docskin_with_path="#{docskin_place}/skin_#{@env.stub_pwd}.rb"
- docskin=[docskin_with_path.gsub(/.+?\/(skin_\S+?)\.rb/,'\1')]
- #docskin='skin_sisupod'
- end
- images=[]
- if skin_source \
- and skin_source[:name_path] #imperfect, revisit
- unless (skin_source[:name_path].nil? \
- or skin_source[:name_path].empty?)
- skinfile_array=IO.readlines(skin_source[:name_path],'')
- skinfile_array.each do |f| #% work area
- unless f =~/^%+ / #hmmm
- images << f.scan(rgx_rb_image).uniq if f =~rgx_rb_image
- #does not really discriminate, may duplicate images in sisu file, and may take images from default image pool
- end
- end
- end
- end
- src_path=unless @md.opt.f_pth[:pth] =~/\/\S+?\/sisupod\/\S+?\/sisupod\/doc/
- "#{@pwd}/_sisu/image"
- else #sisupod
- pt=/(\/\S+?\/sisupod\/\S+?\/sisupod)\/doc/.match(@md.opt.f_pth[:pth])[1]
- pt + '/image'
- end
- dest=dest_path(:image)
- copy(src_path,dest,images.flatten)
- end
def select_sisu_base
images=%w[arrow_next_red.png arrow_prev_red.png arrow_up_red.png dot_clear.png dot_white.png b_doc.png b_epub.png b_odf.png b_pdf.png b_toc.png]
src_path="#{@env.path.share}/image"
diff --git a/lib/sisu/v4/shared_metadata.rb b/lib/sisu/v4/shared_metadata.rb
index cd1e97db..32555776 100644
--- a/lib/sisu/v4/shared_metadata.rb
+++ b/lib/sisu/v4/shared_metadata.rb
@@ -263,11 +263,6 @@ module SiSU_Metadata
@tag,@inf,@class='Source Digest',"#{@md.dgst[0]} #{@md.dgst[1]}",'src'
meta << self.meta_para
end
- if defined? @md.dgst_skin \
- and @md.dgst_skin.is_a?(Array)
- @tag,@inf,@class='Skin Digest',"#{@md.dgst_skin[0]} #{@md.dgst_skin[1]}",'src'
- meta << self.meta_para
- end
if @display_heading
@tag,@inf=%{<b><u>Generated</u></b>},''
meta << self.meta_para
@@ -358,13 +353,6 @@ module SiSU_Metadata
else nil
end
end
- def skin
- if defined? @md.make.skin \
- and @md.make.skin
- ' :skin: ' + @md.make.skin
- else nil
- end
- end
self
end
self
@@ -907,7 +895,7 @@ WOK
end
def odf
def meta_para
- url_brace=SiSU_Viz::Skin.new.url_decoration
+ url_brace=SiSU_Viz::Defaults.new.url_decoration
if @inf.is_a?(String)
@inf=@inf.gsub(/</,'&lt;').gsub(/>/,'&gt;').
gsub(/&lt;br(?: \/)?&gt;/,'<br />')
@@ -1200,14 +1188,6 @@ WOK
tag,inf='Source Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\}\\-\\begin\{scriptsize\}#{dgst}\\end\{scriptsize\}"
meta << meta_para(tag,inf,false)
end
- if defined? @md.dgst_skin \
- and @md.dgst_skin.is_a?(Array)
- hash_of=spec_char(@md.dgst_skin[0])
- hash_of=word_break_points(hash_of)
- dgst=number_break_points(@md.dgst_skin[1])
- tag,inf='Skin Digest',"\\begin\{footnotesize\}#{hash_of}\\end\{footnotesize\}\\-\\begin\{scriptsize\}#{dgst}\\end\{scriptsize\}"
- meta << meta_para(tag,inf,false)
- end
meta << %{#{@br}\\begin\{bfseries\}Generated \\end\{bfseries\}}
if defined? @md.generated \
and @md.generated.is_a?(Time)
@@ -1324,7 +1304,6 @@ if @md.make
@md.make.emphasis,
@md.make.plaintext_wrap,
@md.make.texpdf_font,
- @md.make.skin,
@md.make.promo,
@md.make.ad,
@md.make.manpage
diff --git a/lib/sisu/v4/shared_sisupod_source.rb b/lib/sisu/v4/shared_sisupod_source.rb
index 18821e37..eede4e15 100644
--- a/lib/sisu/v4/shared_sisupod_source.rb
+++ b/lib/sisu/v4/shared_sisupod_source.rb
@@ -82,7 +82,6 @@ module SiSU_Source
po: path_pod + '/' + Gt[:po] + '/' + @opt.lng,
pot: path_pod + '/' + Gt[:pot],
conf: path_pod + '/' + Gt[:conf],
- skin: path_pod + '/' + Gt[:skin],
image: path_pod + '/' + Gt[:image],
audio: path_pod + '/' + Gt[:audio],
video: path_pod + '/' + Gt[:video],
@@ -102,32 +101,6 @@ module SiSU_Source
def directories
SiSU_Env::InfoEnv.new.sisupod_v3(@opt)
end
- def select_skin(skin='') #skin loading logic here
- load "#{SiSU_lib}/defaults.rb"
- @skin={}
- skin_path = [
- "#{@opt.base_path}/_sisu/skin",
- "#{@env.path.home}/.sisu/skin",
- '/etc/sisu/skin',
- "#{@path_pod[:pod]}/external_document/skin" #CHECK
- ]
- sk_doc,sk_dir="#{Gt[:doc]}/#{skin}.rb","dir/skin_#{@env.stub_pwd}.rb"
- skin_path.each do |v| #document skin priority 1
- if FileTest.file?("#{v}/#{sk_doc}")
- @skin={ name_path: "#{v}/#{sk_doc}", type: :doc }
- break
- end
- end
- unless @skin.length > 0
- skin_path.each do |v| #directory skin priority 2
- if FileTest.file?("#{v}/#{sk_dir}")
- @skin={ name_path: "#{v}/#{sk_dir}", type: :dir }
- break
- end
- end
- end
- @skin
- end
def images_extract(f,images) # consider using param info
rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m
if f !~/^%+\s/ \
@@ -140,14 +113,12 @@ module SiSU_Source
@pwd=Dir.pwd
@rgx_rb_image=/["']\S*?([a-zA-Z0-9_-]+?\.(?:png|jpg|gif))["']/
@rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
- @rgx_skin=/^\s+:skin:\s+(\S+)/
@rgx_doc_import=/^<<\s*(\S+?\.ss[ti])/
file_array=IO.readlines(@opt.fno,'')
- skin,images,doc_import=[],[],[]
+ images,doc_import=[],[]
doc_import_dir=@opt.sub_location
file_array.each do |f| #% work area
if f !~/^%+\s/
- skin << f.scan(@rgx_skin).uniq.flatten if f =~@rgx_skin
f=f.gsub(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image') # embedded symbol (image)
if f !~/^%+\s/ \
and f =~@rgx_image
@@ -170,41 +141,6 @@ module SiSU_Source
end
end
end
- docskin=nil
- if skin \
- and skin.length > 0
- docskin=skin.pop.flatten.join
- skin_source=select_skin(docskin)
- else
- skin_source=select_skin
- end
- docskin_place="#{@path_pod[:skin]}/#{skin_source[:type].to_s}"
- FileUtils::mkdir_p(docskin_place)
- if skin_source[:type] == :dir
- docskin_with_path="#{docskin_place}/skin_#{@env.stub_pwd}.rb"
- docskin=[docskin_with_path.gsub(/.+?\/(skin_\S+?)\.rb/,'\1')]
- docskin='skin_sisupod'
- end
- if skin_source \
- and skin_source[:name_path]
- unless skin_source[:name_path].nil? \
- or skin_source[:name_path].empty?
- if FileTest.file?(skin_source[:name_path])
- FileUtils::cp(skin_source[:name_path],"#{docskin_place}/#{docskin}.rb")
- skinfile_array=IO.readlines(skin_source[:name_path],'')
- para_images=[]
- skinfile_array.each do |f| #% work area
- unless f =~/^%+ / #hmmm
- images << f.scan(@rgx_rb_image).uniq if f =~@rgx_rb_image
- #does not really discriminate, may duplicate images in sisu file, and may take images from default image pool
- end
- end
- else STDERR.puts %{\t*WARN* did not find - "#{skin_source[:name_path]}" [#{__FILE__}:#{__LINE__}]}
- end
- end
- end
- #1. mapping in doc dir?
- #2. need images used by skin, scan skin??
if images \
and images.length > 1
images=images.flatten.uniq
@@ -317,8 +253,6 @@ question?: should you permit the packing of multiple documents
open @opt.fns, parse file
extract from file content:
images and copy each image from whatever image source to _sisu/sisupod/sisu/_sisu/image
- skin and copy active skin from whatever source to _sisu/sisupod/sisu/_sisu/skin/doc
- extract from skin images required by skin
remove previously existing contents of _/sisu/sisupod &
make directory structure:
@@ -332,8 +266,6 @@ v3 -->
fr/content.sst
_sisu
conf
- skin/
- doc [relevant skin if any other than default]
image (ln -s ../../image)
audio (ln -s ../../audio)
video (ln -s ../../video)
@@ -347,19 +279,11 @@ v2 -->
content.sst [file content]
filename.sst [link to content.sst]
_sisu/
- skin/
- doc [relevant skin if any other than default]
image/ [all images for specific document gathered here]
sisu
_sisu
sisurc.yml
- skin/
- dir/
- doc/
- misc/
- site/
- yaml/
convert/
standard_terms/
image
diff --git a/lib/sisu/v4/shared_txt.rb b/lib/sisu/v4/shared_txt.rb
index 228109c1..6876dabd 100644
--- a/lib/sisu/v4/shared_txt.rb
+++ b/lib/sisu/v4/shared_txt.rb
@@ -203,7 +203,6 @@ module SiSU_TextUtils
when /^#{Mx[:meta_o]}(bold)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
when /^#{Mx[:meta_o]}(italics|itali[sz]e)#{Mx[:meta_c]}\s*(.+?)$/; header('italicize',$2,'process','instruct')
when /^#{Mx[:meta_o]}(vocabulary|wordlist)#{Mx[:meta_c]}\s*(.+?)$/; header('vocabulary',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(skin)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
when /^#{Mx[:meta_o]}(css|stylesheet)#{Mx[:meta_c]}\s*(.+?)$/; header('css',$2,'process','instruct')
when /^#{Mx[:meta_o]}(links)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
when /^#{Mx[:meta_o]}(prefix)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct') #add a & b
diff --git a/lib/sisu/v4/shared_xml.rb b/lib/sisu/v4/shared_xml.rb
index 6c5b29ba..2886ae37 100644
--- a/lib/sisu/v4/shared_xml.rb
+++ b/lib/sisu/v4/shared_xml.rb
@@ -61,7 +61,7 @@ module SiSU_XML_Munge
@md=md
@sys=SiSU_Env::SystemCall.new
@dir=SiSU_Env::InfoEnv.new(@md.fns)
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
if @md.sem_tag
@ab ||=semantic_tags.default
end
@@ -646,7 +646,7 @@ module SiSU_XML_Tags #Format
end
content=meta_content_clean(@md.keywords)
@keywords=%{ <meta name="keywords" content="#{content}" />\n} if @md.keywords
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def meta_content_clean(content='')
content
diff --git a/lib/sisu/v4/sisupod_make.rb b/lib/sisu/v4/sisupod_make.rb
index 7b7957ab..bea6e775 100644
--- a/lib/sisu/v4/sisupod_make.rb
+++ b/lib/sisu/v4/sisupod_make.rb
@@ -102,8 +102,6 @@ question?: should you permit the packing of multiple documents
open @opt.fns, parse file
extract from file content:
images and copy each image from whatever image source to _sisu/sisupod/sisu/_sisu/image
- skin and copy active skin from whatever source to _sisu/sisupod/sisu/_sisu/skin/doc
- extract from skin images required by skin
remove previously existing contents of _/sisu/sisupod &
make directory structure:
@@ -117,8 +115,6 @@ v3 -->
fr/content.sst
_sisu
conf
- skin/
- doc [relevant skin if any other than default]
image (ln -s ../../image)
audio (ln -s ../../audio)
video (ln -s ../../video)
@@ -132,19 +128,11 @@ v2 -->
content.sst [file content]
filename.sst [link to content.sst]
_sisu/
- skin/
- doc [relevant skin if any other than default]
image/ [all images for specific document gathered here]
sisu
_sisu
sisurc.yml
- skin/
- dir/
- doc/
- misc/
- site/
- yaml/
convert/
standard_terms/
image
diff --git a/lib/sisu/v4/sst_do_inline_footnotes.rb b/lib/sisu/v4/sst_do_inline_footnotes.rb
index b30fa8d2..b395af55 100644
--- a/lib/sisu/v4/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v4/sst_do_inline_footnotes.rb
@@ -172,7 +172,6 @@ module SiSU_ConvertFootnotes
@md,@data=md,data
@@word_mode=[]
@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)
@@ -274,7 +273,6 @@ module SiSU_ConvertFootnotes
end
if para =~/<:insert\d+!?>/ \
and para !~/^%\s+/
- @skin.select
ins=SiSU_Viz::Inserts.new
case para
when /^\s*<:insert1>\s*$/
diff --git a/lib/sisu/v4/sst_to_s_xml_sax.rb b/lib/sisu/v4/sst_to_s_xml_sax.rb
index fc41aff1..18ad3955 100644
--- a/lib/sisu/v4/sst_to_s_xml_sax.rb
+++ b/lib/sisu/v4/sst_to_s_xml_sax.rb
@@ -139,7 +139,7 @@ module SiSU_SimpleXML_ModelSax
@@xml={ body: [], open: [], close: [], head: [] }
def initialize(data='',particulars='')
@data,@env,@md=data,particulars.env,particulars.md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@regx=/^(?:#{Mx[:mk_o]}:p[bn]#{Mx[:mk_c]}\s*)?(?:#{Mx[:lv_o]}[1-9]:(\S*)#{Mx[:lv_c]})?(.+)/
@tab="\t"
if @md
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index 286fa408..788c8780 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -266,7 +266,7 @@ module SiSU_Env
end
class GetInit < InfoSystemGen
@@noyaml=false
- @@rc,@@sisurc_path,@@vz,@@tx=nil,nil,nil,nil
+ @@rc,@@sisurc_path,@@tx=nil,nil,nil
@@ad={ promo: nil, promo_list: nil, flag_promo: false }
@@sdmd=nil
attr_accessor :yaml
@@ -279,9 +279,6 @@ module SiSU_Env
true
end
end
- def skin
- @@vz ||=SiSU_Viz::Skin.new
- end
def tex
@@tx ||=SiSU_Viz::TeX.new
end
@@ -993,6 +990,7 @@ module SiSU_Env
@@fb,@@man_path=nil,nil
def initialize(fns='',md=nil)
super() #you may not want to re-execute this static info so frequently!
+ @init=SiSU_Env::GetInit.new
@fns,@md=fns,md
@env=SiSU_Env::EnvCall.new(fns) if fns
fnb=if @md \
@@ -1393,7 +1391,7 @@ module SiSU_Env
def widget #needs (md) #move
@rc=SiSU_Env::GetInit.new.sisu_yaml.rc
@ad=SiSU_Env::GetInit.new.ads
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@flag={ ad: false, md: false, sk: false, rc: false }
def promo?
@flag[:ad]=if @md.flag_promo && @ad[:flag_promo]
@@ -1571,7 +1569,7 @@ WOK
end
def widget_static
@rc=SiSU_Env::GetInit.new.sisu_yaml.rc
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@flag={ ad: false, md: false, sk: false, rc: false }
def search?
flag=if defined? @rc['search'] \
@@ -1848,7 +1846,7 @@ WOK
defaults[:sample_data_path]
end
def rc
- @sys.rc_path
+ @init.rc_path
end
def yamlrc
GetInit.new.sisu_yaml.rc_path
@@ -3172,22 +3170,6 @@ WOK
end
self
end
- def images_from_skin
- skin=SiSU_Env::InfoSkin.new(@md).select
- skin_array=nil
- skin_images_array=[]
- if skin
- skin_array=IO.readlines(skin,"\n")
- skin_array.each do |l|
- if l !~/^#/
- if l =~/([a-z0-9._-]+\.(?:png|jpg|gif))/i
- skin_images_array << $1
- end
- end
- end
- end
- skin_images_array
- end
def rsync
@f=SiSU_Env::FileOp.new(@md)
def document
@@ -5648,58 +5630,6 @@ WOK
@editor,@wc,@tidy,@rexml,@pdflatex,@postgresql,@sqlite=prog.text_editor,prog.wc,prog.tidy,prog.rexml,prog.pdflatex,prog.postgresql,prog.sqlite
end
end
- class InfoSkin
- def initialize(md=nil,skin=nil)
- @md=md
- @d_sk=if skin.is_a?(String)
- skin
- elsif defined? md.doc_skin \
- and md.doc_skin
- md.doc_skin
- else nil
- end
- @home,@pwd=ENV['HOME'],Dir.pwd
- m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
- @pwd_stub=@pwd[m,1]
- @env=SiSU_Env::InfoEnv.new
- end
- def apply
- if @m.respond_to?(:make) \
- and @md.make.respond_to(:skin)
- skin_path=unless @md.opt.f_pth[:pth] =~/\/\S+?\/#{Gt[:sisupod]}\/\S+?\/#{Gt[:pod]}\/#{Gt[:doc]}/
- [
- "#{@env.path.pwd}/_sisu/skin",
- "#{@env.path.home}/.sisu/skin",
- '/etc/sisu/skin',
- "#{@env.processing_path.processing_sisupod(@md.opt)}/external_document/skin"
- ]
- else #sisupod
- pt=/(\/\S+?\/#{Gt[:sisupod]}\/\S+?\/#{Gt[:pod]}\/#{Gt[:doc]})/.match(@md.opt.f_pth[:pth])[1]
- [ "#{pt}/_sisu/skin" ]
- end
- sk_doc,sk_dir="doc/#{@md.make.skin}.rb","dir/skin_#{@env.stub_pwd}.rb"
- skin_path.each do |v| #document skin priority 1
- if FileTest.file?("#{v}/#{sk_doc}")
- @skin_apply={ name: @md.make.skin, name_path: "#{v}/#{sk_doc}", type: :doc }
- break
- end
- end
- unless @skin_apply.length > 0
- skin_path.each do |v| #directory skin priority 2
- if FileTest.file?("#{v}/#{sk_dir}")
- @skin_apply={ name: "skin_#{@env.stub_pwd}.rb", name_path: "#{v}/#{sk_dir}", type: :dir }
- break
- end
- end
- end
- else nil
- end
- @skin_apply
- end
- def select # skin loading logic here, removed
- nil
- end
- end
class CSS_Default
def html
'html.css'
@@ -5834,36 +5764,28 @@ WOK
def initialize(cmd)
@cmd=cmd
@env=SiSU_Env::InfoEnv.new
+ @init=SiSU_Env::GetInit.new
@home,@pwd=ENV['HOME'],ENV['PWD'] #@pwd=Dir.pwd
@rc=GetInit.new.sisu_yaml.rc
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@vz_home=SiSU_Viz::Home.new
end
def homepage
- home_pages_manually_created=nil
- @env.sys.rc_path.each do |v|
- home_pages_manually_created=Dir.glob("#{v}/home/*.html")
- if home_pages_manually_created.length > 0
- break
- end
- end
+ home_pages_manually_created=Dir.glob("#{@env.path.rc}/home/*.html")
FileUtils::mkdir_p("#{@env.path.webserv}/#{@env.path.stub_pwd}") unless FileTest.directory?("#{@env.path.webserv}/#{@env.path.stub_pwd}")
- if home_pages_manually_created
- FileUtils.cp(home_pages_manually_created,"#{@env.path.webserv}/#{@env.path.stub_pwd}")
- else
- doc_skin=nil
- sk_doc='doc/skin_sisu.rb'
- @env.sys.rc_path.each do |v| #document skin priority 1
- if FileTest.file?("#{v}/skin/#{sk_doc}")
- doc_skin="#{v}/skin/#{sk_doc}"
- load doc_skin
- break
- end
+ if home_pages_manually_created.length > 0
+ home_pages_manually_created.each do |homepage|
+ FileUtils.cp(homepage,"#{@env.path.webserv}/#{@env.path.stub_pwd}")
end
- filename_homepage=File.new("#{@env.path.webserv}/#{@env.path.stub_pwd}/index.html",'w')
- filename_homepage_toc=File.new("#{@env.path.webserv}/#{@env.path.stub_pwd}/toc.html",'w')
- filename_homepage << @vz_home.homepage
- filename_homepage_toc << @vz_home.homepage
+ else
+ filename_homepage="#{@env.path.webserv}/#{@env.path.stub_pwd}/index.html"
+ filename_home_toc="#{@env.path.webserv}/#{@env.path.stub_pwd}/toc.html"
+ file_homepage=File.new(filename_homepage,'w')
+ file_home_toc=File.new(filename_home_toc,'w')
+ file_homepage << @vz_home.homepage
+ file_home_toc << @vz_home.homepage
+ file_homepage.close
+ file_home_toc.close
end
end
def cp_images(src_path,dest_path)
diff --git a/lib/sisu/v4/texinfo.rb b/lib/sisu/v4/texinfo.rb
index 5305ceed..ef622025 100644
--- a/lib/sisu/v4/texinfo.rb
+++ b/lib/sisu/v4/texinfo.rb
@@ -78,7 +78,7 @@ module SiSU_TexInfo
@opt=opt
@md=SiSU_Param::Parameters.new(@opt).get
@env=SiSU_Env::InfoEnv.new(@opt.fns)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def directories
begin
@@ -134,7 +134,7 @@ module SiSU_TexInfo
def initialize(md,data)
@md,@data=md,data
@env=SiSU_Env::InfoEnv.new(@md.fns)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@f=SiSU_Env::FileOp.new(@md)
end
def songsheet
diff --git a/lib/sisu/v4/texinfo_format.rb b/lib/sisu/v4/texinfo_format.rb
index e79c3f38..09c54575 100644
--- a/lib/sisu/v4/texinfo_format.rb
+++ b/lib/sisu/v4/texinfo_format.rb
@@ -73,7 +73,7 @@ module SiSU_TexInfoFormat
p dob.class
p caller
end
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def head
t=Time.now
diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb
index 2c78ca61..c52b0641 100644
--- a/lib/sisu/v4/texpdf.rb
+++ b/lib/sisu/v4/texpdf.rb
@@ -116,7 +116,6 @@ 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::InfoSkin.new(@md).select
dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
SiSU_TeX::Source::LaTeXcreate.new(@particulars).songsheet
dal_array=''
@@ -290,9 +289,9 @@ module SiSU_TeX
@data=@particulars.dal_array # dal file drawn here
@st={ tex: {} }
@tex_ml=SiSU_TeX_Pdf::UseTeX.new(@md)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
@language=l[:n]
@translate=SiSU_Translate::Source.new(@md,@language)
diff --git a/lib/sisu/v4/texpdf_format.rb b/lib/sisu/v4/texpdf_format.rb
index 77723f85..d65067c3 100644
--- a/lib/sisu/v4/texpdf_format.rb
+++ b/lib/sisu/v4/texpdf_format.rb
@@ -61,7 +61,7 @@ module SiSU_TeX_Pdf
class BareUrls
def initialize(md,dob=nil)
@md,@dob=md,dob
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
end
def bare_urls
@dob.obj=@dob.obj.gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,
@@ -100,7 +100,7 @@ module SiSU_TeX_Pdf
end
@start_table=''
@tx=SiSU_Env::GetInit.new.tex
- @brace_rel=SiSU_Viz::Skin.new.rel_decoration
+ @brace_rel=SiSU_Viz::Defaults.new.rel_decoration
@env ||=SiSU_Env::InfoEnv.new(@md.fns)
@tex2pdf=@@tex3pdf ||=SiSU_Env::SystemCall.new.tex2pdf_engine
@make ||=SiSU_Env::ProcessingSettings.new(@md)
@@ -730,7 +730,7 @@ module SiSU_TeX_Pdf
p caller
end
@tx=SiSU_Env::GetInit.new.tex
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@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]
@@ -1141,7 +1141,7 @@ WOK
class SpecialCharacters
def initialize(md,str,is=:default)
@md,@txt,@is=md,str,is
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
@tex2pdf=@@tex3pdf ||=SiSU_Env::SystemCall.new.tex2pdf_engine
end
def xetex_code_listings(str,is=:default) # ~ ^ $ & % _ { } #LaTeX special characters - KEEP list
@@ -1384,10 +1384,10 @@ WOK
attr_accessor :url,:txt,:date
def initialize(md)
@md=md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@date=SiSU_Env::InfoDate.new # #{@date.year}
@copymark='{\\begin{footnotesize}\\raisebox{1ex}{\\copyright}\\end{footnotesize}}'
- @brace_url=SiSU_Viz::Skin.new.url_decoration
+ @brace_url=SiSU_Viz::Defaults.new.url_decoration
end
def skip
"\n\\vspace*{\\smallskipamount} \n"
diff --git a/lib/sisu/v4/wikispeak.rb b/lib/sisu/v4/wikispeak.rb
index 9ac6cc37..e67213f0 100644
--- a/lib/sisu/v4/wikispeak.rb
+++ b/lib/sisu/v4/wikispeak.rb
@@ -84,7 +84,6 @@ module SiSU_Wikispeak
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:wiki]}").flow if @opt.cmd =~/[MV]/
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
SiSU_Wikispeak::Source::Scroll.new(@dal_array,@md).songsheet
- SiSU_Env::InfoSkin.new(@md).select #watch
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do
__LINE__.to_s + ':' + __FILE__
@@ -149,7 +148,7 @@ module SiSU_Wikispeak
@@dp=nil
def initialize(data,md)
@data,@md=data,md
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern
@regx=/^(?:(?:#{Mx[:br_line]}\s*|#{Mx[:br_nl]}\s*)?#{Mx[:lv_o]}\d:(\S*?)#{Mx[:lv_c]}\s*)?(.+)/ #fix Mx[:lv_o] #m # 2004w18 pb pn removal added
@tab="\t"
@@ -177,8 +176,7 @@ WOK
end
end
def wiki_tail
- SiSU_Env::InfoSkin.new(@md).select
- vz=SiSU_Env::GetInit.new.skin
+ vz=SiSU_Viz::Defaults.new
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}"
diff --git a/lib/sisu/v4/xhtml.rb b/lib/sisu/v4/xhtml.rb
index f78466b7..df3f18a6 100644
--- a/lib/sisu/v4/xhtml.rb
+++ b/lib/sisu/v4/xhtml.rb
@@ -129,7 +129,7 @@ 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::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@tab="\t"
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
diff --git a/lib/sisu/v4/xhtml_table.rb b/lib/sisu/v4/xhtml_table.rb
index e6a470f5..991359fa 100644
--- a/lib/sisu/v4/xhtml_table.rb
+++ b/lib/sisu/v4/xhtml_table.rb
@@ -61,7 +61,7 @@ module SiSU_XHTML_Table
@@tablehead=0
@@tablefoot=[] #watch
def initialize(table)
- @table_obj,@vz=table,SiSU_Env::GetInit.new.skin
+ @table_obj,@vz=table,SiSU_Viz::Defaults.new
end
def table
table_obj=@table_obj
diff --git a/lib/sisu/v4/xml.rb b/lib/sisu/v4/xml.rb
index 4c6a7332..beccb393 100644
--- a/lib/sisu/v4/xml.rb
+++ b/lib/sisu/v4/xml.rb
@@ -128,7 +128,7 @@ module SiSU_XML_SAX
@@xml={ body: [], open: [], close: [], head: [] }
def initialize(particulars)
@env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
end
diff --git a/lib/sisu/v4/xml_dom.rb b/lib/sisu/v4/xml_dom.rb
index 80f7938a..d0d39dbe 100644
--- a/lib/sisu/v4/xml_dom.rb
+++ b/lib/sisu/v4/xml_dom.rb
@@ -127,7 +127,7 @@ 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::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
end
diff --git a/lib/sisu/v4/xml_format.rb b/lib/sisu/v4/xml_format.rb
index 50e90772..445fd45a 100644
--- a/lib/sisu/v4/xml_format.rb
+++ b/lib/sisu/v4/xml_format.rb
@@ -192,7 +192,7 @@ module SiSU_XML_Format
@copyright=%{<meta name="copyright" content="#{@md.rights.copyright.all}" />\n} if @md.rights.copyright.all # possibly redundant see dc.rights
@owner=%{<meta name="owner" content="#{@md.owner}" />\n} if @md.owner
@keywords=%{<meta name="keywords" content="#{@md.keywords}" />\n} if @md.keywords
- @vz=SiSU_Env::GetInit.new.skin #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php
+ @vz=SiSU_Viz::Defaults.new #margin,paragraph,table,banner,url,png,txt,color,font,nav_txt,nav_png,credits,js,php
@index='index'
end
def table_close
@@ -279,7 +279,7 @@ WOK
@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::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def scr_endnote_body
"<endnote>#{@txt}</endnote> "
@@ -357,7 +357,7 @@ WOK
@md=md
@rdf=SiSU_XML_Tags::RDF.new(md)
# DublinCore 1 - title
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
@stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet
@seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || [])
@seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || [])
@@ -973,7 +973,7 @@ WOK
end
end
class FormatTextObject
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
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
@@ -1019,7 +1019,7 @@ WOK
end
end
@dob=t_o if defined? t_o.is
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
def endnote_body
%{
@@ -1196,7 +1196,7 @@ WOK
class FormatScroll < FormatTextObject
def initialize(md,txt)
super(md,txt)
- @vz=SiSU_Env::GetInit.new.skin
+ @vz=SiSU_Viz::Defaults.new
end
end
class FormatSeg < FormatTextObject
diff --git a/lib/sisu/v4/xml_tables.rb b/lib/sisu/v4/xml_tables.rb
index edf2a6be..8f95024d 100644
--- a/lib/sisu/v4/xml_tables.rb
+++ b/lib/sisu/v4/xml_tables.rb
@@ -62,7 +62,7 @@ module SiSU_Tables
@@tablehead=0
@@tablefoot=[] #watch #bug??? #check was @@tablefoot
def initialize(one,ocn='')
- @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Env::GetInit.new.skin
+ @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Viz::Defaults.new
end
def table_split #% used but, no longer operational, revisit
@new_content=[]
@@ -77,7 +77,7 @@ module SiSU_Tables
@@tablehead=0
@@tablefoot=[]
def initialize(one,ocn='')
- @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Env::GetInit.new.skin
+ @one,@parablock,@ocn,@vz=one,one,ocn,SiSU_Viz::Defaults.new
end
def table
m=@parablock[/<!f(.+?)!>/,1]
@@ -121,7 +121,7 @@ module SiSU_Tables
@@tablehead=0
@@tablefoot=[]
def initialize(one)
- @one,@parablock,@vz=one,one,SiSU_Env::GetInit.new.skin
+ @one,@parablock,@vz=one,one,SiSU_Viz::Defaults.new
end
def table_head(inf)
%{<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">