aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-09-24 08:07:27 -0400
committerRalph Amissah <ralph@amissah.com>2011-09-24 08:07:30 -0400
commitb1d08ced020a74c5871b20ad4de57b533e3a4c2e (patch)
treecd870b7b7e9fa9253e62cf0f1750f79fc6f4c07b /lib/sisu/v3/sysenv.rb
parentv3: info files, fix output; remote, include info file & manpage (when selected) (diff)
v3: qrcode, sisu generated manifest output, treat as such
* place qrcode images in directory under manifest (manifest/qrcode) * fix remote placement of qrcode images when requested
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r--lib/sisu/v3/sysenv.rb66
1 files changed, 66 insertions, 0 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index ad831489..b5a10614 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -3021,6 +3021,10 @@ WOK
if @opt.cmd =~/p/
inp << @f.output_path.pdf.rel + '/' + @opt.fnb + '*'
end
+ if @opt.cmd =~/Q/ \
+ && FileTest.file?(@f.place_file.qrcode_md.dir)
+ inp << @f.place_file.qrcode_md.rel << @f.place_file.qrcode_title.rel
+ end
if @opt.cmd =~/y/ \
&& FileTest.file?(@f.place_file.manifest.dir)
inp << @f.place_file.manifest.rel
@@ -3395,6 +3399,12 @@ WOK
fn=base_filename.hash_digest
file=make_file(path,fn)
end
+ def qrcode
+ path=output_path.qrcode.dir
+ make_path(path)
+ fn=base_filename.qrcode
+ make_file(path,fn)
+ end
def manifest
path=output_path.manifest.dir
make_path(path)
@@ -3617,6 +3627,24 @@ WOK
end
self
end
+ def qrcode_title
+ def dir
+ output_path.qrcode.dir + '/' + base_filename.qrcode_title
+ end
+ def rel
+ output_path.qrcode.rel + '/' + base_filename.qrcode_title
+ end
+ self
+ end
+ def qrcode_md
+ def dir
+ output_path.qrcode.dir + '/' + base_filename.qrcode_md
+ end
+ def rel
+ output_path.qrcode.rel + '/' + base_filename.qrcode_md
+ end
+ self
+ end
def manifest
def dir
output_path.manifest.dir + '/' + base_filename.manifest
@@ -3817,6 +3845,26 @@ WOK
'sitemap' + @md.lang_code_insert + ft
end
end
+ def qrcode_title
+ ft='.title.png'
+ if @env.output_dir_structure.by_language_code?
+ @md.fnb + ft
+ elsif @env.output_dir_structure.by_filetype?
+ @md.fnb + @md.lang_code_insert + ft
+ else #fix
+ 'sisu_manifest' + @md.lang_code_insert + ft
+ end
+ end
+ def qrcode_md
+ ft='.md.png'
+ if @env.output_dir_structure.by_language_code?
+ @md.fnb + ft
+ elsif @env.output_dir_structure.by_filetype?
+ @md.fnb + @md.lang_code_insert + ft
+ else #fix
+ 'sisu_manifest' + @md.lang_code_insert + ft
+ end
+ end
def manifest_txt
ft='.txt'
if @env.output_dir_structure.by_language_code?
@@ -4442,6 +4490,24 @@ WOK
end
self
end
+ def qrcode
+ def ft
+ 'manifest/qrcode'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
+ end
def harvest
def ft
'site_metadata'