aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/plaintext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/plaintext.rb')
-rw-r--r--lib/sisu/v5/plaintext.rb37
1 files changed, 22 insertions, 15 deletions
diff --git a/lib/sisu/v5/plaintext.rb b/lib/sisu/v5/plaintext.rb
index 443b274b..f7c40d7a 100644
--- a/lib/sisu/v5/plaintext.rb
+++ b/lib/sisu/v5/plaintext.rb
@@ -65,7 +65,7 @@ module SiSU_Plaintext
require_relative 'sysenv' # sysenv.rb
include SiSU_Env
require_relative 'plaintext_format' # plaintext_format.rb
- include SiSU_PlaintextFormat
+ include SiSU_Plaintext_Format
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'shared_txt' # shared_txt.rb
include SiSU_Param
@@ -83,14 +83,21 @@ module SiSU_Plaintext
begin
md=SiSU_Param::Parameters.new(@opt).get
env=SiSU_Env::InfoEnv.new(@opt.fns)
- unless @opt.cmd =~/q/
- tool=(@opt.cmd =~/[MVv]/) \
+ unless @opt.act[:quiet][:set]==:on
+ tool=(@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
? "#{env.program.text_editor} #{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}"
: "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- @opt.cmd=~/[MVvz]/ \
- ? SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_hi_blue
- : SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}").flow if @opt.cmd =~/[MV]/
+ (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Plaintext',tool).green_hi_blue
+ : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Plaintext',tool).green_title_hi
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],@opt.fns,"#{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}").flow
+ end
end
dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
wrap_width=if defined? md.make.plaintext_wrap \
@@ -155,15 +162,15 @@ module SiSU_Plaintext
: (SiSU_TextUtils::Wrap.new(e.to_s,@wrap_width,1,1))
wrap=util.line_wrap
wrap=if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m
- wrap.gsub(/^(\s*)([\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB
+ wrap.gsub(/^(\s*)([\d*+]+)\s+(.+?)\s*\Z/m, <<-GSUB
\\1[\\2]: \\3
-GSUB
- )
+ GSUB
+ )
else
- wrap.gsub(/^(.+)\Z/m, <<GSUB
+ wrap.gsub(/^(.+)\Z/m, <<-GSUB
\\1
-GSUB
- )
+ GSUB
+ )
end
@@endnotes[:para] << "-#{wrap}"
@@endnotes[:end] << '' << wrap
@@ -336,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::ParagraphNumber.new(paranum)
+ # @p_num=SiSU_Plaintext_Format::ParagraphNumber.new(paranum)
#end
p_num=''
if @env.plaintext_ocn?
if defined? dob.ocn \
and dob.ocn.is_a?(Fixnum)
- p_num=SiSU_PlaintextFormat::ParagraphNumber.new(dob.ocn).display
+ p_num=SiSU_Plaintext_Format::ParagraphNumber.new(dob.ocn).display
end
end
if dob.is==:heading \