2 # haiku generator plugin
3 package IkiWiki::Plugin::haiku;
10 hook(type => "getsetup", id => "haiku", call => \&getsetup);
11 hook(type => "preprocess", id => "haiku", call => \&preprocess);
27 if ($@ || ! Coy->can("Coy::with_haiku")) {
30 No darting, subtle haiku.
34 no, wait, that's not quite it
38 no code, count Five-Seven-Five
43 $haiku=$canned[rand @canned];
46 $haiku=Coy::with_haiku($params{hint} ? $params{hint} : $params{page});
49 $haiku=~s/\s+-----\n//s;
50 $haiku=~s/\s+-----.*//s;
54 $haiku=~s/\n/<br \/>\n/mg;
56 return "\n\n<blockquote><p>$haiku</p></blockquote>\n\n";