add news item for ikiwiki 3.20110328
[ikiwiki.git] / auto.setup
blobafb54b3241895db1315da23567ad242096ac85ea
1 #!/usr/bin/perl
2 # Ikiwiki setup automator.
3 #
4 # This setup file causes ikiwiki to create a wiki, check it into revision
5 # control, generate a setup file for the new wiki, and set everything up.
7 # Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
9 # By default, it asks a few questions, and confines itself to the user's home
10 # directory. You can edit it to change what it asks questions about, or to
11 # modify the values to use site-specific settings.
13 require IkiWiki::Setup::Automator;
15 our $wikiname=IkiWiki::Setup::Automator::ask(
16 gettext("What will the wiki be named?"), gettext("wiki"));
17 our $wikiname_short=IkiWiki::Setup::Automator::sanitize_wikiname($wikiname);
18 our $rcs=IkiWiki::Setup::Automator::ask(
19 gettext("What revision control system to use?"), "git");
20 our $admin=IkiWiki::Setup::Automator::ask(
21 gettext("Which user (wiki account or openid) will be admin?"), $ENV{USER});
22 use Net::Domain q{hostfqdn};
23 our $domain=hostfqdn() || IkiWiki::Setup::Automator::ask(
24 gettext("What is the domain name of the web server?"), "");
26 IkiWiki::Setup::Automator->import(
27 wikiname => $wikiname,
28 adminuser => [$admin],
29 rcs => $rcs,
30 srcdir => "$ENV{HOME}/$wikiname_short",
31 destdir => "$ENV{HOME}/public_html/$wikiname_short",
32 repository => "$ENV{HOME}/$wikiname_short.".($rcs eq "monotone" ? "mtn" : $rcs),
33 dumpsetup => "$ENV{HOME}/$wikiname_short.setup",
34 url => "http://$domain/~$ENV{USER}/$wikiname_short",
35 cgiurl => "http://$domain/~$ENV{USER}/$wikiname_short/ikiwiki.cgi",
36 cgi_wrapper => "$ENV{HOME}/public_html/$wikiname_short/ikiwiki.cgi",
37 adminemail => "$ENV{USER}\@$domain",
38 add_plugins => [qw{goodstuff websetup}],
39 disable_plugins => [qw{}],
40 libdir => "$ENV{HOME}/.ikiwiki",
41 rss => 1,
42 atom => 1,
43 syslog => 1,