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