X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2c05a34be17c805d929f0ad563acf857eba1d46b..f01a5c9df70ad1e001685dc24b8d2cd2df0d05af:/IkiWiki/Plugin/sparkline.pm diff --git a/IkiWiki/Plugin/sparkline.pm b/IkiWiki/Plugin/sparkline.pm index bcff46aeb..1ed65e5b7 100644 --- a/IkiWiki/Plugin/sparkline.pm +++ b/IkiWiki/Plugin/sparkline.pm @@ -3,7 +3,7 @@ package IkiWiki::Plugin::sparkline; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; use IPC::Open2; my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/; @@ -14,11 +14,20 @@ my %locmap=( left => 'TEXT_LEFT', ); -sub import { #{{{ +sub import { + hook(type => "getsetup", id => "sparkline", call => \&getsetup); hook(type => "preprocess", id => "sparkline", call => \&preprocess); -} # }}} +} -sub preprocess (@) { #{{{ +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, +} + +sub preprocess (@) { my %params=@_; my $php; @@ -157,6 +166,6 @@ sub preprocess (@) { #{{{ } return 'graph'; -} # }}} +} 1