From 64e5c9120ffb7a65b96eded0850f481e116f1d3f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Aug 2014 00:16:16 -0400 Subject: v6: use opt.act, code internals (simplify, cleaner; remove opt.cmd & opt.mod) * v5 dp, indentation changed to retain easy comparison with v6 --- lib/sisu/v6/qrcode.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/sisu/v6/qrcode.rb') diff --git a/lib/sisu/v6/qrcode.rb b/lib/sisu/v6/qrcode.rb index b69769e6..aa31236c 100644 --- a/lib/sisu/v6/qrcode.rb +++ b/lib/sisu/v6/qrcode.rb @@ -111,7 +111,7 @@ module SiSU_QRcode data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions OutputInfo.new(@md).check_output(data) rescue - SiSU_Errors::Rescued.new($!,$@,@opt.cmd,@opt.fns).location do + SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure @@ -152,7 +152,7 @@ module SiSU_QRcode mn += x end manifest.close if @md.opt.act[:maintenance][:set]==:on - cmd=SiSU_Env::SystemCall.new(mn,@f.place_file.qrcode_md.dir,@md.opt.cmd) + cmd=SiSU_Env::SystemCall.new(mn,@f.place_file.qrcode_md.dir,@md.opt.selections.str) cmd.qrencode end def output_metadata_short @@ -160,7 +160,7 @@ module SiSU_QRcode @manifest[:txt_title].each do |x| mn += x end - cmd=SiSU_Env::SystemCall.new(mn,@f.place_file.qrcode_title.dir,@md.opt.cmd) + cmd=SiSU_Env::SystemCall.new(mn,@f.place_file.qrcode_title.dir,@md.opt.selections.str) cmd.qrencode end def summarize(id,file,pth='',rel='',url='',img='● ') @@ -193,7 +193,7 @@ WOK || @md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( - @md.opt.cmd, + @md.opt.selections.str, "#{dgst[1]} #{file}" ).warn end @@ -403,12 +403,13 @@ WOK summarize(id,file,pth,rel,url) end if FileTest.file?(@f.place_file.txt.dir)==true - id=if @md.opt.cmd =~/a/ then 'Plaintext (Unix (UTF-8) with footnotes)' - elsif @md.opt.cmd =~/e/ then 'Plaintext (Unix (UTF-8) with endnotes)' - elsif @md.opt.cmd =~/A/ then 'Plaintext (dos (UTF-8) with footnotes)' - elsif @md.opt.cmd =~/E/ then 'Plaintext (dos (UTF-8) with endnotes)' - else 'Plaintext (UTF-8)' - end + id='Plaintext (UTF-8)' + #id=if @md.opt.selections.str =~/a/ then 'Plaintext (Unix (UTF-8) with footnotes)' + #elsif @md.opt.selections.str =~/e/ then 'Plaintext (Unix (UTF-8) with endnotes)' + #elsif @md.opt.selections.str =~/A/ then 'Plaintext (dos (UTF-8) with footnotes)' + #elsif @md.opt.selections.str =~/E/ then 'Plaintext (dos (UTF-8) with endnotes)' + #else 'Plaintext (UTF-8)' + #end pth=@f.output_path.txt.dir rel=@f.output_path.txt.rel_sm url=@f.output_path.txt.url @@ -746,7 +747,7 @@ WOK output_metadata output_metadata_short rescue - SiSU_Errors::Rescued.new($!,$@,@md.opt.cmd,@md.fns).location do + SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure -- cgit v1.2.3