From 0d66fc712f435d859afd708fadb1dc8ee8c1c6c3 Mon Sep 17 00:00:00 2001 From: Yann Esposito Date: Thu, 11 Oct 2012 16:52:20 +0200 Subject: [PATCH] better graph handling --- lib/graph.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/graph.rb b/lib/graph.rb index 42f80fbbb..3eefa1f23 100644 --- a/lib/graph.rb +++ b/lib/graph.rb @@ -55,8 +55,13 @@ class Graph < Nanoc3::Filter FileUtils.mkdir_p('output'+@item.path+'graph') webpath=@item.path + 'graph/' + filename + '.png' path='output'+webpath - # puts "dot -Tpng -o #{path} /tmp/graphtemp.dot" - system("dot -Tpng -o #{path} /tmp/graphtemp.dot") + if str.match(/pos=/) + prog="neato" + else + prog="dot" + end + # puts "#{prog} -Tpng -o #{path} /tmp/graphtemp.dot" + system("#{prog} -Tpng -o #{path} /tmp/graphtemp.dot") # puts %{#{title}} %{
#{title}
#{title}
} end