aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r--lib/sisu/v3/sysenv.rb62
1 files changed, 39 insertions, 23 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index d709cd52..30ff2e9b 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -696,28 +696,39 @@ module SiSU_Env
end
def relaxng(cmd='') #trang - convert between different schema languages for XML
program='trang'
- program_ref="\n\t\tsee http://www.thaiopensource.com/relaxng/trang.html"
+ program_ref="\n\t\tsee <http://www.thaiopensource.com/relaxng/trang.html>"
if program_found?(program); system("trang #{@input} #{@output}")
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/"
+ program_ref="\n\t\tsee <http://www.imagemagick.org/>"
found=(program_found?(program)) ? true : false
puts "\tWARN: #{program} is not installed #{program_ref}" unless found
found
end
def graphicksmagick #graphicsmagick is a image manipulation program
program='gm'
- program_ref="\n\t\tsee http://www.graphicsmagick.org/"
+ program_ref="\n\t\tsee <http://www.graphicsmagick.org/>"
found=(program_found?(program)) ? true : false
puts "\tWARN: #{program} is not installed #{program_ref}" unless found
found
end
def well_formed? #tidy - check for well formed xml xhtml etc.
program=@prog.tidy
- program_ref="\n\t\tsee http://tidy.sourceforge.net/"
+ program_ref="\n\t\tsee <http://tidy.sourceforge.net/>"
if program_found?(program); system("#{@prog.tidy} -xml #{@input} > #{@output}")
else puts "\tWARN: #{program} is not installed #{program_ref}"
end
@@ -741,8 +752,7 @@ module SiSU_Env
end
def latex2pdf(md,papersize='a4') #convert from latex to pdf
tell=((@cmd =~/[MVv]/) ? '' : '> /dev/null' )
- mode='batchmode'
- #mode='nonstopmode'
+ mode='batchmode' #mode='nonstopmode'
program_ref="\n\t\tSee http://www.tug.org/applications/pdftex/\n\t\tOn Debian this is is included in tetex-extra"
texpdf=tex2pdf_engine
if @pdfetex_flag;
@@ -2142,20 +2152,10 @@ WOK
#end
def images_local
if FileTest.directory?(path.image_source_include)
- if @@image_flag
- images=Dir.glob("#{path.image_source_include}/*.{png,jpg,gif}")
- pth="#{path.webserv}/#{@stub_pwd}"
- mkdir_p("#{pth}/_sisu/image") unless FileTest.directory?("#{pth}/_sisu/image")
- images.each { |i| File.install(i,"#{pth}/#{i}") } unless images.length > 0
- @@image_flag=false
- end
path.image_source_include
-# "#{Xx[:html_relative2]}/_sisu/image"
else
if @@local_image==true
- cmd=if @cmd; @cmd
- else ''
- end
+ cmd=@cmd ? @cmd : ''
SiSU_Screen::Ansi.new(cmd,"WARNING - no local image directory or images:", defaults[:image_local] ).warn unless cmd =~/q/
@@local_image=false
end
@@ -2415,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
@@ -2423,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
@@ -2431,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
@@ -2439,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
@@ -2447,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
@@ -2455,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
@@ -3282,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)
@@ -3675,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?