delete @ENV{qw{IFS CDPATH ENV BASH_ENV}};
package IkiWiki;
-our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
use warnings;
use strict;
"syslog!" => \$config{syslog},
"rebuild!" => \$config{rebuild},
"refresh!" => \$config{refresh},
+ "render=s" => \$config{render},
"wrappers!" => \$config{wrappers},
"getctime" => \$config{getctime},
"wrappermode=i" => \$config{wrappermode},
"no-rcs" => sub { $config{rcs}="" },
"anonok!" => \$config{anonok},
"rss!" => \$config{rss},
+ "atom!" => \$config{atom},
"cgi!" => \$config{cgi},
"discussion!" => \$config{discussion},
"w3mmode!" => \$config{w3mmode},
"adminemail=s" => \$config{adminemail},
"timeformat=s" => \$config{timeformat},
"sslcookie!" => \$config{sslcookie},
+ "httpauth!" => \$config{httpauth},
"exclude=s@" => sub {
$config{wiki_file_prune_regexp}=qr/$config{wiki_file_prune_regexp}|$_[1]/;
},
"disable-plugin=s@" => sub {
$config{plugin}=[grep { $_ ne $_[1] } @{$config{plugin}}];
},
- "pingurl" => sub {
+ "pingurl=s" => sub {
push @{$config{pingurl}}, $_[1];
},
"version" => sub {
- print "ikiwiki version $version\n";
+ print "ikiwiki version $IkiWiki::version\n";
exit;
},
) || usage();
- if (! $config{setup}) {
+ if (! $config{setup} && ! $config{render}) {
loadplugins();
usage() unless @ARGV == 2;
$config{srcdir} = possibly_foolish_untaint(shift @ARGV);
require IkiWiki::Wrapper;
gen_wrapper();
}
+ elsif ($config{render}) {
+ require IkiWiki::Render;
+ commandline_render();
+ }
else {
lockwiki();
loadindex();