my @command;
if ($form->submitted eq 'Rebuild Wiki') {
- @command=("ikiwiki", "-setup", $config{setupfile},
- "-rebuild", "-v");
+ @command=("ikiwiki", "--setup", $config{setupfile},
+ "--rebuild", "-v");
}
else {
- @command=("ikiwiki", "-setup", $config{setupfile},
- "-refresh", "-wrappers", "-v");
+ @command=("ikiwiki", "--setup", $config{setupfile},
+ "--refresh", "--wrappers", "-v");
}
close STDERR;
prettydir($config{$key})."\n";
}
print "To modify settings, edit ".prettydir($config{dumpsetup})." and then run:\n";
- print " ikiwiki -setup ".prettydir($config{dumpsetup})."\n";
+ print " ikiwiki --setup ".prettydir($config{dumpsetup})."\n";
exit 0;
}
chmod +x $@
ikiwiki.setup:
- HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -dumpsetup ikiwiki.setup
+ HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --dumpsetup ikiwiki.setup
extra_build: perl_shebangs $(outprogs) ikiwiki.setup docwiki sysconfdir
./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
rm -f ikiwiki.spec.bkp
docwiki:
- $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -refresh
+ $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --refresh
perl_shebangs:
ifneq "$(PERL)" "/usr/bin/perl"
$(PERL) -pi -e "s|\"/etc/ikiwiki|\"$(SYSCONFDIR)|g" $(sysconfdir_scripts)
extra_clean: perl_shebangs_clean
- $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -clean
+ $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --clean
rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc
$(MAKE) -C po clean
# check it into revision control, generate a setup file for the new
# wiki, and set everything up.
#
-# Just run: ikiwiki -setup /etc/ikiwiki/auto-blog.setup
+# Just run: ikiwiki --setup /etc/ikiwiki/auto-blog.setup
#
# By default, it asks a few questions, and confines itself to the user's home
# directory. You can edit it to change what it asks questions about, or to
# This setup file causes ikiwiki to create a wiki, check it into revision
# control, generate a setup file for the new wiki, and set everything up.
#
-# Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
+# Just run: ikiwiki --setup /etc/ikiwiki/auto.setup
#
# By default, it asks a few questions, and confines itself to the user's home
# directory. You can edit it to change what it asks questions about, or to
The `ikiwiki-transition deduplinks` command introduced in the
last release was buggy. If you followed the NEWS file instructions
- and ran it, you should run `ikiwiki -setup` to rebuild your wiki
+ and ran it, you should run `ikiwiki --setup` to rebuild your wiki
to fix the problem.
-- Joey Hess <joeyh@debian.org> Fri, 22 May 2009 13:04:02 -0400
Also, wikis that use the search plugin will need to be rebuilt,
since the search form has changed. This will not be done automatically,
but can be done by running `ikiwiki-mass-upgrade` as root, or
- running `ikiwiki -setup` on individual setup files.
+ running `ikiwiki --setup` on individual setup files.
-- Joey Hess <joeyh@debian.org> Wed, 04 Jun 2008 00:29:28 -0400
dpkg --compare-versions "$2" lt "$firstcompat"; then
ikiwiki-mass-rebuild
else
- ikiwiki-mass-rebuild -refresh -wrappers
+ ikiwiki-mass-rebuild --refresh --wrappers
fi
Or, run this command to set up a blog with ikiwiki.
- % ikiwiki -setup /etc/ikiwiki/auto-blog.setup
+ % ikiwiki --setup /etc/ikiwiki/auto-blog.setup
Some additional configuration you might want to do, if not using
`auto-blog.setup`:
Most of the goals of this command can be replaced by setting up
`calendar_autocreate` setup option (of plugin [[plugins/calendar]]), and
-running `ikiwiki -setup you.setup`. The only thing that `ikiwiki-calendar` can
+running `ikiwiki --setup you.setup`. The only thing that `ikiwiki-calendar` can
do and that `ikiwiki` cannot is forcing page generation (using `-f` switch).
# AUTHOR
## data transfer notes
-If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
+If you run 'ikiwiki --setup my.setup' to force a rebuild of your wiki, the
entire thing will be re-uploaded to Amazon S3. This will take time, and
cost you money, so it should be avoided as much as possible.
-If you run 'ikiwiki -setup my.setup -refresh', ikiwiki will only upload the
+If you run 'ikiwiki --setup my.setup --refresh', ikiwiki will only upload the
modified pages that it refreshes. Faster and cheaper. Still, if you have
very large pages (for example, a page that inlines hundreds of other pages
.. or is just very large), the complete page contents will be re-uploaded
## deleting a bucket
-You can use "ikiwiki -setup my.setup --delete-bucket" to delete anything
+You can use "ikiwiki --setup my.setup --delete-bucket" to delete anything
that's in the configured bucket, and remove the bucket.
of the themes included in ikiwiki and the [[theme market]] for third party themes.
You can set the theme via the **theme** option in your config file (after
-enabling the plugin). Refresh the wiki (with `ikiwiki -setup <file>`, `--setup` won't work, they are not interchangable) after changing it to see the changes.
+enabling the plugin). Refresh the wiki (with `ikiwiki --setup <file>`)
+after changing it to see the changes.
Hints for theme builders
------------------------
git_wrapper => "/working/dir/.git/hooks/post-commit",
Then just committing should refresh the private ikiwiki on the local
-host. Now just run `ikiwiki -setup localwiki.setup -gettime` and
-you should be good to go. (You only need the slow `-gettime` option
+host. Now just run `ikiwiki --setup localwiki.setup --gettime` and
+you should be good to go. (You only need the slow `--gettime` option
the first time you run setup.) Use standard git commands to handle
pulling from and pushing to the server. **Note**: After
pulling changes from the bare root repository, you will need to
manually update the local wiki, with a command such as `ikiwiki
--setup localwiki.setup -refresh`. You could use git's `post-merge` hook
+--setup localwiki.setup --refresh`. You could use git's `post-merge` hook
to automate that command.
## Using ikiwiki with Gerrit
_ This setup file causes ikiwiki to create a wiki, check it into revision
_ control, generate a setup file for the new wiki, and set everything up.
- _ Just run: ikiwiki -setup /etc/ikiwiki/auto.setup
+ _ Just run: ikiwiki --setup /etc/ikiwiki/auto.setup
_By default, it asks a few questions, and confines itself to the user's home
_directory. You can edit it to change what it asks questions about, or to
and configure it so that each page links to the corresponding page on the
server.
-Now just run `ikiwiki -setup wiki.setup -getctime` and you should be
+Now just run `ikiwiki --setup wiki.setup --getctime` and you should be
good to go. (You only need the slow `-getctime` option the first time you
run setup.) If you have taken your `wiki.setup` file from an existing
wiki, you may need to change certain parameters to adapt to the paths
Use standard git commands to handle pulling from and pushing to the server.
Note that if changes are pulled from the server, you will need to manually
-update the wiki, with a command such as `ikiwiki -setup wiki.setup -refresh`.
+update the wiki, with a command such as `ikiwiki --setup wiki.setup --refresh`.
If you'd like it to automatically update when changes are merged in, you
can simply make a symlink `post-merge` hook pointing at the `post-update`
hook ikiwiki created.
mkdir ~/wiki
cd ~/wiki
cp -r ~/ikiwiki/doc/examples/blog/* .
- ikiwiki -dumpsetup ikiwiki.setup
+ ikiwiki --dumpsetup ikiwiki.setup
nano ikiwiki.setup
# Set destdir to /home/htdocs
# Set srcdir to /home/private/wiki
# Set the git_wrapper path to /home/private/wiki.git/hooks/post-update
# Configure the rest to your liking and save the file.
ikiwiki-makerepo git . ../wiki.git
- ikiwiki -setup ikiwiki.setup
+ ikiwiki --setup ikiwiki.setup
## Clean up
Are you building your wiki by running a command like this?
- ikiwiki -setup my.setup
+ ikiwiki --setup my.setup
If so, you're always telling ikiwiki to rebuild the entire site, from
scratch. But, ikiwiki is smart, it can incrementally update a site,
building only things affected by the changes you make. You just have to let
it do so:
- ikiwiki -setup my.setup -refresh
+ ikiwiki --setup my.setup --refresh
Ikiwiki automatically uses an incremental refresh like this when handing
a web edit, or when run from a [[rcs]] post-commit hook. (If you've
configured the hook in the usual way.) Most people who have run into this
-problem got in the habit of running `ikiwiki -setup my.setup` by hand
+problem got in the habit of running `ikiwiki --setup my.setup` by hand
when their wiki was small, and found it got slower as they added pages.
## use the latest version
command. Obviously, more files will make it take longer.
You can avoid this scanning overhead, if you're using git, by setting
- `only_committed_changes`. This makes ikiwiki -refresh query git for
+ `only_committed_changes`. This makes ikiwiki --refresh query git for
changed files since the last time, which tends to be a lot faster.
However, it only works if all files in your wiki are committed to git
(or stored in the [[/plugins/transient]] underlay).
your wiki is upgraded to 3.0.
You can move these preferences into the setup file by running
-`ikiwiki-transition moveprefs your.setup; ikiwiki -setup your.setup -refresh -wrappers`
+`ikiwiki-transition moveprefs your.setup; ikiwiki --setup your.setup --refresh --wrappers`
(Make sure you have converted the setup file to the new format first.)
2. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
files in the srcdir. The command to run is
`ikiwiki-transition aggregateinternal your.setup`,
-3. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+3. Refresh the wiki. (`ikiwiki --setup your.setup --refresh`)
## embed / googlecalendar
IkiWiki::rcs_commit_staged(message => gettext("calendar update"))
if $config{rcs};
-exec("ikiwiki", "-setup", $setup, "-refresh");
-die "failed to run ikiwiki -setup $setup -refresh\n";
+exec("ikiwiki", "--setup", $setup, "--refresh");
+die "failed to run ikiwiki --setup $setup --refresh\n";
return;
}
print "Processing $setup as user ".username()." ...\n";
- my $ret=system("ikiwiki", "-setup", $setup, @ARGV);
+ my $ret=system("ikiwiki", "--setup", $setup, @ARGV);
if ($ret != 0) {
print STDERR "warning: processing $setup failed with code $ret\n";
}
sub usage () {
die gettext("usage: ikiwiki [options] source dest"), "\n",
- gettext(" ikiwiki --setup configfile"), "\n";
+ gettext(" ikiwiki --setup my.setup [options]"), "\n";
}
sub setup (@) {
touch $@
underlays: ../ikiwiki.out underlays_copy_stamp
- ../ikiwiki.out -libdir .. -setup underlay.setup -refresh
+ ../ikiwiki.out --libdir .. --setup underlay.setup --refresh
../ikiwiki.out: ../Makefile
$(MAKE) -C .. ikiwiki.out
ok(! system("make underlay_install DESTDIR=`pwd`/t/tmp/install PREFIX=/usr >/dev/null"));
foreach my $plugin ("", "listdirectives") {
- ok(! system("LC_ALL=C perl -I. ./ikiwiki.out -rebuild -plugin brokenlinks ".
+ ok(! system("LC_ALL=C perl -I. ./ikiwiki.out --rebuild --plugin brokenlinks ".
# always enabled because pages link to it conditionally,
# which brokenlinks cannot handle properly
- "-plugin smiley ".
- ($plugin ? "-plugin $plugin " : "").
- "-underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
- "-set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
- "-templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
+ "--plugin smiley ".
+ ($plugin ? "--plugin $plugin " : "").
+ "--underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki ".
+ "--set underlaydirbase=t/tmp/install/usr/share/ikiwiki ".
+ "--templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
my $result=`grep 'no broken links' t/tmp/out/index.html`;
ok(length($result));
if (! length $result) {
# Build the wiki
ok(! system("make -s ikiwiki.out"));
-ok(! system("perl -I. ./ikiwiki.out -verbose -plugin comments -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -set comments_pagespec='*' -templatedir=templates t/tmp/in t/tmp/out"));
+ok(! system("perl -I. ./ikiwiki.out --verbose --plugin comments --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --set comments_pagespec='*' --templatedir=templates t/tmp/in t/tmp/out"));
# Check that the comments are in the right order
# runs ikiwiki to build test site
sub runiki {
my $testdesc=shift;
- ok((! system("perl -I. ./ikiwiki.out -plugin txt -plugin rawhtml -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates $srcdir $destdir @_")),
+ ok((! system("perl -I. ./ikiwiki.out --plugin txt --plugin rawhtml --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates $srcdir $destdir @_")),
$testdesc);
}
sub refreshiki {
ok(! system("make -s ikiwiki.out"));
-my $command = "perl -I. ./ikiwiki.out -set usedirs=0 -templatedir=templates -plugin img t/tmp/in t/tmp/out -verbose";
+my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --templatedir=templates --plugin img t/tmp/in t/tmp/out --verbose";
ok(! system($command));
ok(! system("make -s ikiwiki.out"));
-my $command = "perl -I. ./ikiwiki.out -set usedirs=0 -plugin inline -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates t/tmp/in t/tmp/out -verbose";
+my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tmp/in t/tmp/out --verbose";
ok(! system($command));
-ok(! system("$command -refresh"));
+ok(! system("$command --refresh"));
$blob = readfile("t/tmp/out/protagonists.html");
like($blob, qr{Add a new post}, 'rootpage=yes gives postform');
ok(! system("rm -rf t/tmp"));
ok(! system("mkdir t/tmp"));
ok(! system("make -s ikiwiki.out"));
-ok(! system("perl -I. ./ikiwiki.out -plugin inline -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates t/tinyblog t/tmp/out"));
+ok(! system("perl -I. ./ikiwiki.out --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tinyblog t/tmp/out"));
# This guid should never, ever change, for any reason whatsoever!
my $guid="http://example.com/post/";
ok(length `egrep '<guid.*>$guid</guid>' t/tmp/out/index.rss`);
my $podcast_style = shift;
my $baseurl = 'http://example.com';
- my @command = (qw(./ikiwiki.out -plugin inline -rss -atom));
+ my @command = (qw(./ikiwiki.out --plugin inline --rss --atom));
push @command, qw(-underlaydir=underlays/basewiki);
- push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
- push @command, "-url=$baseurl", qw(t/tinypodcast), "$tmp/out";
+ push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
+ push @command, "--url=$baseurl", qw(t/tinypodcast), "$tmp/out";
ok(! system("mkdir $tmp"),
q{setup});
sub single_page_html {
my @command = (qw(./ikiwiki.out));
push @command, qw(-underlaydir=underlays/basewiki);
- push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+ push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
push @command, qw(t/tinypodcast), "$tmp/out";
ok(! system("mkdir $tmp"),
q{html enclosure});
my ($href) = _extract_html_links($html, 'piano');
is($href, '/piano.mp3',
- q{html enclosure sans -url is site-absolute});
+ q{html enclosure sans --url is site-absolute});
$html = "$tmp/out/attempted_multiple_enclosures/index.html";
like(_extract_html_content($html, 'content'), qr/has content and/m,
q{html enclosure});
($href) = _extract_html_links($html, 'walter');
is($href, '/walter.ogg',
- q{html enclosure sans -url is site-absolute});
+ q{html enclosure sans --url is site-absolute});
my $baseurl = 'http://example.com';
- ok(! system(@command, "-url=$baseurl", q{--rebuild}));
+ ok(! system(@command, "--url=$baseurl", q{--rebuild}));
$html = "$tmp/out/pianopost/index.html";
($href) = _extract_html_links($html, 'piano');
is($href, "$baseurl/piano.mp3",
- q{html enclosure with -url is fully absolute});
+ q{html enclosure with --url is fully absolute});
$html = "$tmp/out/attempted_multiple_enclosures/index.html";
($href) = _extract_html_links($html, 'walter');
is($href, "$baseurl/walter.ogg",
- q{html enclosure with -url is fully absolute});
+ q{html enclosure with --url is fully absolute});
ok(! system("rm -rf $tmp $statedir"), q{teardown});
}
sub inlined_pages_html {
- my @command = (qw(./ikiwiki.out -plugin inline));
+ my @command = (qw(./ikiwiki.out --plugin inline));
push @command, qw(-underlaydir=underlays/basewiki);
- push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+ push @command, qw(-set underlaydirbase=underlays --templatedir=templates);
push @command, qw(t/tinypodcast), "$tmp/out";
ok(! system("mkdir $tmp"),
q{html enclosure});
my ($href) = _extract_html_links($html, 'piano.mp3');
is($href, '/piano.mp3',
- q{html enclosure from pianopost sans -url});
+ q{html enclosure from pianopost sans --url});
($href) = _extract_html_links($html, 'walter.ogg');
is($href, '/walter.ogg',
- q{html enclosure from attempted_multiple_enclosures sans -url});
+ q{html enclosure from attempted_multiple_enclosures sans --url});
ok(! system("rm -rf $tmp $statedir"), q{teardown});
}
ok(! system("make -s ikiwiki.out"));
-my $command = "perl -I. ./ikiwiki.out -set usedirs=0 -plugin trail -plugin inline -url=http://example.com -cgiurl=http://example.com/ikiwiki.cgi -rss -atom -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates t/tmp/in t/tmp/out -verbose";
+my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --plugin trail --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tmp/in t/tmp/out --verbose";
ok(! system($command));
-ok(! system("$command -refresh"));
+ok(! system("$command --refresh"));
$blob = readfile("t/tmp/out/meme.html");
ok($blob =~ /<a href="(\.\/)?badger.html">badger<\/a>/m);
writefile("untrail.mdwn", "t/tmp/in", "no longer a trail");
-ok(! system("$command -refresh"));
+ok(! system("$command --refresh"));
check_trail("add/a.html", "n=add/b p=");
check_trail("add/b.html", "n=add/c p=add/a");
# wikis. Run this script when upgrading ikiwiki to an incompatible new
# version that requires rebuilding everything.
#
-# ikiwiki-mass-rebuild su's to the listed user and then runs ikiwiki -setup
+# ikiwiki-mass-rebuild su's to the listed user and then runs ikiwiki --setup
# on the specified ikiwiki setup file.
#
# It's also possible to let a user list setup files in ~user/.ikiwiki/wikilist