]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki.pl
web commit by shoesorder
[git.ikiwiki.info.git] / ikiwiki.pl
index aa0fd136a14c46ff9a2a961c16f8fc0840d37302..60ba5e182644b1734d7c3a27939bee5e44a8be64 100755 (executable)
@@ -3,7 +3,6 @@ $ENV{PATH}="/usr/local/bin:/usr/bin:/bin";
 delete @ENV{qw{IFS CDPATH ENV BASH_ENV}};
 
 package IkiWiki;
-our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
 
 use warnings;
 use strict;
@@ -26,6 +25,7 @@ sub getconfig () { #{{{
                        "syslog!" => \$config{syslog},
                        "rebuild!" => \$config{rebuild},
                        "refresh!" => \$config{refresh},
+                       "render=s" => \$config{render},
                        "wrappers!" => \$config{wrappers},
                        "getctime" => \$config{getctime},
                        "wrappermode=i" => \$config{wrappermode},
@@ -33,6 +33,7 @@ sub getconfig () { #{{{
                        "no-rcs" => sub { $config{rcs}="" },
                        "anonok!" => \$config{anonok},
                        "rss!" => \$config{rss},
+                       "atom!" => \$config{atom},
                        "cgi!" => \$config{cgi},
                        "discussion!" => \$config{discussion},
                        "w3mmode!" => \$config{w3mmode},
@@ -46,6 +47,7 @@ sub getconfig () { #{{{
                        "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]/;
                        },
@@ -67,16 +69,16 @@ sub getconfig () { #{{{
                        "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);
@@ -114,6 +116,10 @@ sub main () { #{{{
                require IkiWiki::Wrapper;
                gen_wrapper();
        }
+       elsif ($config{render}) {
+               require IkiWiki::Render;
+               commandline_render();
+       }
        else {
                lockwiki();
                loadindex();