diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-05-25 10:01:43 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-05-25 10:01:43 -0400 |
commit | 16c30474f06ed3774ad524a38b55b7840de057d0 (patch) | |
tree | 03f20a30c1853b3d5cb893556aa633be2407a4d8 /lib/sisu/v5/qrcode.rb | |
parent | v5 v6: version & changelog (& rakefile) (diff) |
v5: merge v6 to v5, version bump to 5.4.*, reason adds structure checksisu_5.4.0
* ao, document structure check, stop processing on major error
(with error message & text at location of failure)
[reason for version bump the addition of structure check]
* utils, add ok code marker
* ao, heading with no ocn, distinguish ~# from -#
* ~# is general & means no ocn (for any object to which it is applied)
* -# is relevant only for 1~ dummy headings & instructs that they should be
removed from output where possible
* applied so far to pdf, odt & plaintext
* ao_images, reduce warnings when ruby RMagic absent as program used directly
* reduced dependency on ruby RMagic library (as some time way back had
issues)
* ao, document markup structure check, skip processing file on major error
* with error message & text at location of failure
* texpdf, urls in creator cause breakage
* texpdf, mailto markup links set for normal text objects
* texpdf, '&' in heading breaks toc (now removed from toc (not heading)), bug
* revisit, bug
* texpdf, for urls switch to sans serif (small fontsize)
* instead of typewriter, latex default
* texpdf, pdf colored hyperlinks configurable
* --pdf-hyperlinks-color
--pdf-hyperlinks-no-color or --pdf-hyperlinks-monochrome
* ['default']['pdf_hyperlinks']='color'
(other options switch hyperlink color off 'no-color' 'color-off'
'monochrome')
* texpdf, pdf default font size configurable (cli & sisurc.yml) (no fractions)
* --pdf-fontsize-12 --pdf-fontsize-8
* default:
texpdf_fontsize: 12
* texpdf, headings and table of contents representation
* fixes 1~ and 2~ result in the same formatting
1~ 2~ & 3~ now differentiated, see discussion in sisu.org under #744383
* fixes :A smaller formatted than :B
A~ B~ C~ now the same size, see discussion in sisu.org under #744383
* :B and :C result in the same formatting, issue explained see sisu.org
* texpdf, (internal coding) fontface, rename texpdf_font texpdf_fontface
* texpdf, (internal coding) use symbols to identify page orientation
* param, metadata rights, line-breaks instead of semicolons separating rights
* fixes remove trailing semicolon after :copyright:
* digests sha512 option implemented
* options sha512 sha256 md5
* command line --sha512
* rcconf.yml ['defsault']['digest'] = sha512
* xml object citation numbering (docbook fictionbook)
Diffstat (limited to 'lib/sisu/v5/qrcode.rb')
-rw-r--r-- | lib/sisu/v5/qrcode.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/sisu/v5/qrcode.rb b/lib/sisu/v5/qrcode.rb index a5888365..66584198 100644 --- a/lib/sisu/v5/qrcode.rb +++ b/lib/sisu/v5/qrcode.rb @@ -80,7 +80,7 @@ module SiSU_QRcode end def read begin - @env=SiSU_Env::InfoEnv.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(@opt.fns,@opt) @md=SiSU_Param::Parameters.new(@opt).get xbrowser=@env.program.web_browser browser=@env.program.console_web_browser @@ -111,12 +111,12 @@ module SiSU_QRcode def initialize(md) @manifest={ txt: [], txt_title: [] } @md,@fns=md,md.fns - @env=SiSU_Env::InfoEnv.new(@md.fns) + @env=SiSU_Env::InfoEnv.new(@md.fns,@md.opt) @fnb=@md.fnb @base_url="#{@env.url.root}/#{@fnb}" @f=SiSU_Env::FileOp.new(@md) @base_path=@f.output_path.manifest.dir - @@dg ||=SiSU_Env::InfoEnv.new.digest.type + @@dg ||=SiSU_Env::InfoEnv.new.digest(@md.opt).type @dg=@@dg l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language @language=l[:n] @@ -167,9 +167,14 @@ WOK end def summarize_sources(id,file,pth,rel,url) sys=SiSU_Env::SystemCall.new - dgst=(@dg =~/^sha(?:2|256)$/) \ - ? (sys.sha256("#{pth}/#{file}")) - : (sys.md5("#{pth}/#{file}")) + dgst=case @dg + when :sha512 + (sys.sha516("#{pth}/#{file}")) #check + when :md5 + (sys.md5("#{pth}/#{file}")) + else + (sys.sha256("#{pth}/#{file}")) + end if (@md.opt.act[:verbose][:set]==:on \ || @md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) |