too many plugins.. brain exploding..
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
aggregateinternal => {
type => "boolean",
example => 0,
sub getsetup () { #{{{
return
- amazon_s3_key_id => {
+ plugin => {
+ safe => 0,
+ rebuild => 0,
+ },
+ amazon_s3_key_id => {
type => "string",
example => "XXXXXXXXXXXXXXXXXXXX",
description => "public access key id",
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0,
+ rebuild => 0,
+ },
anonok_pagespec => {
type => "pagespec",
example => "*/discussion",
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
virus_checker => {
type => "string",
example => "clamdscan -",
},
allowed_attachments => {
type => "pagespec",
- example => "mimetype(image/*) and maxsize(50kb)",
+ example => "virusfree() and mimetype(image/*) and maxsize(50kb)",
description => "enhanced PageSpec specifying what attachments are allowed",
link => "ikiwiki/PageSpec/attachment",
safe => 1,
use Encode;
sub import { #{{{
+ hook(type => "getsetup", id => "autoindex", call => \&getsetup);
hook(type => "refresh", id => "autoindex", call => \&refresh);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub genindex ($) { #{{{
my $page=shift;
my $file=$page.".".$config{default_pageext};
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "brokenlinks", call => \&getsetup);
hook(type => "preprocess", id => "brokenlinks", call => \&preprocess);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
bzr_wrapper => {
type => "string",
#example => "", # FIXME add example
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
archivebase => {
type => "string",
example => "archives",
}x;
sub import { #{{{
+ hook(type => "getsetup", id => "camelcase", call => \&getsetup);
hook(type => "linkify", id => "camelcase", call => \&linkify);
hook(type => "scan", id => "camelcase", call => \&scan);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ };
+} #}}}
+
sub linkify (@) { #{{{
my %params=@_;
my $page=$params{page};
use UNIVERSAL;
sub import { #{{{
+ hook(type => "getsetup", id => "conditional", call => \&getsetup);
hook(type => "preprocess", id => "if", call => \&preprocess_if);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess_if (@) { #{{{
my %params=@_;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "creole", call => \&getsetup);
hook(type => "htmlize", id => "creole", call => \&htmlize);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+} #}}}
+
sub htmlize (@) { #{{{
my %params=@_;
my $content = $params{content};
my %savedtext;
sub import { #{{{
+ hook(type => "getsetup", id => "cutpaste", call => \&getsetup);
hook(type => "preprocess", id => "cut", call => \&preprocess_cut, scan => 1);
hook(type => "preprocess", id => "copy", call => \&preprocess_copy, scan => 1);
hook(type => "preprocess", id => "paste", call => \&preprocess_paste);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess_cut (@) { #{{{
my %params=@_;
no warnings;
sub import { #{{{
+ hook(type => "getsetup", id => "ddate", call => \&getsetup);
hook(type => "checkconfig", id => "ddate", call => \&checkconfig);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+} #}}}
+
sub checkconfig () { #{{{
if (! defined $config{timeformat} ||
$config{timeformat} eq '%c') {
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "editdiff", call => \&getsetup);
hook(type => "formbuilder_setup", id => "editdiff",
call => \&formbuilder_setup);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub diff ($$) { #{{{
my $orig=shift;
my $content=shift;
use Encode;
sub import { #{{{
+ hook(type => "getsetup", id => "edittemplate",
+ call => \&getsetup);
hook(type => "needsbuild", id => "edittemplate",
call => \&needsbuild);
hook(type => "preprocess", id => "edittemplate",
call => \&formbuilder);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub needsbuild (@) { #{{{
my $needsbuild=shift;
my @embedded;
sub import { #{{{
+ hook(type => "getsetup", id => "embed", call => \&getsetup);
hook(type => "filter", id => "embed", call => \&filter);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub embed ($) { #{{{
hook(type => "format", id => "embed", call => \&format) unless @embedded;
push @embedded, shift;
#!/usr/bin/perl
# Support for external plugins written in other languages.
-# Communication via XML RPC a pipe.
+# Communication via XML RPC to a pipe.
# See externaldemo for an example of a plugin that uses this.
package IkiWiki::Plugin::external;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "favicon", call => \&getsetup);
hook(type => "pagetemplate", id => "favicon", call => \&pagetemplate);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+} #}}}
+
sub pagetemplate (@) { #{{{
my %params=@_;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "fortune", call => \&getsetup);
hook(type => "preprocess", id => "fortune", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
$ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
my $f = `fortune 2>/dev/null`;
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
git_wrapper => {
type => "string",
example => "/git/wiki.git/hooks/post-update",
};
sub import { #{{{
+ hook(type => "getsetup", id => "goodstuff", call => \&getsetup);
IkiWiki::loadplugin($_) foreach @bundle;
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
1
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "googlecalendar",
+ call => \&getsetup);
hook(type => "preprocess", id => "googlecalendar",
call => \&preprocess);
hook(type => "format", id => "googlecalendar",
call => \&format);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "graphviz", call => \&getsetup);
hook(type => "preprocess", id => "graphviz", call => \&graph);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
my %graphviz_programs = (
"dot" => 1, "neato" => 1, "fdp" => 1, "twopi" => 1, "circo" => 1
);
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "haiku", call => \&getsetup);
hook(type => "preprocess", id => "haiku", call => \&preprocess);
} # }}}
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
use IkiWiki 2.00;
use File::Temp qw(:mktemp);
-sub import {
+sub import { #{{{
+ hook(type => "getsetup", id => "hnb", call => \&getsetup);
hook(type => "htmlize", id => "hnb", call => \&htmlize);
-}
+} #}}}
-sub htmlize (@) {
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+} #}}}
+
+sub htmlize (@) { #{{{
my %params = @_;
# hnb outputs version number etc. every time to STDOUT, so
$ret =~ s/<body>.*//si;
return $ret;
-}
+} #}}}
1;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "html", call => \&getsetup);
hook(type => "htmlize", id => "html", call => \&htmlize);
hook(type => "htmlize", id => "htm", call => \&htmlize);
$config{wiki_file_prune_regexps} = [ grep { !m/\\\.x\?html\?\$/ } @{$config{wiki_file_prune_regexps}} ];
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+} #}}}
+
sub htmlize (@) { #{{{
my %params=@_;
return $params{content};
our $safe_url_regexp;
sub import { #{{{
+ hook(type => "getsetup", id => "htmlscrubber", call => \&getsetup);
hook(type => "sanitize", id => "htmlscrubber", call => \&sanitize);
# Only known uri schemes are allowed to avoid all the ways of
$safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/|[^:]+(?:$|\/))/i;
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub sanitize (@) { #{{{
my %params=@_;
return scrubber()->scrub($params{content});
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "tidy", call => \&getsetup);
hook(type => "sanitize", id => "tidy", call => \&sanitize);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub sanitize (@) { #{{{
my %params=@_;
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "httpauth", call => \&getsetup);
hook(type => "auth", id => "httpauth", call => \&auth);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
+} #}}}
+
sub auth ($$) { #{{{
my $cgi=shift;
my $session=shift;
my %imgdefaults;
sub import { #{{{
+ hook(type => "getsetup", id => "img", call => \&getsetup);
hook(type => "preprocess", id => "img", call => \&preprocess, scan => 1);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my ($image) = $_[0] =~ /$config{wiki_file_regexp}/; # untaint
my %params=@_;
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
rss => {
type => "boolean",
example => 0,
my $link_regexp;
sub import { #{{{
+ hook(type => "getsetup", id => "link", call => \&getsetup);
hook(type => "checkconfig", id => "link", call => \&checkconfig);
hook(type => "linkify", id => "link", call => \&linkify);
hook(type => "scan", id => "link", call => \&scan);
hook(type => "renamepage", id => "link", call => \&renamepage);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+} #}}}
+
sub checkconfig () { #{{{
if ($config{prefix_directives}) {
$link_regexp = qr{
use IPC::Open2;
sub import { #{{{
+ hook(type => "getsetup", id => "linkmap", call => \&getsetup);
hook(type => "preprocess", id => "linkmap", call => \&preprocess);
hook(type => "format", id => "linkmap", call => \&format);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
my $mapnum=0;
my %maps;
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ },
locked_pages => {
type => "pagespec",
example => "!*/Discussion",
use IkiWiki 2.00;
sub import { #{{{
+ hook(type => "getsetup", id => "map", call => \&getsetup);
hook(type => "preprocess", id => "map", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
$params{pages}="*" unless defined $params{pages};
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
multimarkdown => {
type => "boolean",
example => 0,
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
mercurial_wrapper => {
type => "string",
#example => # FIXME add example
my %metaheaders;
sub import { #{{{
+ hook(type => "getsetup", id => "meta", call => \&getsetup);
hook(type => "needsbuild", id => "meta", call => \&needsbuild);
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
hook(type => "pagetemplate", id => "meta", call => \&pagetemplate);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub needsbuild (@) { #{{{
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
mirrorlist => {
type => "string",
example => {},
sub getsetup () { #{{{
return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => undef,
+ },
mtn_wrapper => {
type => "string",
example => "/srv/mtn/wiki/_MTN/ikiwiki-netsync-hook",
my $linktext = gettext("more");
sub import { #{{{
- hook(type => "preprocess", id => "more", call => \&preprocess);
+ hook(type => "getsetup", id => "more", call => \&getsetup);
+ hook(type => "preprocess", id => "more", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
use IkiWiki;
sub import { #{{{
+ hook(type => "getsetup", id => "norcs", call => \&getsetup);
hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
hook(type => "rcs", id => "rcs_prepedit", call => \&rcs_prepedit);
hook(type => "rcs", id => "rcs_commit", call => \&rcs_commit);
hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime);
} #}}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 0, # rcs plugin
+ rebuild => 0,
+ },
+} #}}}
+
+
sub rcs_update () { #{{{
} #}}}
my $plugin_forced=defined $plugin && (! $plugininfo{safe} ||
(exists $config{websetup_force_plugins} && grep { $_ eq $plugin } @{$config{websetup_force_plugins}}));
if ($plugin_forced && ! $enabled) {
- # plugin is disabled and cannot be turned on,
- # so skip its configuration
+ # plugin is forced disabled, so skip its configuration
return;
}