X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a7cb3090902e23e2b0f2371539ade7ec5a4ba01b..54be16aaa8a6428b8f6e3015e452678a80dc233c:/ikiwiki-calendar?ds=inline diff --git a/ikiwiki-calendar b/ikiwiki-calendar index ec572cb7c..a9548d6ec 100755 --- a/ikiwiki-calendar +++ b/ikiwiki-calendar @@ -15,7 +15,8 @@ GetOptions( ) || usage(); my $setup=shift || usage(); my $pagespec=shift || "*"; -my $year=shift || 1900+(localtime(time))[5]; +my $startyear=shift || 1900+(localtime(time))[5]; +my $endyear=shift || $startyear; %config=IkiWiki::defaultconfig(); IkiWiki::Setup::load($setup); @@ -43,9 +44,7 @@ sub writearchive ($$;$) { } } -IkiWiki::lockwiki(); - -foreach my $y ($year-1, $year, $year+1) { +foreach my $y ($startyear..$endyear) { writearchive("calendaryear.tmpl", $y); foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { writearchive("calendarmonth.tmpl", $y, $m); @@ -54,6 +53,5 @@ foreach my $y ($year-1, $year, $year+1) { IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) if $config{rcs}; -IkiWiki::unlockwiki(); system("ikiwiki", "-setup", $setup, "-refresh");