From 809034240a1be22cc00cb3b4c1df1dd2facdc8f8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Aug 2014 00:32:27 -0400 Subject: v5: merged v6 libraries * commandline, --act0 to --act9, rc-config with flag:act[0-9] * configurable command line options increased to 0 - 9 (instead of 0 - 5) * use --act0 to --act9 (previous flags -1 to -5; -0 to -9 now available) * default --act0 * rc config with flag:act0 to flag:act9 (previously roman numerals) * legacy roman numeral configuration works (for now) * use opt.act, code internals (simplify, cleaner; remove opt.cmd & opt.mod) * hub, further changes related to use of opt.act; hub file split --- lib/sisu/v5/qrcode.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/sisu/v5/qrcode.rb') diff --git a/lib/sisu/v5/qrcode.rb b/lib/sisu/v5/qrcode.rb index 19d310c1..3a7d9406 100644 --- a/lib/sisu/v5/qrcode.rb +++ b/lib/sisu/v5/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