aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/wikispeak.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/wikispeak.rb')
-rw-r--r--lib/sisu/v3/wikispeak.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/sisu/v3/wikispeak.rb b/lib/sisu/v3/wikispeak.rb
index a524981b..955432c0 100644
--- a/lib/sisu/v3/wikispeak.rb
+++ b/lib/sisu/v3/wikispeak.rb
@@ -76,7 +76,7 @@ module SiSU_Wikispeak
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} #{path}/#{@md.fnb}/#{@md.fn[:wiki]}"
@@ -85,13 +85,13 @@ 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::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
private
- class Split_text_object <Source
+ class SplitTextObject <Source
require_relative 'plaintext_format' # plaintext_format.rb
include Format
include SiSU_Viz
@@ -101,7 +101,7 @@ module SiSU_Wikispeak
def initialize(para)
@para=para
@format,@ocn='ordinary','ordinary'
- @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern
+ @dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern
end
def lev_segname_para_ocn
@text=nil
@@ -132,23 +132,23 @@ module SiSU_Wikispeak
end
format=@format.dup
@lev_para_ocn=if @para =~/.+#{Mx[:id_o]}~\d+;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{#Mx[:id_c]}$/
- Format::Format_text_object.new(format,@text,@ocn)
+ Format::FormatTextObject.new(format,@text,@ocn)
else
- Format::Format_text_object.new(format,@text,"#{Mx[:id_o]}~(\d+);[um]\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}")
+ Format::FormatTextObject.new(format,@text,"#{Mx[:id_o]}~(\d+);[um]\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}")
end
self
end
end
class Scroll <Source
require_relative 'shared_txt' # shared_txt.rb
- include SiSU_text_utils
+ include SiSU_TextUtils
@@endnotes_para=[]
@@wiki={ body: [], open: [], close: [], head: [], metadata: [], tail: [], endnotes: [] }
@@dp=nil
def initialize(data,md)
@data,@md=data,md
- @vz=SiSU_Env::Get_init.instance.skin
- @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern
+ @vz=SiSU_Env::GetInit.instance.skin
+ @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"
@@dostype='unix footnotes'
@@ -164,7 +164,7 @@ module SiSU_Wikispeak
@n=[]
end
def wiki_metadata(meta)
- util=SiSU_text_utils::Wrap.new(meta.text,70,15,1)
+ util=SiSU_TextUtils::Wrap.new(meta.text,70,15,1)
txt=util.line_wrap
@@wiki[:metadata] <<= if meta.type=='meta'
<<WOK
@@ -175,8 +175,8 @@ WOK
end
end
def wiki_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}"
@@ -227,7 +227,7 @@ WOK
end
def markup # Used for major markup instructions
data=@data
- dir=SiSU_Env::Info_env.new(@md.fns)
+ dir=SiSU_Env::InfoEnv.new(@md.fns)
@data_mod,@endnotes,@level,@cont,@copen,@wiki_contents_close=Array.new(6){[]}
(0..6).each { |x| @cont[x]=@level[x]=false }
(4..6).each { |x| @wiki_contents_close[x]='' }
@@ -257,16 +257,16 @@ WOK
para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\1"]')
wordlist=para.scan(/\S+/)
if para =~/^@(\S+?):\s+(.+?)\Z/m # for headers
- d_meta=SiSU_text_utils::Header_scan.new(@md,para).meta
+ d_meta=SiSU_TextUtils::HeaderScan.new(@md,para).meta
if d_meta; wiki_metadata(d_meta)
end
end
if para !~/(^@\S+?:|#{Mx[:br_endnotes]}|#{Mx[:br_eof]})/
if para =~@regx #/.+?<~\d+;\w\d+;\w\d+>.*/ #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 =~/<a name="n\d+">/ \
@@ -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
@@ -355,8 +355,8 @@ WOK
@content,@md=content,md
end
def wiki #%wiki output
- SiSU_Env::SiSU_file.new(@md).mkdir
- filename_wiki=SiSU_Env::SiSU_file.new(@md,@md.fn[:wiki]).mkfile
+ SiSU_Env::FileOp.new(@md).mkdir
+ filename_wiki=SiSU_Env::FileOp.new(@md,@md.fn[:wiki]).mkfile
@sisu=[]
@content.each do |para| # this is a hack
if para =~/^\S/