lib/templates/Rakefile_hiki_sync in hikiutils-0.2.3.8 vs lib/templates/Rakefile_hiki_sync in hikiutils-0.2.3.9

- old
+ new

@@ -30,13 +30,13 @@ print stdout files=[] stdout.split("\n").each{|line| files << line.split(/\s+/)[-1] } - r_files = files.reverse[0..-5] + p r_files = files.reverse[0..-4] r_files.each{|file| - print "remove #{file}[ynql]?" + print "remove #{file}[ynqlA]?" input=STDIN.gets.chomp case input when 'y' p command="hiki --remove #{file}" system command @@ -44,10 +44,21 @@ when 'l' p command="hiki -l #{$basename}" system command when 'q' exit + when 'A' + print "\nAre you sure?[Yn]" + input2 = STDIN.gets.chomp + case input2 + when 'Y' + r_files.each{|file| system "hiki --remove #{file}"} + p target = File.join($hiki_dir,'cache','attach',$basename) + exit + when 'n' + exit + end end } end desc "latex_dirのゴミを掃除" @@ -147,11 +158,12 @@ } p $section_layer end def check_bounding_box - $bounding_box="0 0 442 432" +# $bounding_box="0 0 442 432" + $bounding_box=" 0 0 737 453" end desc "すべてのhikiファイルをlatex変換" task :latex_all do p entries=Dir.entries('.') @@ -213,10 +225,10 @@ lines = File.readlines(tf2) system "rm #{tf1} #{tf2}" cont = "" lines.each{|line| if m=line.match(/\\includegraphics\[width=6cm\]\{(.+)\}/) - p line="\\includegraphics\[width=6cm,bb=#{$bounding_box}\]\{../figs/#{m[1]}\}\n" + p line="\\includegraphics\[width=10cm,bb=#{$bounding_box}\]\{../figs/#{m[1]}\}\n" cont << line else cont << line end }