aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-07-26 20:14:34 -0400
committerRalph Amissah <ralph@amissah.com>2011-07-26 20:14:36 -0400
commitf965e5904777542136ff525685193be307bbcfe8 (patch)
tree35783651c0583e18efaa9086e461ae093bc4f8e5 /lib/sisu/v3/sysenv.rb
parentv3: epub, opf fixes (diff)
v3: qrcode, manifest, (++), QR code (metadata) images for manifest
* generate images using qrencode
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r--lib/sisu/v3/sysenv.rb39
1 files changed, 33 insertions, 6 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index 8816212d..30ff2e9b 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -701,6 +701,17 @@ module SiSU_Env
else puts "\tWARN: #{program} is not installed #{program_ref}" if cmd =~/V/
end
end
+ def qrencode #qrcode - for generating QR code
+ program='qrencode'
+ program_ref="\n\t\tsee <http://megaui.net/fukuchi/works/qrencode/index.en.html>"
+ found=(program_found?(program)) ? true : false
+ found \
+ ? (system(%{
+ echo "#{@input}" | #{program} -s 3 -o #{@output}
+ })) \
+ : (puts "\tWARN: #{program} is not installed #{program_ref}" if cmd =~/V/)
+ #found
+ end
def imagemagick #imagemagick is a image manipulation program
program='identify'
program_ref="\n\t\tsee <http://www.imagemagick.org/>"
@@ -2404,7 +2415,7 @@ WOK
and not (@rc['flag']['default'].nil? \
or @rc['flag']['default'].empty?)
@rc['flag']['default']
- else '-NhwepoabxXyYv'
+ else '-NQhewpotbxXyYv'
end
end
def cf_1 #processing flag shortcuts
@@ -2412,7 +2423,7 @@ WOK
and not (@rc['flag']['i'].nil? \
or @rc['flag']['i'].empty?)
@rc['flag']['i']
- else '-hwepoay'
+ else '-Qhewpoty'
end
end
def cf_2 #processing flag shortcuts
@@ -2420,7 +2431,7 @@ WOK
and not (@rc['flag']['ii'].nil? \
or @rc['flag']['ii'].empty?)
@rc['flag']['ii']
- else '-NhwepoabxXy'
+ else '-NQhewpotbxXy'
end
end
def cf_3 #processing flag shortcuts
@@ -2428,7 +2439,7 @@ WOK
and not (@rc['flag']['iii'].nil? \
or @rc['flag']['iii'].empty?)
@rc['flag']['iii']
- else '-NhwepoabxXyY'
+ else '-NQhewpotbxXyY'
end
end
def cf_4 #processing flag shortcuts
@@ -2436,7 +2447,7 @@ WOK
and not (@rc['flag']['iv'].nil? \
or @rc['flag']['iv'].empty?)
@rc['flag']['iv']
- else '-NhwepoabxXDyY --update'
+ else '-NQhewpotbxXDyY --update'
end
end
def cf_5 #processing flag shortcuts
@@ -2444,7 +2455,7 @@ WOK
and not (@rc['flag']['v'].nil? \
or @rc['flag']['v'].empty?)
@rc['flag']['v']
- else '-NhwepoabxXDyYv --update'
+ else '-NQhewpotbxXDyYv --update'
end
end
end
@@ -3271,6 +3282,12 @@ WOK
fn=base_filename.manifest
make_file(path,fn)
end
+ def manifest_txt
+ path=output_path.manifest.dir
+ make_path(path)
+ fn=base_filename.manifest_txt
+ make_file(path,fn)
+ end
def pot
path=output_path.pot.dir
make_path(path)
@@ -3664,6 +3681,16 @@ WOK
'sitemap' + @md.lang_code_insert + ft
end
end
+ def manifest_txt
+ ft='.txt'
+ 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
ft='.html'
if @env.output_dir_structure.by_language_code?