aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/qrcode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/qrcode.rb')
-rw-r--r--lib/sisu/v3/qrcode.rb46
1 files changed, 23 insertions, 23 deletions
diff --git a/lib/sisu/v3/qrcode.rb b/lib/sisu/v3/qrcode.rb
index 2dd621e7..d2b16753 100644
--- a/lib/sisu/v3/qrcode.rb
+++ b/lib/sisu/v3/qrcode.rb
@@ -70,15 +70,15 @@ module SiSU_QRcode
class Source
def initialize(opt)
@opt=opt
- @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt)
- l=SiSU_Env::Standardise_language.new(@opt.lng).language
+ @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt)
+ l=SiSU_Env::StandardiseLanguage.new(@opt.lng).language
@doc_language=l[:n]
end
def read
begin
- @env=SiSU_Env::Info_env.new(@opt.fns)
+ @env=SiSU_Env::InfoEnv.new(@opt.fns)
@md=SiSU_Param::Parameters.new(@opt).get
- SiSU_Env::Info_skin.new(@md).select
+ SiSU_Env::InfoSkin.new(@md).select
xbrowser=@env.program.web_browser
browser=@env.program.console_web_browser
unless @opt.cmd =~/q/
@@ -88,25 +88,25 @@ module SiSU_QRcode
: SiSU_Screen::Ansi.new(@opt.cmd,'QR code',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi
SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i
end
- 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
+ data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
+ OutputInfo.new(@md).check_output(data)
+ rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error
ensure
end
end
private
- class Output_Info <Source
+ class OutputInfo <Source
def initialize(md)
@manifest={ txt: [], txt_title: [] }
@md,@fns=md,md.fns
- @env=SiSU_Env::Info_env.new(@md.fns)
+ @env=SiSU_Env::InfoEnv.new(@md.fns)
@fnb=@md.fnb
@base_url="#{@env.url.root}/#{@fnb}"
- @f=SiSU_Env::SiSU_file.new(@md)
+ @f=SiSU_Env::FileOp.new(@md)
@base_path=@f.output_path.manifest.dir
- @@dg ||=SiSU_Env::Info_env.new.digest.type
+ @@dg ||=SiSU_Env::InfoEnv.new.digest.type
@dg=@@dg
- l=SiSU_Env::Standardise_language.new(@md.opt.lng).language
+ l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
@language=l[:n]
@translate=SiSU_Translate::Source.new(@md,@language)
@brace_url=SiSU_Viz::Skin.new.url_decoration
@@ -128,7 +128,7 @@ module SiSU_QRcode
#system(%{
# cat #{pt}/#{fn} | qrencode -s 3 -o qrcm.autonomy_markup0.png
#})
- cmd=SiSU_Env::System_call.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.cmd)
cmd.qrencode
#system(%{
# echo "#{mn}" | qrencode -s 3 -o #{@dest}/qrc_md.#{fn}.png
@@ -140,7 +140,7 @@ module SiSU_QRcode
@manifest[:txt_title].each do |x|
mn += x
end
- cmd=SiSU_Env::System_call.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.cmd)
cmd.qrencode
#system(%{
# echo "#{mn}" | qrencode -s 3 -o #{@dest}/qrc_title.#{fn}.png
@@ -149,7 +149,7 @@ module SiSU_QRcode
def summarize(id,file,pth='',rel='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] <<<<WOK
+ @manifest[:txt] <<<<WOK
#{id} #{kb}
#{@brace_url.txt_open}#{url}/#{file}#{@brace_url.txt_close}
WOK
@@ -163,7 +163,7 @@ WOK
WOK
end
def summarize_sources(id,file,pth,rel,url)
- sys=SiSU_Env::System_call.new
+ sys=SiSU_Env::SystemCall.new
dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{pth}/#{file}")
else sys.md5("#{pth}/#{file}")
end
@@ -176,7 +176,7 @@ WOK
WOK
end
def published_manifests?
- @f=SiSU_Env::SiSU_file.new(@md) #.base_filename
+ @f=SiSU_Env::FileOp.new(@md) #.base_filename
@m=[]
url=@f.output_path.base.url
manifests={}
@@ -215,7 +215,7 @@ WOK
# "#{url}/sisu_manifest.#{lc}.html"
#end
manifests
- @m.uniq!
+ @m=@m.uniq
@m
end
def languages(id,file)
@@ -232,11 +232,11 @@ WOK
end
end
def metadata(id,info)
- info.to_s.gsub!(/#{Mx[:br_line]}/,"\n")
+ info=info.to_s.gsub(/#{Mx[:br_line]}/,"\n")
@manifest[:txt] << %{#{id}: #{info}\n}
end
def md_title_info(id,info)
- info.to_s.gsub!(/#{Mx[:br_line]}/,"\n")
+ info=info.to_s.gsub(/#{Mx[:br_line]}/,"\n")
@manifest[:txt_title] << %{#{info}\n}
end
def links(url,lnk,target)
@@ -703,8 +703,8 @@ WOK
def check_output(data)
begin
id,file='',''
- vz=SiSU_Env::Get_init.instance.skin
- @f=SiSU_Env::SiSU_file.new(@md) #.base_filename
+ vz=SiSU_Env::GetInit.instance.skin
+ @f=SiSU_Env::FileOp.new(@md) #.base_filename
url=@f.output_path.base.url
@en_manifest=if @env.output_dir_structure.by_language_code?
"#{url}/en/manifest/#{@md.fnb}.html"
@@ -728,7 +728,7 @@ WOK
language_versions
output_metadata
output_metadata_short
- rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
+ rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
end
end