initial htmlize hook
authorDavid Bremner <bremner@unb.ca>
Mon, 1 Sep 2008 01:05:26 +0000 (22:05 -0300)
committerDavid Bremner <bremner@unb.ca>
Mon, 1 Sep 2008 14:39:21 +0000 (11:39 -0300)
IkiWiki/Plugin/mailbox.pm

index 84648e402dfe385e9859552aaa4cf53593c2fc78..e619eb35fc3c12b89088bb42b60c5daa14cdc1d2 100644 (file)
@@ -28,6 +28,7 @@ sub import { #{{{
        hook(type => "preprocess", id => "mailbox", call => \&preprocess);
        hook(type => "scan", id => "mailbox", call => \&scan);
        hook(type => "pagetemplate", id=>"mailbox", call => \&pagetemplate);
+       hook(type => "htmlize",id=>"mbox",call => \&mbox_htmlize);
        IkiWiki::loadplugin("filecheck");
 } # }}}
 
@@ -59,6 +60,12 @@ sub preprocess (@) { #{{{
 
 } # }}}
 
+sub mbox_htmlize(@){
+    my %params=@_;
+    
+    my $path=$config{srcdir} . '/' . $params{page}.".mbox";
+    return format_mailbox(path=>$path,type=>'Mbox',destpage=>$params{page});
+}
 
 ### The guts of the plugin
 ### parameters