]> sipb.mit.edu Git - ikiwiki.git/blobdiff - ikiwiki.pl
web commit by EthanGlasserCamp: Oops, this is what the patch actually says!
[ikiwiki.git] / ikiwiki.pl
index 1342ec543f3e54c216e16cb615e9493c67484e8a..60ba5e182644b1734d7c3a27939bee5e44a8be64 100755 (executable)
@@ -3,6 +3,7 @@ $ENV{PATH}="/usr/local/bin:/usr/bin:/bin";
 delete @ENV{qw{IFS CDPATH ENV BASH_ENV}};
 
 package IkiWiki;
+
 use warnings;
 use strict;
 use lib '.'; # For use without installation, removed by Makefile.
@@ -21,8 +22,10 @@ sub getconfig () { #{{{
                        "setup|s=s" => \$config{setup},
                        "wikiname=s" => \$config{wikiname},
                        "verbose|v!" => \$config{verbose},
+                       "syslog!" => \$config{syslog},
                        "rebuild!" => \$config{rebuild},
                        "refresh!" => \$config{refresh},
+                       "render=s" => \$config{render},
                        "wrappers!" => \$config{wrappers},
                        "getctime" => \$config{getctime},
                        "wrappermode=i" => \$config{wrappermode},
@@ -30,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},
@@ -42,6 +46,8 @@ sub getconfig () { #{{{
                        "svnpath" => \$config{svnpath},
                        "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]/;
                        },
@@ -63,12 +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 $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);
@@ -106,6 +116,10 @@ sub main () { #{{{
                require IkiWiki::Wrapper;
                gen_wrapper();
        }
+       elsif ($config{render}) {
+               require IkiWiki::Render;
+               commandline_render();
+       }
        else {
                lockwiki();
                loadindex();