aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-05-03 19:09:54 -0400
committerRalph Amissah <ralph@amissah.com>2010-05-03 19:09:54 -0400
commit67e49a2b278b1512fb39a33a779f68a1389f9849 (patch)
treeb53682f4508b7a2a4a0c3042592b4f9f53f83975 /lib
parentdal_numbering, heading auto-numbering, a fix (diff)
ansi, screen info related, arranging
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/cgi.rb3
-rw-r--r--lib/sisu/v2/cgi_pgsql.rb9
-rw-r--r--lib/sisu/v2/cgi_sqlite.rb6
-rw-r--r--lib/sisu/v2/composite.rb6
-rw-r--r--lib/sisu/v2/concordance.rb11
-rw-r--r--lib/sisu/v2/conf.rb18
-rw-r--r--lib/sisu/v2/dal.rb3
-rw-r--r--lib/sisu/v2/dal_images.rb9
-rw-r--r--lib/sisu/v2/db_create.rb2
-rw-r--r--lib/sisu/v2/db_import.rb10
-rw-r--r--lib/sisu/v2/db_remove.rb3
-rw-r--r--lib/sisu/v2/db_select.rb3
-rw-r--r--lib/sisu/v2/db_sqltxt.rb6
-rw-r--r--lib/sisu/v2/dbi.rb3
-rw-r--r--lib/sisu/v2/digests.rb12
-rw-r--r--lib/sisu/v2/epub.rb18
-rw-r--r--lib/sisu/v2/epub_concordance.rb9
-rw-r--r--lib/sisu/v2/epub_segments.rb4
-rw-r--r--lib/sisu/v2/epub_tune.rb4
-rw-r--r--lib/sisu/v2/help.rb3
-rw-r--r--lib/sisu/v2/html.rb18
-rw-r--r--lib/sisu/v2/html_minitoc.rb4
-rw-r--r--lib/sisu/v2/html_promo.rb3
-rw-r--r--lib/sisu/v2/html_segments.rb4
-rw-r--r--lib/sisu/v2/html_tune.rb4
-rw-r--r--lib/sisu/v2/hub.rb14
-rw-r--r--lib/sisu/v2/manifest.rb11
-rw-r--r--lib/sisu/v2/manpage.rb12
-rw-r--r--lib/sisu/v2/odf.rb12
-rw-r--r--lib/sisu/v2/options.rb3
-rw-r--r--lib/sisu/v2/param.rb45
-rw-r--r--lib/sisu/v2/plaintext.rb12
-rw-r--r--lib/sisu/v2/remote.rb24
-rw-r--r--lib/sisu/v2/rexml.rb9
-rw-r--r--lib/sisu/v2/share_src.rb4
-rw-r--r--lib/sisu/v2/share_src_kdissert.rb9
-rw-r--r--lib/sisu/v2/shared_markup_alt.rb3
-rw-r--r--lib/sisu/v2/sisupod_make.rb24
-rw-r--r--lib/sisu/v2/sitemaps.rb3
-rw-r--r--lib/sisu/v2/sst_do_inline_footnotes.rb9
-rw-r--r--lib/sisu/v2/sst_to_s_xml_sax.rb4
-rw-r--r--lib/sisu/v2/sysenv.rb21
-rw-r--r--lib/sisu/v2/texpdf.rb32
-rw-r--r--lib/sisu/v2/texpdf_format.rb18
-rw-r--r--lib/sisu/v2/update.rb3
-rw-r--r--lib/sisu/v2/urls.rb59
-rw-r--r--lib/sisu/v2/wikispeak.rb12
-rw-r--r--lib/sisu/v2/xhtml.rb18
-rw-r--r--lib/sisu/v2/xml.rb18
-rw-r--r--lib/sisu/v2/xml_dom.rb18
50 files changed, 207 insertions, 365 deletions
diff --git a/lib/sisu/v2/cgi.rb b/lib/sisu/v2/cgi.rb
index dbdc15e7..a375282f 100644
--- a/lib/sisu/v2/cgi.rb
+++ b/lib/sisu/v2/cgi.rb
@@ -74,8 +74,7 @@ module SiSU_CGI
For help on setting up hyperestraier for sisu, type:
sisu --help hyperestraier
}
- tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
- tell.print_grey
+ SiSU_Screen::Ansi.new(@opt.cmd,a).print_grey
end
def read
SiSU_CGI_sqlite::SiSU_search_sqlite.new(@opt,@webserv).sqlite
diff --git a/lib/sisu/v2/cgi_pgsql.rb b/lib/sisu/v2/cgi_pgsql.rb
index 071e63e4..7a948366 100644
--- a/lib/sisu/v2/cgi_pgsql.rb
+++ b/lib/sisu/v2/cgi_pgsql.rb
@@ -99,8 +99,7 @@ module SiSU_CGI_pgsql
a=%{ generated sisu_pgsql.cgi,
BASED ON ALREADY EXISTING directories that could potentially be used to populate postgresql db, (-D)
}
- tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
- tell.print_grey
+ SiSU_Screen::Ansi.new(@opt.cmd,a).print_grey
c=case @webserv
when /pwd/; ''
else "if necessary make the directory /usr/lib/cgi-bin :
@@ -112,12 +111,10 @@ module SiSU_CGI_pgsql
a=%{#{c}
#{@env.webserv_base_cgi}/cgi-bin/sisu_pgsql.cgi
}
- tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
- tell.warn
+ SiSU_Screen::Ansi.new(@opt.cmd,a).warn
a="postgresql db used for present directory: #{@db.psql.db}"
b="\n\t(to create and populate postgresql database see 'man sisu' and in particular the -D flag)\n\t[the database to be used for this directory (#{@db.psql.db}) will have to be created manually if it does not exist,\n\tsee 'sisu --help sql'\n\tif you have permission to create databases:\n\t'sisu -d --createdb'\n\tor using postgresql tools directly:\n\t'createdb #{@db.psql.db}'\n\tfor a list of existing databases try 'psql --list']"
- tell=SiSU_Screen::Ansi.new(@opt.cmd,a,b)
- tell.txt_cyan
+ SiSU_Screen::Ansi.new(@opt.cmd,a,b).txt_cyan
else puts 'failed in attempt to write sisu_pgsql.cgi to present directory, is directory writable?'
end
end
diff --git a/lib/sisu/v2/cgi_sqlite.rb b/lib/sisu/v2/cgi_sqlite.rb
index 860d7bed..5c20b072 100644
--- a/lib/sisu/v2/cgi_sqlite.rb
+++ b/lib/sisu/v2/cgi_sqlite.rb
@@ -100,8 +100,7 @@ module SiSU_CGI_sqlite
a=%{ generated sisu_sqlite.cgi,
BASED ON ALREADY CREATED sisu_sqlite.db OUTPUT, (-d)
}
- tell=SiSU_Screen::Ansi.new(@opt.cmd,a)
- tell.print_grey
+ SiSU_Screen::Ansi.new(@opt.cmd,a).print_grey
c=case @webserv
when /pwd/; ''
else "if necessary make the directory /usr/lib/cgi-bin :
@@ -113,8 +112,7 @@ module SiSU_CGI_sqlite
#{@env.webserv_base_cgi}/cgi-bin/sisu_sqlite.cgi
}
b='(to create and populate sisu sqlite database see "man sisu" and in particular the -d flag)'
- tell=SiSU_Screen::Ansi.new(@opt.cmd,a,b)
- tell.warn
+ SiSU_Screen::Ansi.new(@opt.cmd,a,b).warn
else puts 'failed in attempt to write sisu_sqlite.cgi to present directory, is directory writable?'
end
end
diff --git a/lib/sisu/v2/composite.rb b/lib/sisu/v2/composite.rb
index 1a4df738..44518957 100644
--- a/lib/sisu/v2/composite.rb
+++ b/lib/sisu/v2/composite.rb
@@ -186,16 +186,14 @@ module SiSU_Assemble
def insertions?
data=@fns_array
tuned_file,imagedir=[],[]
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',@opt.fns)
- tell.grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',@opt.fns).grey_title_hi unless @opt.cmd =~/q/
para=data.each do |para|
if para =~/^<<\s+(\S+?\.ss[it])$/ \
or para =~/^<<\{(\S+?\.ss[it])\}$/ \
or para =~/^(?:<<\s*)\|(\S+?)\|@\|.+?\|(?:req(?:quire)?\b|\s*\})?/ \
or para =~/^r\{(.+?)\}/ #depreciated
loadfile=$1.strip
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'loading:',loadfile)
- tell.txt_grey if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,'loading:',loadfile).txt_grey if @opt.cmd =~/[MVv]/
tuned_file << if loadfile =~ /(?:https?|file):\/\/\S+?\.ss[ti]$/ # and NetTest
imagedir = /((?:https?|file):\/\/\S+?)\/[^\/]+?\.ss[ti]$/.match(loadfile).captures.join + '/_sisu/image' #watch
require 'uri'
diff --git a/lib/sisu/v2/concordance.rb b/lib/sisu/v2/concordance.rb
index 3546b002..d8da2005 100644
--- a/lib/sisu/v2/concordance.rb
+++ b/lib/sisu/v2/concordance.rb
@@ -76,8 +76,8 @@ module SiSU_Concordance
begin
@env,@md=@particulars.env,@particulars.md
loc=@env.url.output_tell
- tool=(@md.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:concordance]}" : @md.fns
unless @md.cmd =~/q/
+ tool=(@md.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:concordance]}" : @md.fns
@md.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@md.cmd,"Concordance",tool).grey_title_hi \
: SiSU_Screen::Ansi.new(@md.cmd,'Concordance',tool).green_title_hi
@@ -87,12 +87,10 @@ module SiSU_Concordance
if @md.wc_words < wordmax
SiSU_Concordance::Source::Words.new(@particulars).songsheet
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})")
- tell.warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})").warn unless @md.cmd =~/q/
end
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words")
- tell.warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.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.cmd =~/q/
SiSU_Concordance::Source::Words.new(@particulars).songsheet
end
rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
@@ -334,8 +332,7 @@ WOK
end
credits=@vz.credits_sisu
@file_concordance << %{</div><div class="content">#{credits}<div></body>\n</html>} # footer
- tell=SiSU_Screen::Ansi.new(@md.cmd,@md.fns,"#{@env.path.output_tell}/#{@md.fn[:concordance]}")
- tell.flow if @md.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@md.cmd,@md.fns,"#{@env.path.output_tell}/#{@md.fn[:concordance]}").flow if @md.cmd =~/[MV]/
end
end
end
diff --git a/lib/sisu/v2/conf.rb b/lib/sisu/v2/conf.rb
index bb586aca..f3f978db 100644
--- a/lib/sisu/v2/conf.rb
+++ b/lib/sisu/v2/conf.rb
@@ -95,36 +95,30 @@ module SiSU_Initialize
@pwd,@home=Dir.pwd,@env.path.home
end
def make_homepage
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Make homepage','')
- tell.colorize unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'invert','Make homepage','').colorize unless @opt.cmd =~/q/
SiSU_Env::Create_site.new(@opt.cmd).homepage
end
def cp_local_images
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Copy images','')
- tell.colorize unless @opt.cmd =~/q/
+ 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
end
def cp_external_images
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Copy external images','')
- tell.colorize if @opt.cmd =~/V/
+ 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
end
def cp_webserver_images
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Copy webserver/output file images','')
- tell.colorize unless @opt.cmd =~/q/
+ 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
end
def css
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Configuring CSSs','')
- tell.colorize unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'invert','Configuring CSSs','').colorize unless @opt.cmd =~/q/
SiSU_Env::Create_site.new(@opt.cmd).cp_css
end
def dtd
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'invert','Configuring DTDs','')
- tell.colorize unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'invert','Configuring DTDs','').colorize unless @opt.cmd =~/q/
@rxng=SiSU_relaxng::RelaxNG.new
@path.each { |d| mkdir_p(d[1]) unless FileTest.directory?(d[1]) }
#ugly code, sort later
diff --git a/lib/sisu/v2/dal.rb b/lib/sisu/v2/dal.rb
index b0a9df5d..fd09f64e 100644
--- a/lib/sisu/v2/dal.rb
+++ b/lib/sisu/v2/dal.rb
@@ -228,8 +228,7 @@ module SiSU_DAL
dal=SiSU_DAL::Make.new(@md,file_array).song
if @opt.cmd =~/[vM]/
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"~meta/#{@opt.fns}.meta").output if @opt.cmd =~/v/i
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"dal -> #{@make_fns.meta}") if @opt.cmd =~/M/
- tell.txt_grey unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,"dal -> #{@make_fns.meta}").txt_grey if @opt.cmd =~/M/
end
dal.each{|s| dal_array << s}
dal_array
diff --git a/lib/sisu/v2/dal_images.rb b/lib/sisu/v2/dal_images.rb
index 1e474010..0b6d2b1e 100644
--- a/lib/sisu/v2/dal_images.rb
+++ b/lib/sisu/v2/dal_images.rb
@@ -76,8 +76,7 @@ module SiSU_images
end
else
if @md.cmd =~/[vVM]/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'use of RMagick is not enabled in sisurc.yml')
- tell.warn
+ SiSU_Screen::Ansi.new(@md.cmd,'use of RMagick is not enabled in sisurc.yml').warn
end
end
data.each do |dob|
@@ -102,8 +101,7 @@ module SiSU_images
img_col,img_row=img.columns,img.rows
else
if @md.cmd =~/[vVM]/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'RMagick not present, will attempt to use imagemagick (identify) directly')
- tell.warn
+ SiSU_Screen::Ansi.new(@md.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
@@ -140,8 +138,7 @@ module SiSU_images
end
else
images=dob.obj.scan(m) do |image|
- tell=SiSU_Screen::Ansi.new(@md.cmd,'where image dimensions have not been provided RMagick or imagemagick is required',image)
- tell.warn #unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'where image dimensions have not been provided RMagick or imagemagick is required',image).warn #unless @opt.cmd =~/q/
end
end
end
diff --git a/lib/sisu/v2/db_create.rb b/lib/sisu/v2/db_create.rb
index f6c2e50f..2676542e 100644
--- a/lib/sisu/v2/db_create.rb
+++ b/lib/sisu/v2/db_create.rb
@@ -83,7 +83,7 @@ module SiSU_DB_create
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 unless @opt.cmd =~/q/
+ 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
end
def output_dir?
diff --git a/lib/sisu/v2/db_import.rb b/lib/sisu/v2/db_import.rb
index 0e2db8e3..3b5c1cc9 100644
--- a/lib/sisu/v2/db_import.rb
+++ b/lib/sisu/v2/db_import.rb
@@ -118,10 +118,8 @@ module SiSU_DB_import
def marshal_load
require "#{SiSU_lib}/dal" # dal.rb
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{@db.psql.db}::#{@opt.fns}")
- tell.puts_blue unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Marshal Load',@fnc)
- tell.print_grey if @opt.cmd =~/v/
+ SiSU_Screen::Ansi.new(@opt.cmd,"#{@db.psql.db}::#{@opt.fns}").puts_blue if @opt.cmd =~/vVM/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Marshal Load',@fnc).puts_grey if @opt.cmd =~/v/
select_first_match=%{ SELECT metadata_and_text.tid FROM metadata_and_text WHERE metadata_and_text.src_filename = '#{@opt.fns}'; }
file_exist=@sql_type=~/sqlite/ \
? @conn.get_first_value(select_first_match) \
@@ -198,7 +196,7 @@ module SiSU_DB_import
def pf_db_import_transaction_close
end
def db_import_metadata #% import documents - populate database
- print %{ #{@cX.grey}import documents dbi_unit #{@cX.off} } unless @opt.cmd =~/q/
+ print %{ #{@cX.grey}import documents dbi_unit #{@cX.off} } if @opt.cmd =~/vVM/
@tp={}
@md=SiSU_Param::Parameters.new(@opt).get
#% sisutxt & fulltxt
@@ -230,7 +228,7 @@ module SiSU_DB_import
end
@@id_t =0 if @col[:lid].nil? or @col[:lid].to_s.empty?
@@id_t+=1 #bug related, needs to be performed once at start of file, but consider moving, as, placed here it means program will fail if document header lacks @title:
- puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} unless @opt.cmd =~/q/
+ puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} if @opt.cmd =~/vVM/
end
################ CLEAR ##############
SiSU_DB_DBI::Test.new(self,@opt).verify #% import title names, filenames (tuple)
diff --git a/lib/sisu/v2/db_remove.rb b/lib/sisu/v2/db_remove.rb
index 5a7f1244..364f5fc7 100644
--- a/lib/sisu/v2/db_remove.rb
+++ b/lib/sisu/v2/db_remove.rb
@@ -101,8 +101,7 @@ module SiSU_DB_remove
@file.puts sql_entry if @opt.cmd =~/M/
end
else
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"no such file in database #{@db.psql.db}::#{@opt.fns}")
- tell.puts_grey unless @opt.cmd =~/q/ #if @opt.cmd.include? ?v
+ SiSU_Screen::Ansi.new(@opt.cmd,"no such file in database #{@db.psql.db}::#{@opt.fns}").puts_grey if @opt.cmd =~/vVM/
end
end
end
diff --git a/lib/sisu/v2/db_select.rb b/lib/sisu/v2/db_select.rb
index 87452c5c..04d12acb 100644
--- a/lib/sisu/v2/db_select.rb
+++ b/lib/sisu/v2/db_select.rb
@@ -173,8 +173,7 @@ module SiSU_DB_select
db_exist?
@sdb_remove_doc.remove
@sdb_import.marshal_load
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"pgaccess or psql #{@db.psql.db} database?")
- tell.puts_grey if @opt.cmd =~/v/
+ SiSU_Screen::Ansi.new(@opt.cmd,"pgaccess or psql #{@db.psql.db} database?").puts_grey if @opt.cmd =~/v/
when /^--remove$/
db_exist?
@sdb_remove_doc.remove
diff --git a/lib/sisu/v2/db_sqltxt.rb b/lib/sisu/v2/db_sqltxt.rb
index 17a92683..e1fbed29 100644
--- a/lib/sisu/v2/db_sqltxt.rb
+++ b/lib/sisu/v2/db_sqltxt.rb
@@ -83,16 +83,14 @@ module SiSU_DB_text
and not @md.creator.author.empty?
s.gsub!(/@author/,@md.creator.author)
else
- tell=SiSU_Screen::Ansi.new('v','WARNING Document Author information missing; provide @creator: :author:',@md.fnb)
- tell.warn unless @md.cmd.inspect =~/q/
+ SiSU_Screen::Ansi.new('v','WARNING Document Author information missing; provide @creator: :author:',@md.fnb).warn unless @md.cmd.inspect =~/q/
end
if defined? @md.title \
and defined? @md.title.full \
and not @md.title.full.empty?
s.gsub!(/@title/,@md.title.full)
else
- tell=SiSU_Screen::Ansi.new('v','WARNING Document Title missing; provide @title:',@md.fnb)
- tell.warn unless @md.cmd.inspect =~/q/
+ SiSU_Screen::Ansi.new('v','WARNING Document Title missing; provide @title:',@md.fnb).warn unless @md.cmd.inspect =~/q/
end
end
s.gsub!(/^(?:_[1-9]\*?|_\*)\s+/m,'')
diff --git a/lib/sisu/v2/dbi.rb b/lib/sisu/v2/dbi.rb
index 7da0ae69..191d5099 100644
--- a/lib/sisu/v2/dbi.rb
+++ b/lib/sisu/v2/dbi.rb
@@ -126,8 +126,7 @@ module SiSU_DBI
when /pg/; read_psql
when /sqlite/; read_sqlite
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}")
- tell.dbi_title unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fns).dbi_title unless @opt.cmd =~/q/
begin
SiSU_DB_DBI::Case.new(@opt,@conn,@sql_type).cases
rescue
diff --git a/lib/sisu/v2/digests.rb b/lib/sisu/v2/digests.rb
index 3f1c5445..12052631 100644
--- a/lib/sisu/v2/digests.rb
+++ b/lib/sisu/v2/digests.rb
@@ -74,16 +74,15 @@ module SiSU_Digest_view
def read
begin
@env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array
- tool=if @opt.cmd =~/[MVv]/; "#{@env.program.text_editor} #{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ tool=(@opt.cmd =~/[MVv]/) \
+ ? "#{@env.program.text_editor} #{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}" \
+ : @opt.fns
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}").flow if @opt.cmd =~/[MV]/
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}")
- tell.flow if @opt.cmd =~/[MV]/
my_make=SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
SiSU_Digest_view::Source::Scroll.new(@particulars).songsheet
SiSU_Env::Info_skin.new(@md).select
@@ -199,8 +198,7 @@ module SiSU_Digest_view
elsif FileTest.file?("#{@env.path.image_source_tex}/#{i}")
@env.path.image_source_tex
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:", %{"#{i}" missing}, "search locations: #{@env.path.image_source_local_tex}, #{@env.path.image_source_remote_tex} and #{@env.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:", %{"#{i}" missing}, "search locations: #{@env.path.image_source_local_tex}, #{@env.path.image_source_remote_tex} and #{@env.path.image_source_tex}").error2 unless @md.cmd =~/q/
nil
end
@img << /\S+\.(png|jpg|gif)/.match(i)[1]
diff --git a/lib/sisu/v2/epub.rb b/lib/sisu/v2/epub.rb
index ecc30424..fa8b61ab 100644
--- a/lib/sisu/v2/epub.rb
+++ b/lib/sisu/v2/epub.rb
@@ -84,16 +84,16 @@ module SiSU_EPUB
@fnb=@md.fnb
@env=@particulars.env
loc=@env.path.url.output_tell
- tool=if @opt.cmd =~/z/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub"
- elsif @opt.cmd =~/[MVv]/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ tool=if @opt.cmd =~/z/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub"
+ elsif @opt.cmd =~/[MVv]/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub"
+ else @opt.fns
+ end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{loc}/epub/#{@fnb}.epub").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{loc}/epub/#{@fnb}.epub").flow if @opt.cmd =~/[MV]/
@env.path.epub_bld #(@md)
@env.path.epub_cp_images(@md)
dir_epub=@env.path.epub
@@ -199,9 +199,7 @@ module SiSU_EPUB
@tell=SiSU_Screen::Ansi.new(@md.cmd) if @md
end
def songsheet #extracts toc for scroll & seg
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/
toc=nil
@@firstseg=nil
@@toc={ :seg=>[],:seg_mini=>[],:scr=>[],:ncx=>[],:opf=>[] }
@@ -497,9 +495,7 @@ module SiSU_EPUB
def in_common
toc_shared=[]
segtoc=[]
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Scroll & Segtoc').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Scroll & Segtoc').txt_grey if @md.cmd =~/[MVv]/
format_head_toc=SiSU_EPUB_Format::Head_toc.new(@md)
dochead=format_head_toc.head
dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge
diff --git a/lib/sisu/v2/epub_concordance.rb b/lib/sisu/v2/epub_concordance.rb
index f90acf12..301d34a2 100644
--- a/lib/sisu/v2/epub_concordance.rb
+++ b/lib/sisu/v2/epub_concordance.rb
@@ -76,19 +76,16 @@ module SiSU_EPUB_Concordance
@env,@md=@particulars.env,@particulars.md
loc=@env.url.output_tell
tool=((@md.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:concordance]}" : '')
- tell=SiSU_Screen::Ansi.new(@md.cmd,"Concordance",tool)
- tell.grey_title_hi unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"Concordance",tool).grey_title_hi unless @md.cmd =~/q/
wordmax=@env.concord_max
unless @md.wc_words.nil?
if @md.wc_words < wordmax
SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})")
- tell.warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})").warn unless @md.cmd =~/q/
end
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words")
- tell.warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.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.cmd =~/q/
SiSU_EPUB_Concordance::Source::Words.new(@particulars).songsheet
end
rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
diff --git a/lib/sisu/v2/epub_segments.rb b/lib/sisu/v2/epub_segments.rb
index aa25b82a..35edf971 100644
--- a/lib/sisu/v2/epub_segments.rb
+++ b/lib/sisu/v2/epub_segments.rb
@@ -178,9 +178,7 @@ WOK
@@seg_name_xhtml=@@seg_name
@@seg_total=@@seg_name.length
testforartnum=@@seg_name_xhtml
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,@@seg_name.length) if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,@@seg_name.length) if @md.cmd =~/[MVv]/
map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags
data.each do |dob|
if defined? dob.obj \
diff --git a/lib/sisu/v2/epub_tune.rb b/lib/sisu/v2/epub_tune.rb
index 7e012f42..d49ac3c1 100644
--- a/lib/sisu/v2/epub_tune.rb
+++ b/lib/sisu/v2/epub_tune.rb
@@ -208,9 +208,7 @@ module SiSU_EPUB_Tune
def songsheet
begin
@cX=SiSU_Screen::Ansi.new(@md.cmd).cX
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Tune').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Tune').txt_grey if @md.cmd =~/[MVv]/
data=Tune.new(@data,@md).amp_html
data=Tune.new(data,@md).endnotes_html
data=Tune.new(data,@md).url_markup
diff --git a/lib/sisu/v2/help.rb b/lib/sisu/v2/help.rb
index 38f0a782..e8698fd0 100644
--- a/lib/sisu/v2/help.rb
+++ b/lib/sisu/v2/help.rb
@@ -911,8 +911,7 @@ WOK
version=SiSU_Env::Info_version.instance.get_version
rb_ver=SiSU_Env::Info_version.instance.rbversion
if version[:version]
- tell=SiSU_Screen::Ansi.new('-v',version[:project],version[:version],version[:date_stamp],version[:date],rb_ver)
- tell.version
+ SiSU_Screen::Ansi.new('-v',version[:project],version[:version],version[:date_stamp],version[:date],rb_ver).version
else puts 'SiSU version information not available'
end
end
diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb
index 7e9204fa..309297df 100644
--- a/lib/sisu/v2/html.rb
+++ b/lib/sisu/v2/html.rb
@@ -86,16 +86,16 @@ module SiSU_HTML
@fnb=@md.fnb
@env=@particulars.env
loc=@env.url.output_tell
- tool=if @opt.cmd =~/z/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}"
- elsif @opt.cmd =~/[MVv]/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ tool=if @opt.cmd =~/z/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}"
+ elsif @opt.cmd =~/[MVv]/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}"
+ else @opt.fns
+ end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@fnb}/#{@md.fn[:index]}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@fnb}/#{@md.fn[:index]}").flow if @opt.cmd =~/[MV]/
SiSU_Env::Info_skin.new(@md).select
data=nil
my_make=SiSU_Env::Create_file.new(@opt.cmd,@opt.fns,@md) #Beware #FIX opt and md, both not necessary
@@ -230,9 +230,7 @@ module SiSU_HTML
@tell=SiSU_Screen::Ansi.new(@md.cmd) if @md
end
def songsheet #extracts toc for scroll & seg
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/
toc=nil
@@firstseg=nil
@@toc={ :seg=>[],:seg_mini=>[],:scr=>[] }
@@ -509,9 +507,7 @@ WOK
def in_common
toc_shared=[]
@segtoc=[]
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Scroll & Segtoc').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Scroll & Segtoc').txt_grey if @md.cmd =~/[MVv]/
format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
dochead=format_head_toc.head
dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge
diff --git a/lib/sisu/v2/html_minitoc.rb b/lib/sisu/v2/html_minitoc.rb
index 1a8d6210..00b6e384 100644
--- a/lib/sisu/v2/html_minitoc.rb
+++ b/lib/sisu/v2/html_minitoc.rb
@@ -70,9 +70,7 @@
@tell=SiSU_Screen::Ansi.new(@md.cmd) if @md
end
def songsheet
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/
toc=nil
@toc=[]
@data.each do |txt|
diff --git a/lib/sisu/v2/html_promo.rb b/lib/sisu/v2/html_promo.rb
index df13393e..92ea15ec 100644
--- a/lib/sisu/v2/html_promo.rb
+++ b/lib/sisu/v2/html_promo.rb
@@ -405,8 +405,7 @@ WOK
end
end
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"category not found: #{category}")
- tell.warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"category not found: #{category}").warn unless @md.cmd =~/q/
end
adverts.join
end
diff --git a/lib/sisu/v2/html_segments.rb b/lib/sisu/v2/html_segments.rb
index 5c0a118c..83f9c5c9 100644
--- a/lib/sisu/v2/html_segments.rb
+++ b/lib/sisu/v2/html_segments.rb
@@ -162,9 +162,7 @@ module SiSU_HTML_seg
@@seg_name_html=@@seg_name
@@seg_total=@@seg_name.length
testforartnum=@@seg_name_html
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,@@seg_name.length).segmented if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,@@seg_name.length).segmented if @md.cmd =~/[MVv]/
map_nametags=SiSU_Particulars::Combined_singleton.instance.get_map_nametags(@md).nametags_map #p map_nametags
data.each do |dob|
if defined? dob.obj \
diff --git a/lib/sisu/v2/html_tune.rb b/lib/sisu/v2/html_tune.rb
index 65a60af7..c0efb72e 100644
--- a/lib/sisu/v2/html_tune.rb
+++ b/lib/sisu/v2/html_tune.rb
@@ -205,9 +205,7 @@ module SiSU_HTML_Tune
def songsheet
begin
@cX=SiSU_Screen::Ansi.new(@md.cmd).cX
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,'Tune').txt_grey if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,'Tune').txt_grey if @md.cmd =~/[MVv]/
data=Tune.new(@data,@md).endnotes_html
data=Tune.new(data,@md).url_markup
data=Tune.new(data,@md).markup
diff --git a/lib/sisu/v2/hub.rb b/lib/sisu/v2/hub.rb
index 36470fd1..bab13ed1 100644
--- a/lib/sisu/v2/hub.rb
+++ b/lib/sisu/v2/hub.rb
@@ -95,8 +95,7 @@ module SiSU
if fns =~ /sisupod(?:\.zip)?|\S+?(?:\.ss[mt]\.zip|\.ssp)$/
require "#{SiSU_lib}/remote" # remote.rb #check
pod_name=SiSU_Remote::Remote_download.new(fns).pod.name
- tell=SiSU_Screen::Ansi.new(@opt.cmd,pod_name)
- tell.puts_blue unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,pod_name).puts_blue unless @opt.cmd =~/q/
@opt.files.shift
pod_output(pod_name)
break
@@ -152,9 +151,7 @@ module SiSU
when /^dbi$/; SiSU_DBI::SiSU_SQL.new(@opt).connect # -D -d
end
@n_do=@n_do+1
- unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed").files_processed if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed").files_processed if @opt.cmd =~/[MVv]/
ObjectSpace.garbage_collect
else #print "not processed --> ", fns, "\n"
end
@@ -173,9 +170,7 @@ module SiSU
end
end
@n_do=@n_do+1
- unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed").files_processed if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed").files_processed if @opt.cmd =~/[MVv]/
end
else Operations.new(@opt).not_found
end
@@ -227,8 +222,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
def termsheet # -t
system("sisu_termsheet #{@opt.cmd} #{@opt.fns}\n")
@@n_do=@@n_do+1
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@@n_do,'Termsheet(s) processed')
- tell.term_sheet_title unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,@@n_do,'Termsheet(s) processed').term_sheet_title unless @opt.cmd =~/q/
end
def webrick # -W
port=prt=@fns
diff --git a/lib/sisu/v2/manifest.rb b/lib/sisu/v2/manifest.rb
index 829ce03b..c8dd3753 100644
--- a/lib/sisu/v2/manifest.rb
+++ b/lib/sisu/v2/manifest.rb
@@ -83,14 +83,13 @@ module SiSU_Manifest
xbrowser=@env.program.web_browser
browser=@env.program.console_web_browser
webserv_url=@env.path.url.output_tell
- url_html="#{webserv_url}/#{@md.fnb}/#{@md.fn[:manifest]}"
unless @opt.cmd =~/q/
+ url_html="#{webserv_url}/#{@md.fnb}/#{@md.fn[:manifest]}"
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',@opt.fns).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}")
- tell.grey_tab if @opt.cmd =~/v/i
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
@@ -137,8 +136,7 @@ module SiSU_Manifest
dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{@base_path_src}/#{file}")
else sys.md5("#{@base_path_src}/#{file}")
end
- tell=SiSU_Screen::Ansi.new(@md.cmd,"#{dgst[1]} #{file}")
- tell.warn if @md.cmd =~/[vVM]/
+ SiSU_Screen::Ansi.new(@md.cmd,"#{dgst[1]} #{file}").warn if @md.cmd =~/[vVM]/
size=(File.size("#{@base_path_src}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
@manifest[:txt] << "#{file} #{id} #{kb}\n"
@@ -150,8 +148,7 @@ module SiSU_Manifest
dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{@base_path_pod}/#{file}")
else sys.md5("#{@base_path_pod}/#{file}")
end
- tell=SiSU_Screen::Ansi.new(@md.cmd,"#{dgst[1]} #{file}")
- tell.warn if @md.cmd =~/[vVM]/
+ SiSU_Screen::Ansi.new(@md.cmd,"#{dgst[1]} #{file}").warn if @md.cmd =~/[vVM]/
size=(File.size("#{@base_path_pod}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
@manifest[:txt] << "#{file} #{id} #{kb}\n"
diff --git a/lib/sisu/v2/manpage.rb b/lib/sisu/v2/manpage.rb
index 89e0e3d7..48b22fd3 100644
--- a/lib/sisu/v2/manpage.rb
+++ b/lib/sisu/v2/manpage.rb
@@ -83,13 +83,11 @@ module SiSU_Manpage
@md=SiSU_Param::Parameters.new(@opt).get
@env=SiSU_Env::Info_env.new(@opt.fns)
path=@env.path.output_tell
- tool=if @opt.cmd =~/[MVv]/; "#{@env.program.text_editor} #{path}/man/#{@md.fn[:manpage]}"
- else ''
- end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Manpage',tool)
- tell.green_hi_blue unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/man/#{@md.fn[:manpage]}")
- tell.flow if @opt.cmd =~/[MV]/
+ tool=(@opt.cmd =~/[MVv]/) \
+ ? "#{@env.program.text_editor} #{path}/man/#{@md.fn[:manpage]}" \
+ : ''
+ SiSU_Screen::Ansi.new(@opt.cmd,'Manpage',tool).green_hi_blue unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/man/#{@md.fn[:manpage]}").flow if @opt.cmd =~/[MV]/
my_make=SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
SiSU_Manpage::Source::Scroll.new(@md,@dal_array).songsheet
diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb
index b6524876..dc8c90a8 100644
--- a/lib/sisu/v2/odf.rb
+++ b/lib/sisu/v2/odf.rb
@@ -84,16 +84,15 @@ module SiSU_ODF
@env.odf_structure
opendoc=@md.fn[:odf]
path=@env.path.output_tell
- tool=if @opt.cmd =~/[MVv]/; "#{@env.program.odf_viewer} #{path}/#{@md.fnb}/#{opendoc}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ tool=(@opt.cmd =~/[MVv]/) \
+ ? "#{@env.program.odf_viewer} #{path}/#{@md.fnb}/#{opendoc}" \
+ : @opt.fns
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{opendoc}").flow if @opt.cmd =~/[MV]/
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{opendoc}")
- tell.flow if @opt.cmd =~/[MV]/
my_make=SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
SiSU_ODF::Source::Scroll.new(@particulars).songsheet
SiSU_Env::Info_skin.new(@md).select
@@ -189,8 +188,7 @@ module SiSU_ODF
elsif FileTest.file?("#{@env.path.image_source_tex}/#{i}")
@env.path.image_source_tex
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{i}" missing},"search locations: #{@env.path.image_source_local_tex},#{@env.path.image_source_remote_tex} and #{@env.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{i}" missing},"search locations: #{@env.path.image_source_local_tex},#{@env.path.image_source_remote_tex} and #{@env.path.image_source_tex}").error2 unless @md.cmd =~/q/
nil
end
end
diff --git a/lib/sisu/v2/options.rb b/lib/sisu/v2/options.rb
index ddb0555e..77e56a47 100644
--- a/lib/sisu/v2/options.rb
+++ b/lib/sisu/v2/options.rb
@@ -149,8 +149,7 @@ module SiSU_commandline
and @mod.length==0 #% if no other action called on filename given, default is sisu -0 [filename(s)] configured as flag default
@cmd=shortcut.cf_0
end
- tell=SiSU_Screen::Ansi.new(@cmd,"\tsisu " + @cmd + ' ' + @mod.join(' ') + ' ' + @files.join(' ') + "\n")
- tell.print_brown if @cmd =~/[vVM]/
+ SiSU_Screen::Ansi.new(@cmd,"\tsisu " + @cmd + ' ' + @mod.join(' ') + ' ' + @files.join(' ') + "\n").print_brown if @cmd =~/[vVM]/
@files.uniq!
end
def cmd
diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb
index 5df8271e..3db97340 100644
--- a/lib/sisu/v2/param.rb
+++ b/lib/sisu/v2/param.rb
@@ -106,8 +106,7 @@ module SiSU_Param
@md
end
if defined? @md.title.main # on removal check problems with -U
- tell=SiSU_Screen::Ansi.new(@cmd,param_msg,@md.title.main)
- tell.txt_grey if @cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@cmd,param_msg,@md.title.main).txt_grey if @cmd =~/[MVv]/
end
@@md=@md
else @@md
@@ -162,8 +161,7 @@ module SiSU_Param
puts "#{n} is #{s.class}: programming error, String expected #{__FILE__}:#{__LINE__}"
s
else
- tell=SiSU_Screen::Ansi.new('v',"#{n} length #{s.length} exceeds set db field length #{l}, metadata dropped",@opt.fns)
- tell.warn unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new('v',"#{n} length #{s.length} exceeds set db field length #{l}, metadata dropped",@opt.fns).warn unless @opt.cmd =~/q/
nil
end
end
@@ -391,8 +389,7 @@ module SiSU_Param
elsif @h['main']
@h['main']
else
- tell=SiSU_Screen::Ansi.new(@cmd,'WARNING Document Copyright missing; provide @rights: :copyright:')
- tell.warn unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,'WARNING Document Copyright missing; provide @rights: :copyright:').warn unless @opt.cmd =~/q/
''
end
l,n=Db[:col_info_note],'rights.copyright.text'
@@ -459,8 +456,7 @@ module SiSU_Param
s +=' License: ' + copyright.license
end
if s.empty?
- tell=SiSU_Screen::Ansi.new(@cmd,'WARNING Document Rights information missing; provide @rights: :copyright:')
- tell.warn unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,'WARNING Document Rights information missing; provide @rights: :copyright:').warn unless @opt.cmd =~/q/
else
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
@@ -896,12 +892,10 @@ module SiSU_Param
if ok
tell.txt_green if @cmd =~/[vVM]/
else
- tell=SiSU_Screen::Ansi.new(@cmd,"Warning: markup version determined (#{@markup_version.determined}) or markup version declared (#{@markup_version_declared}) is newer than SiSU version (#{@sisu_version[:version]})")
- tell.warn unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,"Warning: markup version determined (#{@markup_version.determined}) or markup version declared (#{@markup_version_declared}) is newer than SiSU version (#{@sisu_version[:version]})").warn unless @cmd =~/q/
end
else
- tell=SiSU_Screen::Ansi.new(@cmd,'No SiSU markup version provided')
- tell.warn if @cmd =~/[VM]/
+ SiSU_Screen::Ansi.new(@cmd,'No SiSU markup version provided').warn if @cmd =~/[VM]/
end
else
mv=if defined? @markup_version.determined and not @markup_version.determined.nil?
@@ -909,8 +903,7 @@ module SiSU_Param
"markup version determined #{x}"
else ''
end
- tell=SiSU_Screen::Ansi.new(@cmd,'SiSU filetype indicator not provided',mv)
- tell.warn unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,'SiSU filetype indicator not provided',mv).warn unless @cmd =~/q/
end
@code_flag=false
fns_array.each do |para| #% Scan document
@@ -1035,8 +1028,7 @@ module SiSU_Param
@html_title=@title.gsub(/(<p>|<p \/>|<br>|<br \/>)/,'')
@title.chomp!("\n")
@html_title.chomp!("\n")
- tell=SiSU_Screen::Ansi.new(@cmd,'Parameters',@html_title)
- tell.txt_grey if @cmd =~/v/
+ SiSU_Screen::Ansi.new(@cmd,'Parameters',@html_title).txt_grey if @cmd =~/v/
end
end
end
@@ -1213,8 +1205,7 @@ module SiSU_Param
if @en[:note] > 0 \
and @en[:sum] > 0
if @en[:sum] > 0
- else tell=SiSU_Screen::Ansi.new(@cmd,'both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}")
- tell.warn if @cmd !~/q/
+ else SiSU_Screen::Ansi.new(@cmd,'both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn if @cmd !~/q/
end
end
if @en[:mark] != @en[:note] \
@@ -1225,12 +1216,10 @@ module SiSU_Param
footnote_conversion_errors << "#{@fns}:\n\tendnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} (difference = #{@en[:mismatch]})\n"
end
if @title.main !~/[\S]/
- tell=SiSU_Screen::Ansi.new(@cmd,'WARNING Document Title missing','please provide @title:')
- tell.warn unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,'WARNING Document Title missing','please provide @title:').warn unless @cmd =~/q/
end
if @author !~/[\S]/
- tell=SiSU_Screen::Ansi.new(@cmd,'Warning Document Author missing','please provide @creator: :author:')
- tell.warn unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,'Warning Document Author missing','please provide @creator: :author:').warn unless @cmd =~/q/
end
# Elementary Document Structure Analysis - adds complexity may remove - need to develop - appears to work, proof of concept
if @title.nil?
@@ -1244,10 +1233,8 @@ module SiSU_Param
@title.chomp!("\n")
@html_title.chomp!("\n")
title_trigger=1
- tell=SiSU_Screen::Ansi.new(@cmd,@html_title)
- tell.txt_cyan unless @cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@cmd,'Parameters')
- tell.txt_grey unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,@html_title).txt_cyan unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,'Parameters').txt_grey unless @cmd =~/q/
end
end
end
@@ -1315,8 +1302,7 @@ module SiSU_Param
@lv5 ||=/^5~/
@lv6 ||=/^6~/
if @doc_skin
- tell=SiSU_Screen::Ansi.new(@cmd,"doc_skin <- #{@doc_skin}")
- tell.txt_grey if @cmd =~/v/
+ SiSU_Screen::Ansi.new(@cmd,"doc_skin <- #{@doc_skin}").txt_grey if @cmd =~/v/
end
@data=nil #else whole file's contents are stored in md pstore & is not required to be... big waste actually
Store.new(self,@env).store #% pstore
@@ -1330,8 +1316,7 @@ module SiSU_Param
end
def store
File.unlink(@pstorefile) if FileTest.file?(@pstorefile)
- tell=SiSU_Screen::Ansi.new(@md.cmd,"PStore -> #{@pstorefile}")
- tell.txt_grey if @md.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@md.cmd,"PStore -> #{@pstorefile}").txt_grey if @md.cmd =~/[MV]/
store=PStore.new(@pstorefile)
store.transaction do
store['md']=@md
diff --git a/lib/sisu/v2/plaintext.rb b/lib/sisu/v2/plaintext.rb
index 09e94392..a57339f4 100644
--- a/lib/sisu/v2/plaintext.rb
+++ b/lib/sisu/v2/plaintext.rb
@@ -81,17 +81,16 @@ module SiSU_Plaintext
begin
md=SiSU_Param::Parameters.new(@opt).get
env=SiSU_Env::Info_env.new(@opt.fns)
- path=env.path.output_tell
- tool=if @opt.cmd =~/[MVv]/; "#{env.program.text_editor} #{path}/#{md.fnb}/#{md.fn[:plain]}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ path=env.path.output_tell
+ tool=(@opt.cmd =~/[MVv]/) \
+ ? "#{env.program.text_editor} #{path}/#{md.fnb}/#{md.fn[:plain]}" \
+ : @opt.fns
@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,"#{path}/#{md.fnb}/#{md.fn[:plain]}").flow if @opt.cmd =~/[MV]/
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{env.path.output_tell}/#{md.fnb}/#{md.fn[:plain]}")
- tell.flow if @opt.cmd =~/[MV]/
my_make=SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
wrap_width=if defined? md.make.plaintext_wrap \
@@ -371,7 +370,6 @@ WOK
content << "#{@br}#{divider*@wrap_width}#{@br}"
content << plaintext[:metadata]
content << "#{@br}#{divider*@wrap_width}#{@br}" if @md.stmp =~/\w+/ #not used?
- content << plaintext[:owner_details] if @md.stmp =~/\w+/ #not used?
content << plaintext[:tail]
Output.new(content,@md).plaintext
@@endnotes={ :para=>[],:end=>[] }
diff --git a/lib/sisu/v2/remote.rb b/lib/sisu/v2/remote.rb
index b46202b7..4efe1770 100644
--- a/lib/sisu/v2/remote.rb
+++ b/lib/sisu/v2/remote.rb
@@ -70,43 +70,35 @@ module SiSU_Remote
@remote=SiSU_Env::Info_remote.new(@opt)
end
def rsync
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put).dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync
end
def rsync_base
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync').dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync_base
end
def rsync_base_sync
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync and sync')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync and sync').dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync_base_sync
end
def rsync_sitemaps
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement sitemaps ->','rsync')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement sitemaps ->','rsync').dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync_sitemaps
end
def rsync_harvest
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement metadata harvest ->','rsync_harvest')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement metadata harvest ->','rsync_harvest').dark_grey_title_hi unless @opt.cmd =~/q/
@remote.rsync_harvest
end
def scp
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put)
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put).dark_grey_title_hi unless @opt.cmd =~/q/
@remote.scp
end
def scp_base
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement of base site ->','excluding images')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement of base site ->','excluding images').dark_grey_title_hi unless @opt.cmd =~/q/
@remote.scp_base
end
def scp_base_all
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','complete')
- tell.dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','complete').dark_grey_title_hi unless @opt.cmd =~/q/
@remote.scp_base_all
end
end
diff --git a/lib/sisu/v2/rexml.rb b/lib/sisu/v2/rexml.rb
index 082e99d3..dc599e64 100644
--- a/lib/sisu/v2/rexml.rb
+++ b/lib/sisu/v2/rexml.rb
@@ -90,12 +90,10 @@ module SiSU_Rexml
xmlfile=IO.readlines(@fnap,'').join
begin
@xmldoc=REXML::Document.new xmlfile
- tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','REXML',"XML document #{@fnap} loaded") #% tell
- tell.colorize unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'invert','REXML',"XML document #{@fnap} loaded").colorize unless @md.cmd =~/q/ #% tell
if @md.cmd =~ /v/i #% substantive text
@xmldoc.elements.each(@e_head) do |e|
- tell=SiSU_Screen::Ansi.new(@md.cmd,'brown',e)
- tell.colorize unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'brown',e).colorize unless @md.cmd =~/q/
end
end
rescue REXML::ParseException
@@ -103,8 +101,7 @@ module SiSU_Rexml
end
end
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,'fuschia',"File Not Found #{xmlfile}",'requested XML processing skipped')
- tell.colorize unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'fuschia',"File Not Found #{xmlfile}",'requested XML processing skipped').colorize unless @md.cmd =~/q/
exit
end
rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
diff --git a/lib/sisu/v2/share_src.rb b/lib/sisu/v2/share_src.rb
index 9ea2fac0..5c5576f3 100644
--- a/lib/sisu/v2/share_src.rb
+++ b/lib/sisu/v2/share_src.rb
@@ -88,9 +88,7 @@ module SiSU_Markup
end
end
else
- unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fns} -> #{@output_path}").warn if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fns} -> #{@output_path}").warn if @opt.cmd =~/[MVv]/
exit
end
end
diff --git a/lib/sisu/v2/share_src_kdissert.rb b/lib/sisu/v2/share_src_kdissert.rb
index 6b4ece9c..4c37f3ff 100644
--- a/lib/sisu/v2/share_src_kdissert.rb
+++ b/lib/sisu/v2/share_src_kdissert.rb
@@ -69,10 +69,8 @@ module SiSU_Kdi_source
@output_path="#{@env.path.output}/#{@opt.fnb}"
end
def read
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Share Kdissert Source Document!',@opt.fnb)
- tell.green_hi_blue unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"Copy kdissert file to output directory","#{@opt.fnb} -> #{@output_path}")
- tell.warn unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Share Kdissert Source Document!',@opt.fnb).green_hi_blue unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,"Copy kdissert file to output directory","#{@opt.fnb} -> #{@output_path}").warn unless @opt.cmd =~/q/
mkdir_p(@env.path.output) unless FileTest.directory?(@env.path.output)
mkdir_p(@output_path) unless FileTest.directory?(@output_path)
if FileTest.directory?(@output_path)
@@ -81,8 +79,7 @@ module SiSU_Kdi_source
cp(@opt.fnb,@output_path)
end
else
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fnb} -> #{@output_path}")
- tell.warn unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fnb} -> #{@output_path}").warn unless @opt.cmd =~/q/
exit
end
end
diff --git a/lib/sisu/v2/shared_markup_alt.rb b/lib/sisu/v2/shared_markup_alt.rb
index 71405e02..52ecfe24 100644
--- a/lib/sisu/v2/shared_markup_alt.rb
+++ b/lib/sisu/v2/shared_markup_alt.rb
@@ -260,8 +260,7 @@ module SiSU_text_representation
elsif FileTest.file?("#{@env.path.image_source_tex}/#{i}")
@env.path.image_source_tex
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:", %{"#{i}" missing}, "search locations: #{@env.path.image_source_local_tex}, #{@env.path.image_source_remote_tex} and #{@env.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:", %{"#{i}" missing}, "search locations: #{@env.path.image_source_local_tex}, #{@env.path.image_source_remote_tex} and #{@env.path.image_source_tex}").error2 unless @md.cmd =~/q/
nil
end
img_type = /\S+\.(png|jpg|gif)/.match(i)[1]
diff --git a/lib/sisu/v2/sisupod_make.rb b/lib/sisu/v2/sisupod_make.rb
index f0ba905c..c721f257 100644
--- a/lib/sisu/v2/sisupod_make.rb
+++ b/lib/sisu/v2/sisupod_make.rb
@@ -96,10 +96,9 @@ module SiSU_Doc
sisupod_zip
#sisupod_7zip
else
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make (zip) of sisu work directory',"#{@env.stub_pwd}\_#{@date}.zip")
- tell.warn if @opt.cmd =~/[MVv]/
- tell.blue_tab if @opt.cmd =~/[MVv]/
+ if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Make (zip) of sisu work directory',"#{@env.stub_pwd}\_#{@date}.zip").warn
+ SiSU_Screen::Ansi.new(@opt.cmd,'').blue_tab
end
ans=@ans.response?('make sisupod of entire directory?')
if ans; sisupod_zip_directory
@@ -128,12 +127,10 @@ module SiSU_Doc
})
else puts "the required systemlink 'sisupod' could not be created on the current directory: remove the file or directory named 'sisupod' within #{Dir.pwd}"
end
- unless @opt.cmd =~/q/
- if @opt.cmd =~/[MVv]/
- SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (tar gzip)',@opt.fns).green_hi_blue
- SiSU_Screen::Ansi.new(@opt.cmd,'Zipped directory',sisupod_directory).warn
- SiSU_Screen::Ansi.new('',sisupod_directory).blue_tab
- end
+ if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (tar gzip)',@opt.fns).green_hi_blue
+ SiSU_Screen::Ansi.new(@opt.cmd,'Zipped directory',sisupod_directory).warn
+ SiSU_Screen::Ansi.new('',sisupod_directory).blue_tab
end
end
def directories
@@ -277,8 +274,7 @@ module SiSU_Doc
mv #{@zipfile}.7z #{@local_path}/. &
rm -r sisupod/* && cd #{@env.path.pwd}
})
- tell=SiSU_Screen::Ansi.new('',"#{@opt.fns}.7z")
- tell.blue_tab unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new('',"#{@opt.fns}.7z").blue_tab unless @opt.cmd =~/q/
end
def sisupod_zip
mkdir_p(@local_path) unless FileTest.directory?(@local_path)
@@ -290,9 +286,7 @@ module SiSU_Doc
mv #{@zipfile}.zip #{@local_path}/. &
rm -r sisupod/* && cd #{@env.path.pwd}
})
- unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new('',"#{@zipfile}.zip").blue_tab if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new('',"#{@zipfile}.zip").blue_tab if @opt.cmd =~/[MVv]/
end
end
end
diff --git a/lib/sisu/v2/sitemaps.rb b/lib/sisu/v2/sitemaps.rb
index c6a80c23..87bd21c0 100644
--- a/lib/sisu/v2/sitemaps.rb
+++ b/lib/sisu/v2/sitemaps.rb
@@ -89,8 +89,7 @@ module SiSU_Sitemaps
@sitemap_idx_fn='sitemapindex.xml'
@env=SiSU_Env::Info_env.new
output_idx(sitemap_index)
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"sitemap index:","#{@env.path.output}/#{@sitemap_idx_fn}")
- tell.result unless @opt.cmd =~/q/
+ 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
ensure
diff --git a/lib/sisu/v2/sst_do_inline_footnotes.rb b/lib/sisu/v2/sst_do_inline_footnotes.rb
index 27c2da8b..f114d97a 100644
--- a/lib/sisu/v2/sst_do_inline_footnotes.rb
+++ b/lib/sisu/v2/sst_do_inline_footnotes.rb
@@ -117,8 +117,7 @@ module SiSU_Convert_footnotes
protected
def create_dal
dal_array=[]
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'convert footnotes')
- tell.green_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,'convert footnotes').green_title_hi unless @opt.cmd =~/q/
file_array=IO.readlines(@opt.fns,'')
file_array.each do |l|
if l =~/\r\n/; l.gsub!(/\r\n/,"\n")
@@ -132,13 +131,11 @@ module SiSU_Convert_footnotes
meta=nil
dal=SiSU_Convert_footnotes::Make.new(@md,file_array).song
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.fns}.fn").output if @md.cmd =~/v/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{@md.fns}.fn -> #{@md.fns}.fn") unless @md.cmd =~/q/
- tell.txt_red unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,"#{@md.fns}.fn -> #{@md.fns}.fn").txt_red unless @md.cmd =~/q/
dal.each{|s| dal_array << "#{s.strip}\n\n" unless s.strip.empty?}
dal_array
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,'no footnote conversion done, problem with source file','to override use --convert=footnote-force (this is not advised)')
- tell.warn if @cmd !~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'no footnote conversion done, problem with source file','to override use --convert=footnote-force (this is not advised)').warn if @cmd !~/q/
''
end
end
diff --git a/lib/sisu/v2/sst_to_s_xml_sax.rb b/lib/sisu/v2/sst_to_s_xml_sax.rb
index 3522eb6d..25dfe927 100644
--- a/lib/sisu/v2/sst_to_s_xml_sax.rb
+++ b/lib/sisu/v2/sst_to_s_xml_sax.rb
@@ -428,8 +428,8 @@ WOK
def xml
if @prog.tidy !=false #note values can be other than true
if @md.cmd =~/[VM]/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure')
- tell.colorize unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure').colorize unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'','','check document structure')
tell.grey_open unless @md.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)
diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb
index 05277012..f440fd3f 100644
--- a/lib/sisu/v2/sysenv.rb
+++ b/lib/sisu/v2/sysenv.rb
@@ -246,10 +246,9 @@ module SiSU_Env
if load_prog
require @prog
else
- tell=if @mandatory; SiSU_Screen::Ansi.new(@cmd,"module required: #{@prog}")
- else SiSU_Screen::Ansi.new(@cmd,"#{@prog} load requested")
- end
- tell.warn
+ @mandatory \
+ ? (SiSU_Screen::Ansi.new(@cmd,"module required: #{@prog}").warn) \
+ : (SiSU_Screen::Ansi.new(@cmd,"#{@prog} load requested").warn)
end
load_prog
end
@@ -1865,8 +1864,7 @@ WOK
cmd=if @cmd; @cmd
else ''
end
- tell=SiSU_Screen::Ansi.new(cmd,"WARNING - no local image directory or images:", defaults[:image_local] )
- tell.warn unless cmd =~/q/
+ SiSU_Screen::Ansi.new(cmd,"WARNING - no local image directory or images:", defaults[:image_local] ).warn unless cmd =~/q/
@@local_image=false
end
url.images
@@ -1884,8 +1882,7 @@ WOK
'../_sisu/image_external'
else
if @@local_image==true
- tell=SiSU_Screen::Ansi.new(@cmd,"WARNING - image directory for external images or no such images:", :image_external )
- tell.warn unless @cmd =~/q/
+ SiSU_Screen::Ansi.new(@cmd,"WARNING - image directory for external images or no such images:", :image_external ).warn unless @cmd =~/q/
@@local_image=false
end
url.images_external
@@ -2098,8 +2095,7 @@ WOK
if FileTest.file?("#{Dir.pwd}/#{fns_pod}")
system("unzip -q #{Dir.pwd}/#{fns_pod} -d #{path.processing}")
else
- tell=SiSU_Screen::Ansi.new('',"file not found: #{fns_pod}")
- tell.warn unless @cmd=~/q/
+ SiSU_Screen::Ansi.new('',"file not found: #{fns_pod}").warn unless @cmd=~/q/
end
sisupod_processing_path
end
@@ -3285,7 +3281,7 @@ WOK
css_path=['/etc/sisu/css',"#{@home}/.sisu/css","#{@pwd}/_sisu/css"] #BROKEN
if defined? @rc['permission_set']['css_modify'] \
and @rc['permission_set']['css_modify']
- tell=SiSU_Screen::Ansi.new(@cmd,"modify is css set to: #{@rc['permission_set']['css_modify']}")
+ SiSU_Screen::Ansi.new(@cmd,"modify is css set to: #{@rc['permission_set']['css_modify']}").warn if @cmd=~/[MV]/
css_path.each do |x|
if FileTest.directory?(x)
cd(x)
@@ -3296,9 +3292,8 @@ WOK
cd(@pwd)
end
end
- else tell=SiSU_Screen::Ansi.new(@cmd,"modify css is not set or is set to: false")
+ else SiSU_Screen::Ansi.new(@cmd,"modify css is not set or is set to: false").warn if @cmd=~/[MV]/
end
- tell.warn if @cmd=~/[MV]/
fn_css=SiSU_Env::CSS_default.new
css=SiSU_Style::CSS.new
path_style="#{@env.path.output}/#{@env.path.style}"
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb
index 3412d64c..a9b1df51 100644
--- a/lib/sisu/v2/texpdf.rb
+++ b/lib/sisu/v2/texpdf.rb
@@ -104,14 +104,11 @@ module SiSU_TeX
def song
begin
@md=@particulars.md
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns)
- tell.green_title_hi unless @opt.cmd =~/q/
- path=@env.url.output_tell
+ SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns).green_title_hi unless @opt.cmd =~/q/
if @opt.cmd =~/[MVv]/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_l]}")
- tell.flow
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_p]}")
- tell.flow
+ path=@env.url.output_tell
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_l]}").flow
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_p]}").flow
end
@md=@particulars.md
SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
@@ -159,8 +156,7 @@ module SiSU_TeX
def latex_do(texfilename,papersize)
@texfilename=texfilename
@@n_lpdf=@@n_lpdf+1
- tell=SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} portrait ->")
- tell.dark_grey_title_hi if @md.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} portrait ->").dark_grey_title_hi if @md.cmd =~/[MVv]/
tex_fn_base=@texfilename.gsub(/\.tex$/,'')
cmd=SiSU_Env::System_call.new("#{tex_fn_base}.tex",'',@md.cmd)
tell=SiSU_Screen::Ansi.new(@md.cmd)
@@ -170,17 +166,14 @@ module SiSU_TeX
2.times { |i| cmd.latex2pdf(@md,papersize) }
end
tell.p_off if @md.cmd =~/[MVv]/
- tell=SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} landscape ->")
- tell.dark_grey_title_hi if @md.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@md.cmd,"#{papersize} landscape ->").dark_grey_title_hi if @md.cmd =~/[MVv]/
cmd=SiSU_Env::System_call.new("#{tex_fn_base}.landscape.tex",'',@md.cmd)
tell.grey_open if @md.cmd =~/[MVv]/
if "#{tex_fn_base}" =~/\w+/ \
and "#{papersize}" =~/\w+/
2.times { |i| cmd.latex2pdf(@md,papersize) }
end
- unless @md.cmd =~/q/
- tell.p_off if @md.cmd =~/[MVv]/
- end
+ tell.p_off if @md.cmd =~/[MVv]/
pwd=Dir.pwd
portrait_pdf="#{pwd}/#{tex_fn_base}.pdf"
landscape_pdf="#{pwd}/#{tex_fn_base}.landscape.pdf"
@@ -202,9 +195,7 @@ module SiSU_TeX
rm(landscape_pdf)
else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.cmd.inspect =~/M/
end
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,@@n_lpdf,'processed (SiSU LaTeX to pdf - using pdfetex aka. pdftex or pdflatex)').generic_number if @md.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,@@n_lpdf,'processed (SiSU LaTeX to pdf - using pdfetex aka. pdftex or pdflatex)').generic_number if @md.cmd =~/[MVv]/
end
def latexrun_selective
begin
@@ -259,8 +250,7 @@ module SiSU_TeX
")
end
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"FILE NOT FOUND: << #{@md.fns} >> - requested latex system processing skipped")
- tell.warn
+ SiSU_Screen::Ansi.new(@md.cmd,"FILE NOT FOUND: << #{@md.fns} >> - requested latex system processing skipped").warn
end
lst=Dir["*.{aux,log,out}"]
lst.each {|file| File.unlink(file)} if lst
@@ -299,9 +289,7 @@ module SiSU_TeX
data=@data
@@tex_footnote_array=[]
@@rights=nil
- unless @md.cmd =~/q/
- SiSU_Screen::Ansi.new(@md.cmd,"pdfTex portrait & landscape").txt_grey if @md.cmd=~/[MVvz]/
- end
+ SiSU_Screen::Ansi.new(@md.cmd,"pdfTex portrait & landscape").txt_grey if @md.cmd=~/[MVvz]/
if defined? @md.rights.all \
and not @md.rights.all.empty?
rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index aca5378e..2d81f40c 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -290,8 +290,7 @@ module SiSU_TeX_Pdf
@txt.gsub!(/<:=\s*(\S+?)\s*>/,
"\\includegraphics*[width=11pt]{#{dir.path.image_source_tex}/c_\\1.png}")
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search path: #{dir.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search path: #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/
@txt.gsub!(/#{Mx[:lnk_o]}\S+\.(png|jpg|gif).+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,'') # fragile match operator\\ fragile !
end
end
@@ -309,8 +308,7 @@ module SiSU_TeX_Pdf
elsif FileTest.file?("#{dir.path.image_source_tex}/#{image}")
dir.path.image_source_tex
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/
nil
end
if image_source #CHECK
@@ -347,8 +345,7 @@ module SiSU_TeX_Pdf
else
unless image.nil? \
or image.length < 2
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/
end
nil
end
@@ -492,8 +489,7 @@ module SiSU_TeX_Pdf
hsp="\n{\\color{mywhite} .}&~\n" # ~ character for hardspace
caption=(c ? "{\\\\\ \n\\begin{scriptsize}#{hsp*3}#{c}\\end{scriptsize}&}" : '')
elsif images_hash[ps] =~/#{Mx[:lnk_o]}\s*(\S+\.?\.(?:png|jpg|gif))/m
- tell=SiSU_Screen::Ansi.new(@md.cmd,%{document built without image: "#{$1}" as image dimensions not provided (either image not found or neither imagemagick nor graphicsmagick is installed)?\n})
- tell.print_grey #unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,%{document built without image: "#{$1}" as image dimensions not provided (either image not found or neither imagemagick nor graphicsmagick is installed)?\n}).print_grey #unless @opt.cmd =~/q/
images_hash[ps].gsub!(/#{Mx[:lnk_o]}\s*(\S+\.?\.(?:png|jpg|gif))/,'[image]')
end
if image #most images fc etc. #% clean up !
@@ -530,8 +526,7 @@ module SiSU_TeX_Pdf
end
images_hash[ps]
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}")
- tell.error2 unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,"ERROR - image:",%{"#{image}" missing},"search locations: #{dir.path.image_source_local_tex},#{dir.path.image_source_remote_tex} and #{dir.path.image_source_tex}").error2 unless @md.cmd =~/q/
if images_hash[ps] =~url_image_rgx \
or images_hash[ps] =~image_rgx
images_hash[ps]=''
@@ -1262,8 +1257,7 @@ WOK
sisu_ico=if FileTest.file?("#{dir.path.image_source_tex}/sisu.png")
"\\includegraphics*[width=60pt]{#{dir.path.image_source_tex}/sisu.png}"
else
- tell=SiSU_Screen::Ansi.new(@md.cmd,'WARNING - image directory or image(s) missing:', %{"#{dir.path.image_source_tex}"} )
- tell.warn unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'WARNING - image directory or image(s) missing:', %{"#{dir.path.image_source_tex}"} ).warn unless @md.cmd =~/q/
" SiSU "
end
url=@md.fnb.gsub(/(?:\\)*([$&~%_#}{^])/,'\\\\\1')
diff --git a/lib/sisu/v2/update.rb b/lib/sisu/v2/update.rb
index c83d49f1..21b766e2 100644
--- a/lib/sisu/v2/update.rb
+++ b/lib/sisu/v2/update.rb
@@ -70,8 +70,7 @@ module SiSU_Update_control_flag
@env=SiSU_Env::Info_env.new(@md.fns)
out=@env.path.output
base_path="#{out}/#{@md.fnb}"
- tell=SiSU_Screen::Ansi.new(@md.cmd,'Checking previous output',base_path)
- tell.green_hi_blue unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'Checking previous output',base_path).green_hi_blue unless @md.cmd =~/q/
Set_CF.new(@md).set_flags
rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error
ensure
diff --git a/lib/sisu/v2/urls.rb b/lib/sisu/v2/urls.rb
index 6595c139..917b6fec 100644
--- a/lib/sisu/v2/urls.rb
+++ b/lib/sisu/v2/urls.rb
@@ -140,10 +140,7 @@ module SiSU_urls
if x =~/^m/ \
and @opt.cmd=~/m/ \
and x=~/^[#{opt.cmd}]/
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.dal}/#{@opt.fns}.meta")
- tell.maintenance if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.dal}/#{@opt.fns}.meta").maintenance if @opt.cmd =~/[MVv]/
end
if x=~/^([hHw])/ \
and @opt.cmd=~/[hHw]/ \
@@ -173,16 +170,10 @@ module SiSU_urls
if x=~/^e/ \
and @opt.cmd=~/e/ \
and x=~/^[#{@opt.cmd}]/
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.epub}/OPS/toc.xhtml")
- tell.maintenance if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@env.path.epub}/OPS/toc.xhtml").maintenance if @opt.cmd =~/[MVv]/
end
if x !~/^[me]/
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{tool} #{@env.path.output}/#{@fnb}/#{y}")
- tell.maintenance if @opt.cmd =~/[MVv]/
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{tool} #{@env.path.output}/#{@fnb}/#{y}").maintenance if @opt.cmd =~/[MVv]/
end
@opt.cmd.gsub!(/#{m}/,'')
end
@@ -193,8 +184,7 @@ module SiSU_urls
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi \
: SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).green_title_hi
- if @opt.cmd =~/[MVv]/; SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow
- end
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow if @opt.cmd =~/[MVv]/
end
m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub="#{@env.url.output_tell}"[m,1]
@@ -206,49 +196,41 @@ module SiSU_urls
and @opt.cmd=~/[abchHNopwxXyY]/ \
and x=~/^[#{@opt.cmd}]/
m=$1
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}").result
@opt.cmd.gsub!(/#{m}/,'')
end
if x=~/^I/ \
and @opt.cmd =~/I/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -").result
@opt.cmd.gsub!(/I/,'')
end
if x=~/^D/ \
and @opt.cmd =~/D/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y)
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result
@opt.cmd.gsub!(/D[iu]/,'')
end
if x=~/^d/ \
and @opt.cmd =~/d/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}").result
@opt.cmd.gsub!(/d[iu]/,'')
end
if x=~/^e/ \
and @opt.cmd =~/e/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@env.path.output}/epub/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@env.path.output}/epub/#{y}").result
end
if x=~/^i/ \
and @opt.cmd =~/i/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_generator} #{@env.path.manpage}/#{@fnb}.1 |most")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_generator} #{@env.path.manpage}/#{@fnb}.1 |most").result
@opt.cmd.gsub!(/I/,'')
end
if x=~/^P/ \
and @opt.cmd =~/P/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} Profile","#{@pwd_stub}::#{@opt.fns}",y)
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} Profile","#{@pwd_stub}::#{@opt.fns}",y).result
@opt.cmd.gsub!(/P/,'')
end
if x=~/^s/ \
and @opt.cmd =~/s/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/src/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/src/#{y}").result
@opt.cmd.gsub!(/I/,'')
end
if x=~/^S/ \
@@ -256,8 +238,7 @@ module SiSU_urls
zipfile=if @opt.fns =~/\.ssm\.sst$/; y.gsub(/(?:\~\S{2,3})?(\.ssm\.sst\.zip)$/,'.ssm.zip')
else y.gsub(/(?:\~\S{2,3})?(\.sst\.zip)$/,'\1')
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}")
- tell.result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result
@opt.cmd.gsub!(/I/,'')
end
end
@@ -267,11 +248,9 @@ module SiSU_urls
end
end
def urls_all
- unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'URLs')
- tell.grey_title_hi if @opt.cmd =~/[MVv]/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}")
- tell.flow if @opt.cmd =~/[MVv]/
+ if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#{@fnb}").flow
end
@u.each do |x,y|
tell=case x
@@ -289,9 +268,9 @@ module SiSU_urls
when /^i/
SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_generator} #{@env.path.manpage}/#{@fnb}.1 |most")
end
- unless @opt.cmd =~/q/
- tellx.result if tellx and @opt.cmd =~/[MVv]/
- tell.result if tell and @opt.cmd =~/[MVv]/
+ if @opt.cmd =~/[MVv]/
+ tellx.result if tellx
+ tell.result if tell
end
tellx=nil
end
diff --git a/lib/sisu/v2/wikispeak.rb b/lib/sisu/v2/wikispeak.rb
index 0bb77c36..df6cdb50 100644
--- a/lib/sisu/v2/wikispeak.rb
+++ b/lib/sisu/v2/wikispeak.rb
@@ -78,13 +78,11 @@ module SiSU_Wikispeak
@md=SiSU_Param::Parameters.new(@opt).get
@env=SiSU_Env::Info_env.new(@opt.fns)
path=@env.path.output_tell
- tool=if @opt.cmd =~/[MVv]/; "#{@env.program.text_editor} #{path}/#{@md.fnb}/#{@md.fn[:wiki]}"
- else ''
- end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Wikispeak',tool)
- tell.green_hi_blue unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:wiki]}")
- tell.flow if @opt.cmd =~/[MV]/
+ tool=(@opt.cmd =~/[MVv]/) \
+ ? "#{@env.program.text_editor} #{path}/#{@md.fnb}/#{@md.fn[:wiki]}" \
+ : ''
+ SiSU_Screen::Ansi.new(@opt.cmd,'Wikispeak',tool).green_hi_blue unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:wiki]}").flow if @opt.cmd =~/[MV]/
my_make=SiSU_Env::Create_file.new(@opt.cmd,@opt.fns)
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
SiSU_Wikispeak::Source::Scroll.new(@dal_array,@md).songsheet
diff --git a/lib/sisu/v2/xhtml.rb b/lib/sisu/v2/xhtml.rb
index 56371ef8..f142f3ce 100644
--- a/lib/sisu/v2/xhtml.rb
+++ b/lib/sisu/v2/xhtml.rb
@@ -80,18 +80,18 @@ module SiSU_XHTML
def read
begin
@env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array
- path=@env.path.output_tell
- loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ path=@env.path.output_tell
+ loc=@env.url.output_tell
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}"
+ else @opt.fns
+ end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize \
: SiSU_Screen::Ansi.new(@opt.cmd,'XHTML',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:xhtml]}").flow if @opt.cmd =~/[MV]/
SiSU_XHTML::Source::Songsheet.new(@particulars).song
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
@@ -385,8 +385,8 @@ WOK
if @prog.tidy !=false
if @md.cmd =~/[VM]/
unless @md.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure')
- tell.colorize
+ SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure').colorize
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','','')
tell.grey_open
end
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
diff --git a/lib/sisu/v2/xml.rb b/lib/sisu/v2/xml.rb
index d9664b92..d3ff280e 100644
--- a/lib/sisu/v2/xml.rb
+++ b/lib/sisu/v2/xml.rb
@@ -80,18 +80,18 @@ module SiSU_XML_SAX
def read
begin
@env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array
- path=@env.path.output_tell
- loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:sax]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ path=@env.path.output_tell
+ loc=@env.url.output_tell
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:sax]}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}"
+ else @opt.fns
+ end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize \
: SiSU_Screen::Ansi.new(@opt.cmd,'XML SAX',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:sax]}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:sax]}").flow if @opt.cmd =~/[MV]/
SiSU_XML_SAX::Source::Songsheet.new(@particulars).song
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
@@ -426,8 +426,8 @@ WOK
if @prog.tidy !=false #note values can be other than true
if @md.cmd =~/[VM]/
unless @md.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure')
- tell.colorize
+ SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure').colorize
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','','')
tell.grey_open
end
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
diff --git a/lib/sisu/v2/xml_dom.rb b/lib/sisu/v2/xml_dom.rb
index 8242385d..c07364f2 100644
--- a/lib/sisu/v2/xml_dom.rb
+++ b/lib/sisu/v2/xml_dom.rb
@@ -78,18 +78,18 @@ module SiSU_XML_DOM
def read
begin
@env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array
- path=@env.path.output_tell
- loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:dom]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}"
- else @opt.fns
- end
unless @opt.cmd =~/q/
+ path=@env.path.output_tell
+ loc=@env.url.output_tell
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:dom]}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}"
+ else @opt.fns
+ end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML DOM',tool).colorize \
: SiSU_Screen::Ansi.new(@opt.cmd,'XML DOM',tool).green_title_hi
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:dom]}").flow if @opt.cmd =~/[MV]/
end
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:dom]}").flow if @opt.cmd =~/[MV]/
SiSU_XML_DOM::Source::Songsheet.new(@particulars).songsheet
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
@@ -508,8 +508,8 @@ WOK
def xml
if @prog.tidy !=false
if @md.cmd =~/[VM]/
- tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure')
- tell.colorize unless @md.cmd =~/q/
+ SiSU_Screen::Ansi.new(@md.cmd,'invert','Using XML Tidy','check document structure').colorize unless @md.cmd =~/q/
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'invert','','')
tell.grey_open unless @md.cmd =~/q/
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:dom]}",tidyfile)