From: Anders Kaseorg Date: Fri, 31 Jan 2014 05:19:59 +0000 (-0500) Subject: Merge commit 'baaa848f6c06b0b3a59677d3551e130c65e5fde7' into sipb X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/8e072cf1b075389b0bcf9e94e3ce3cf97ef48d5c?hp=3be4e72f3843154ec22a8dd4ff2c24e35f39f1d7 Merge commit 'baaa848f6c06b0b3a59677d3551e130c65e5fde7' into sipb Conflicts: templates/page.tmpl --- diff --git a/.gitignore b/.gitignore index 8de36e2c8..e9ab152b6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,10 @@ blib/* doc/.ikiwiki/* html/* ikiwiki.out +ikiwiki-transition.out +ikiwiki-calendar.out pm_to_blib *.man -build-stamp po/po2wiki_stamp po/underlays/*/*.mdwn po/underlays/basewiki/*/*.mdwn diff --git a/Bundle/IkiWiki/Extras.pm b/Bundle/IkiWiki/Extras.pm index 48bd127f1..5bbd7b8c6 100644 --- a/Bundle/IkiWiki/Extras.pm +++ b/Bundle/IkiWiki/Extras.pm @@ -35,6 +35,7 @@ Text::WikiCreole Term::ReadLine::Gnu HTML::Tree Sort::Naturally +YAML =head1 AUTHOR diff --git a/IkiWiki.pm b/IkiWiki.pm index 022bfe3bd..1730e476a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins}; + %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage deptype add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles - %pagesources %destsources); + %pagesources %destsources %typedlinks); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE @@ -37,6 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); +memoize("sortspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1164,7 +1165,7 @@ sub htmlize ($$$$) { my $content=shift; my $oneline = $content !~ /\n/; - + if (exists $hooks{htmlize}{$type}) { $content=$hooks{htmlize}{$type}{call}->( page => $page, @@ -1185,10 +1186,9 @@ sub htmlize ($$$$) { if ($oneline) { # hack to get rid of enclosing junk added by markdown - # and other htmlizers + # and other htmlizers/sanitizers $content=~s/^

//i; - $content=~s/<\/p>$//i; - chomp $content; + $content=~s/<\/p>\n*$//i; } return $content; @@ -1503,7 +1503,7 @@ sub loadindex () { if (! $config{rebuild}) { %pagesources=%pagemtime=%oldlinks=%links=%depends= %destsources=%renderedfiles=%pagecase=%pagestate= - %depends_simple=(); + %depends_simple=%typedlinks=%oldtypedlinks=(); } my $in; if (! open ($in, "<", "$config{wikistatedir}/indexdb")) { @@ -1569,6 +1569,14 @@ sub loadindex () { if (exists $d->{state}) { $pagestate{$page}=$d->{state}; } + if (exists $d->{typedlinks}) { + $typedlinks{$page}=$d->{typedlinks}; + + while (my ($type, $links) = each %{$typedlinks{$page}}) { + next unless %$links; + $oldtypedlinks{$page}{$type} = {%$links}; + } + } } $oldrenderedfiles{$page}=[@{$d->{dest}}]; } @@ -1617,6 +1625,10 @@ sub saveindex () { $index{page}{$src}{depends_simple} = $depends_simple{$page}; } + if (exists $typedlinks{$page} && %{$typedlinks{$page}}) { + $index{page}{$src}{typedlinks} = $typedlinks{$page}; + } + if (exists $pagestate{$page}) { foreach my $id (@hookids) { foreach my $key (keys %{$pagestate{$page}{$id}}) { @@ -1796,7 +1808,7 @@ sub add_depends ($$;$) { # Add explicit dependencies for influences. my $sub=pagespec_translate($pagespec); - return if $@; + return unless defined $sub; foreach my $p (keys %pagesources) { my $r=$sub->($p, location => $page); my $i=$r->influences; @@ -1926,12 +1938,82 @@ sub inject { use warnings; } -sub add_link ($$) { +sub add_link ($$;$) { my $page=shift; my $link=shift; + my $type=shift; push @{$links{$page}}, $link unless grep { $_ eq $link } @{$links{$page}}; + + if (defined $type) { + $typedlinks{$page}{$type}{$link} = 1; + } +} + +sub sortspec_translate ($$) { + my $spec = shift; + my $reverse = shift; + + my $code = ""; + my @data; + while ($spec =~ m{ + \s* + (-?) # group 1: perhaps negated + \s* + ( # group 2: a word + \w+\([^\)]*\) # command(params) + | + [^\s]+ # or anything else + ) + \s* + }gx) { + my $negated = $1; + my $word = $2; + my $params = undef; + + if ($word =~ m/^(\w+)\((.*)\)$/) { + # command with parameters + $params = $2; + $word = $1; + } + elsif ($word !~ m/^\w+$/) { + error(sprintf(gettext("invalid sort type %s"), $word)); + } + + if (length $code) { + $code .= " || "; + } + + if ($negated) { + $code .= "-"; + } + + if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { + if (defined $params) { + push @data, $params; + $code .= "IkiWiki::SortSpec::cmp_$word(\$data[$#data])"; + } + else { + $code .= "IkiWiki::SortSpec::cmp_$word(undef)"; + } + } + else { + error(sprintf(gettext("unknown sort type %s"), $word)); + } + } + + if (! length $code) { + # undefined sorting method... sort arbitrarily + return sub { 0 }; + } + + if ($reverse) { + $code="-($code)"; + } + + no warnings; + return eval 'sub { '.$code.' }'; } sub pagespec_translate ($) { @@ -2001,7 +2083,7 @@ sub pagespec_match ($$;@) { my $sub=pagespec_translate($spec); return IkiWiki::ErrorReason->new("syntax error in pagespec \"$spec\"") - if $@ || ! defined $sub; + if ! defined $sub; return $sub->($page, @params); } @@ -2019,7 +2101,9 @@ sub pagespec_match_list ($$;@) { my $sub=pagespec_translate($pagespec); error "syntax error in pagespec \"$pagespec\"" - if $@ || ! defined $sub; + if ! defined $sub; + my $sort=sortspec_translate($params{sort}, $params{reverse}) + if defined $params{sort}; my @candidates; if (exists $params{list}) { @@ -2032,39 +2116,19 @@ sub pagespec_match_list ($$;@) { ? grep { ! $params{filter}->($_) } keys %pagesources : keys %pagesources; } - - if (defined $params{sort}) { - my $f; - if ($params{sort} eq 'title') { - $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; - } - elsif ($params{sort} eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; - } - elsif ($params{sort} eq 'mtime') { - $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; - } - elsif ($params{sort} eq 'age') { - $f=sub { $pagectime{$b} <=> $pagectime{$a} }; - } - else { - error sprintf(gettext("unknown sort type %s"), $params{sort}); - } - @candidates = sort { &$f } @candidates; - } - - @candidates=reverse(@candidates) if $params{reverse}; - - $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); # clear params, remainder is passed to pagespec + $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); my $num=$params{num}; delete @params{qw{num deptype reverse sort filter list}}; + # when only the top matches will be returned, it's efficient to + # sort before matching to pagespec, + if (defined $num && defined $sort) { + @candidates=IkiWiki::SortSpec::sort_pages( + $sort, @candidates); + } + my @matches; my $firstfail; my $count=0; @@ -2086,14 +2150,21 @@ sub pagespec_match_list ($$;@) { $depends_simple{$page}{lc $k} |= $i->{$k}; } - return @matches; + # when all matches will be returned, it's efficient to + # sort after matching + if (! defined $num && defined $sort) { + return IkiWiki::SortSpec::sort_pages( + $sort, @matches); + } + else { + return @matches; + } } sub pagespec_valid ($) { my $spec=shift; - my $sub=pagespec_translate($spec); - return ! $@; + return defined pagespec_translate($spec); } sub glob2re ($) { @@ -2213,26 +2284,34 @@ sub match_link ($$;@) { $link=derel($link, $params{location}); my $from=exists $params{location} ? $params{location} : ''; + my $linktype=$params{linktype}; + my $qualifier=''; + if (defined $linktype) { + $qualifier=" with type $linktype"; + } my $links = $IkiWiki::links{$page}; - return IkiWiki::FailReason->new("$page has no links", "" => 1) + return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1) unless $links && @{$links}; my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if $bestlink eq IkiWiki::bestlink($page, $p); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && $bestlink eq IkiWiki::bestlink($page, $p)) { + return IkiWiki::SuccessReason->new("$page links to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && match_glob($p, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p_rel, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p_rel}) && match_glob($p_rel, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p_rel$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } } - return IkiWiki::FailReason->new("$page does not link to $link", "" => 1); + return IkiWiki::FailReason->new("$page does not link to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1); } sub match_backlink ($$;@) { @@ -2367,4 +2446,22 @@ sub match_ip ($$;@) { } } +package IkiWiki::SortSpec; + +# This is in the SortSpec namespace so that the $a and $b that sort() uses +# are easily available in this namespace, for cmp functions to use them. +sub sort_pages { + my $f=shift; + sort $f @_ +} + +sub cmp_title { + IkiWiki::pagetitle(IkiWiki::basename($a)) + cmp + IkiWiki::pagetitle(IkiWiki::basename($b)) +} + +sub cmp_mtime { $IkiWiki::pagemtime{$b} <=> $IkiWiki::pagemtime{$a} } +sub cmp_age { $IkiWiki::pagectime{$b} <=> $IkiWiki::pagectime{$a} } + 1 diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 1ffdc2353..0efc26b49 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -73,31 +73,40 @@ sub bzr_log ($) { my @infos = (); my $key = undef; + my %info; while (<$out>) { my $line = $_; my ($value); if ($line =~ /^message:/) { $key = "message"; - $infos[$#infos]{$key} = ""; + $info{$key} = ""; } elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) { $key = "files"; - unless (defined($infos[$#infos]{$key})) { $infos[$#infos]{$key} = ""; } + $info{$key} = "" unless defined $info{$key}; } elsif (defined($key) and $line =~ /^ (.*)/) { - $infos[$#infos]{$key} .= "$1\n"; + $info{$key} .= "$1\n"; } elsif ($line eq "------------------------------------------------------------\n") { + push @infos, {%info} if keys %info; + %info = (); $key = undef; - push (@infos, {}); } - else { + elsif ($line =~ /: /) { chomp $line; + if ($line =~ /^revno: (\d+)/) { + $key = "revno"; + $value = $1; + } + else { ($key, $value) = split /: +/, $line, 2; - $infos[$#infos]{$key} = $value; - } + } + $info{$key} = $value; + } } close $out; + push @infos, {%info} if keys %info; return @infos; } @@ -213,7 +222,7 @@ sub rcs_recentchanges ($) { foreach my $info (bzr_log($out)) { my @pages = (); my @message = (); - + foreach my $msgline (split(/\n/, $info->{message})) { push @message, { line => $msgline }; } diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index ff84bc440..0f0e9518a 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -47,6 +47,14 @@ sub getsetup () { safe => 1, rebuild => 1, }, + archive_pagespec => { + type => "pagespec", + example => "posts/* and !*/Discussion", + description => "PageSpec of pages to include in the archives; used by ikiwiki-calendar command", + link => 'ikiwiki/PageSpec', + safe => 1, + rebuild => 0, + }, } sub is_leap_year (@) { diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 98786f432..0aa043215 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -221,7 +221,9 @@ sub preprocess { } if (defined $params{subject}) { - $pagestate{$page}{meta}{title} = $params{subject}; + # decode title the same way meta does + eval q{use HTML::Entities}; + $pagestate{$page}{meta}{title} = decode_entities($params{subject}); } if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) { diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm index 01d490961..1549b82db 100644 --- a/IkiWiki/Plugin/filecheck.pm +++ b/IkiWiki/Plugin/filecheck.pm @@ -5,7 +5,7 @@ use warnings; use strict; use IkiWiki 3.00; -my %units=( #{{{ # size in bytes +my %units=( # size in bytes B => 1, byte => 1, KB => 2 ** 10, @@ -75,9 +75,9 @@ sub match_maxsize ($$;@) { } my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } if (-s $file > $maxsize) { @@ -96,9 +96,9 @@ sub match_minsize ($$;@) { } my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } if (-s $file < $minsize) { @@ -114,9 +114,9 @@ sub match_mimetype ($$;@) { my $wanted=shift; my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } # Use ::magic to get the mime type, the idea is to only trust @@ -147,9 +147,9 @@ sub match_virusfree ($$;@) { my $wanted=shift; my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } if (! exists $IkiWiki::config{virus_checker} || diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index 26e18ffc7..9f40c752f 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -32,7 +32,7 @@ sub import { ); # data is a special case. Allow a few data:image/ types, # but disallow data:text/javascript and everything else. - $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/(?:png|jpeg|gif)|[^:]+(?:$|\/))/i; + $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/(?:png|jpeg|gif)|[^:]+(?:$|[\/\?]))/i; } sub getsetup () { diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 44919e58c..644cb588d 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -553,7 +553,8 @@ sub genfeed ($$$$$@) { if (exists $pagestate{$p}) { if (exists $pagestate{$p}{meta}{guid}) { - $itemtemplate->param(guid => $pagestate{$p}{meta}{guid}); + eval q{use HTML::Entities}; + $itemtemplate->param(guid => HTML::Entities::encode_numeric($pagestate{$p}{meta}{guid})); } if (exists $pagestate{$p}{meta}{updated}) { diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 5f046cb2a..128a6342c 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -88,15 +88,21 @@ sub preprocess (@) { # Metadata collection that needs to happen during the scan pass. if ($key eq 'title') { - $pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value); + $pagestate{$page}{meta}{title}=$value; + if (exists $params{sortas}) { + $pagestate{$page}{meta}{titlesort}=$params{sortas}; + } + else { + delete $pagestate{$page}{meta}{titlesort}; + } return ""; } elsif ($key eq 'description') { - $pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value); + $pagestate{$page}{meta}{description}=$value; # fallthrough } elsif ($key eq 'guid') { - $pagestate{$page}{meta}{guid}=HTML::Entities::encode_numeric($value); + $pagestate{$page}{meta}{guid}=$value; # fallthrough } elsif ($key eq 'license') { @@ -116,6 +122,12 @@ sub preprocess (@) { } elsif ($key eq 'author') { $pagestate{$page}{meta}{author}=$value; + if (exists $params{sortas}) { + $pagestate{$page}{meta}{authorsort}=$params{sortas}; + } + else { + delete $pagestate{$page}{meta}{authorsort}; + } # fallthorough } elsif ($key eq 'authorurl') { @@ -264,15 +276,20 @@ sub pagetemplate (@) { $template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}})); } if (exists $pagestate{$page}{meta}{title} && $template->query(name => "title")) { - $template->param(title => $pagestate{$page}{meta}{title}); + $template->param(title => HTML::Entities::encode_numeric($pagestate{$page}{meta}{title})); $template->param(title_overridden => 1); } - foreach my $field (qw{author authorurl description permalink}) { + foreach my $field (qw{author authorurl permalink}) { $template->param($field => $pagestate{$page}{meta}{$field}) if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field); } + foreach my $field (qw{description}) { + $template->param($field => HTML::Entities::encode_numeric($pagestate{$page}{meta}{$field})) + if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field); + } + foreach my $field (qw{license copyright}) { if (exists $pagestate{$page}{meta}{$field} && $template->query(name => $field) && ($page eq $destpage || ! exists $pagestate{$destpage}{meta}{$field} || @@ -282,6 +299,33 @@ sub pagetemplate (@) { } } +sub get_sort_key { + my $page = shift; + my $meta = shift; + + # e.g. titlesort (also makes sense for author) + my $key = $pagestate{$page}{meta}{$meta . "sort"}; + return $key if defined $key; + + # e.g. title + $key = $pagestate{$page}{meta}{$meta}; + return $key if defined $key; + + # fall back to closer-to-core things + if ($meta eq 'title') { + return pagetitle(IkiWiki::basename($page)); + } + elsif ($meta eq 'date') { + return $IkiWiki::pagectime{$page}; + } + elsif ($meta eq 'updated') { + return $IkiWiki::pagemtime{$page}; + } + else { + return ''; + } +} + sub match { my $field=shift; my $page=shift; @@ -332,4 +376,27 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +package IkiWiki::SortSpec; + +sub cmp_meta { + my $meta = shift; + error(gettext("sort=meta requires a parameter")) unless defined $meta; + + if ($meta eq 'updated' || $meta eq 'date') { + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) + <=> + IkiWiki::Plugin::meta::get_sort_key($b, $meta); + } + + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) + cmp + IkiWiki::Plugin::meta::get_sort_key($b, $meta); +} + +# A prototype of how sort=title could behave in 4.0 or something +sub cmp_meta_title { + $_[0] = 'title'; + return cmp_meta(@_); +} + 1 diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index 9355cd85a..7b1a17831 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -116,23 +116,25 @@ sub validate ($$$;$) { # Ask for client to provide a name and email, if possible. # Try sreg and ax - $claimed_identity->set_extension_args( - 'http://openid.net/extensions/sreg/1.1', - { - optional => 'email,fullname,nickname', - }, - ); - $claimed_identity->set_extension_args( - 'http://openid.net/srv/ax/1.0', - { - mode => 'fetch_request', - 'required' => 'email,fullname,nickname,firstname', - 'type.email' => "http://schema.openid.net/contact/email", - 'type.fullname' => "http://axschema.org/namePerson", - 'type.nickname' => "http://axschema.org/namePerson/friendly", - 'type.firstname' => "http://axschema.org/namePerson/first", - }, - ); + if ($claimed_identity->can("set_extension_args")) { + $claimed_identity->set_extension_args( + 'http://openid.net/extensions/sreg/1.1', + { + optional => 'email,fullname,nickname', + }, + ); + $claimed_identity->set_extension_args( + 'http://openid.net/srv/ax/1.0', + { + mode => 'fetch_request', + 'required' => 'email,fullname,nickname,firstname', + 'type.email' => "http://schema.openid.net/contact/email", + 'type.fullname' => "http://axschema.org/namePerson", + 'type.nickname' => "http://axschema.org/namePerson/friendly", + 'type.firstname' => "http://axschema.org/namePerson/first", + }, + ); + } my $check_url = $claimed_identity->check_url( return_to => IkiWiki::cgiurl(do => "postsignin"), @@ -161,10 +163,13 @@ sub auth ($$) { elsif (my $vident = $csr->verified_identity) { $session->param(name => $vident->url); - my @extensions=grep { defined } ( - $vident->signed_extension_fields('http://openid.net/extensions/sreg/1.1'), - $vident->signed_extension_fields('http://openid.net/srv/ax/1.0'), - ); + my @extensions; + if ($vident->can("signed_extension_fields")) { + @extensions=grep { defined } ( + $vident->signed_extension_fields('http://openid.net/extensions/sreg/1.1'), + $vident->signed_extension_fields('http://openid.net/srv/ax/1.0'), + ); + } foreach my $ext (@extensions) { foreach my $field (qw{value.email email}) { if (exists $ext->{$field} && diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 1c0b46830..17b26f7ba 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -75,7 +75,7 @@ sub preprocess (@) { } if ($style eq 'table') { - return "\n". + return "
\n". join("\n", map { "
". htmllink($params{page}, $params{destpage}, $_, noimageinline => 1). @@ -87,16 +87,31 @@ sub preprocess (@) { else { # In case of misspelling, default to a page cloud - my $res = "
\n"; + my $res; + if ($style eq 'list') { + $res = "
    \n"; + } + else { + $res = "
    \n"; + } foreach my $page (sort keys %counts) { next unless $counts{$page} > 0; my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)]; + + $res.="
  • " if $style eq 'list'; $res .= "". htmllink($params{page}, $params{destpage}, $page). "\n"; + $res.="
  • " if $style eq 'list'; + + } + if ($style eq 'list') { + $res .= "
\n"; + } + else { + $res .= "
\n"; } - $res .= "\n"; return $res; } diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 2cbfb0a45..759e812e6 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -133,6 +133,7 @@ sub checkconfig () { $field, 'po')); } } + delete $config{po_slave_languages}{$config{po_master_language}{code}};; map { islanguagecode($_) @@ -174,7 +175,8 @@ sub checkconfig () { if ($config{po_master_language}{code} ne 'en') { # Add underlay containing translated source files # for the master language. - add_underlay("locale/$config{po_master_language}{code}/$underlay"); + add_underlay("locale/$config{po_master_language}{code}/$underlay") + if -d "$config{underlaydirbase}/locale/$config{po_master_language}{code}/$underlay"; } } } @@ -308,7 +310,7 @@ sub pagetemplate (@) { if (ishomepage($page) && $template->query(name => "title")) { $template->param(title => $config{wikiname}); } -} # }}} +} # Add the renamed page translations to the list of to-be-renamed pages. sub renamepages (@) { diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index f59d0269e..0fc180f69 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -49,7 +49,7 @@ sub check_canremove ($$$) { # This is sorta overkill, but better safe than sorry. if (! defined pagetype($pagesources{$page})) { if (IkiWiki::Plugin::attachment->can("check_canattach")) { - IkiWiki::Plugin::attachment::check_canattach($session, $page, $file); + IkiWiki::Plugin::attachment::check_canattach($session, $page, "$config{srcdir}/$file"); } else { error("removal of attachments is not allowed"); diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 3908443ca..1a9da6363 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -50,7 +50,7 @@ sub check_canrename ($$$$$$) { IkiWiki::check_canedit($src, $q, $session); if ($attachment) { if (IkiWiki::Plugin::attachment->can("check_canattach")) { - IkiWiki::Plugin::attachment::check_canattach($session, $src, $srcfile); + IkiWiki::Plugin::attachment::check_canattach($session, $src, "$config{srcdir}/$srcfile"); } else { error("renaming of attachments is not allowed"); @@ -85,7 +85,7 @@ sub check_canrename ($$$$$$) { if ($attachment) { # Note that $srcfile is used here, not $destfile, # because it wants the current file, to check it. - IkiWiki::Plugin::attachment::check_canattach($session, $dest, $srcfile); + IkiWiki::Plugin::attachment::check_canattach($session, $dest, "$config{srcdir}/$srcfile"); } } diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm new file mode 100644 index 000000000..62e42767c --- /dev/null +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# Sort::Naturally-powered title_natural sort order for IkiWiki +package IkiWiki::Plugin::sortnaturally; + +use IkiWiki 3.00; +no warnings; + +sub import { + hook(type => "getsetup", id => "sortnaturally", call => \&getsetup); +} + +sub getsetup { + return + plugin => { + safe => 1, + rebuild => undef, + }, +} + +sub checkconfig () { + eval q{use Sort::Naturally}; + error $@ if $@; +} + +package IkiWiki::SortSpec; + +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($a)), + IkiWiki::pagetitle(IkiWiki::basename($b))) +} + +1; diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index cdcfaf536..7a85874f6 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -6,8 +6,6 @@ use warnings; use strict; use IkiWiki 3.00; -my %tags; - sub import { hook(type => "getopt", id => "tag", call => \&getopt); hook(type => "getsetup", id => "tag", call => \&getsetup); @@ -71,9 +69,8 @@ sub preprocess_tag (@) { foreach my $tag (keys %params) { $tag=linkpage($tag); - $tags{$page}{$tag}=1; # hidden WikiLink - add_link($page, tagpage($tag)); + add_link($page, tagpage($tag), 'tag'); } return ""; @@ -87,15 +84,13 @@ sub preprocess_taglink (@) { return join(" ", map { if (/(.*)\|(.*)/) { my $tag=linkpage($2); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag, linktext => pagetitle($1)); } else { my $tag=linkpage($_); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag); } } @@ -110,17 +105,19 @@ sub pagetemplate (@) { my $destpage=$params{destpage}; my $template=$params{template}; + my $tags = $typedlinks{$page}{tag}; + $template->param(tags => [ map { link => taglink($page, $destpage, $_, rel => "tag") - }, sort keys %{$tags{$page}} - ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags"); + }, sort keys %$tags + ]) if defined $tags && %$tags && $template->query(name => "tags"); if ($template->query(name => "categories")) { # It's an rss/atom template. Add any categories. - if (exists $tags{$page} && %{$tags{$page}}) { + if (defined $tags && %$tags) { $template->param(categories => [map { category => $_ }, - sort keys %{$tags{$page}}]); + sort keys %$tags]); } } } @@ -128,9 +125,7 @@ sub pagetemplate (@) { package IkiWiki::PageSpec; sub match_tagged ($$;@) { - my $page = shift; - my $glob = shift; - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + return match_link($_[0], IkiWiki::Plugin::tag::tagpage($_[1]), linktype => 'tag'); } 1 diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index 3e024c5f8..98a13b5fa 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -37,7 +37,13 @@ sub preprocess (@) { my $template_page="templates/$params{id}"; add_depends($params{page}, $template_page); - my $template_file=$pagesources{$template_page}; + my $template_file; + if (exists $pagesources{$template_page}) { + $template_file=srcfile($pagesources{$template_page}); + } + else { + $template_file=IkiWiki::template_file("$params{id}.tmpl") + } return sprintf(gettext("template %s not found"), htmllink($params{page}, $params{destpage}, "/".$template_page)) unless defined $template_file; @@ -50,7 +56,7 @@ sub preprocess (@) { $$text_ref=&Encode::decode_utf8($$text_ref); chomp $$text_ref; }, - filename => srcfile($template_file), + filename => $template_file, die_on_bad_params => 0, no_includes => 1, blind_cache => 1, diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index 16d73b136..764da9b98 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -162,7 +162,7 @@ sub rcs_remove ($) { error("rcs_remove not implemented for tla"); # TODO } -sub rcs_rename ($$) { # {{{a +sub rcs_rename ($$) { my ($src, $dest) = @_; error("rcs_rename not implemented for tla"); # TODO diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index 1ed9f0856..0d9a0b35b 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -39,7 +39,14 @@ sub filter (@) { my %params = @_; my $content = $params{content}; - if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) { + if (defined $pagesources{$params{page}} && + $pagesources{$params{page}} =~ /\.txt$/) { + if ($pagesources{$params{page}} eq 'robots.txt' && + $params{page} eq $params{destpage}) { + will_render($params{page}, 'robots.txt'); + writefile('robots.txt', $config{destdir}, $content); + } + encode_entities($content, "<>&"); if ($findurl) { my $finder = URI::Find->new(sub { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index af24df155..e98888d76 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -167,6 +167,7 @@ sub scan ($) { else { $links{$page}=[]; } + delete $typedlinks{$page}; run_hooks(scan => sub { shift->( @@ -398,6 +399,7 @@ sub find_del_files ($) { push @del, $pagesources{$page}; } $links{$page}=[]; + delete $typedlinks{$page}; $renderedfiles{$page}=[]; $pagemtime{$page}=0; } @@ -499,6 +501,29 @@ sub remove_unrendered () { } } +sub link_types_changed ($$) { + # each is of the form { type => { link => 1 } } + my $new = shift; + my $old = shift; + + return 0 if !defined $new && !defined $old; + return 1 if !defined $new || !defined $old; + + while (my ($type, $links) = each %$new) { + foreach my $link (keys %$links) { + return 1 unless exists $old->{$type}{$link}; + } + } + + while (my ($type, $links) = each %$old) { + foreach my $link (keys %$links) { + return 1 unless exists $new->{$type}{$link}; + } + } + + return 0; +} + sub calculate_changed_links ($$$) { my ($changed, $del, $oldlink_targets)=@_; @@ -525,6 +550,14 @@ sub calculate_changed_links ($$$) { } $linkchangers{lc($page)}=1; } + + # we currently assume that changing the type of a link doesn't + # change backlinks + if (!exists $linkchangers{lc($page)}) { + if (link_types_changed($typedlinks{$page}, $oldtypedlinks{$page})) { + $linkchangers{lc($page)}=1; + } + } } return \%backlinkchanged, \%linkchangers; @@ -565,7 +598,7 @@ sub render_dependent ($$$$$$$) { if (exists $depends{$p} && ! defined $reason) { foreach my $dep (keys %{$depends{$p}}) { my $sub=pagespec_translate($dep); - next if $@ || ! defined $sub; + next unless defined $sub; # only consider internal files # if the page explicitly depends diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 2cf01ea68..06102058b 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -28,7 +28,7 @@ sub load ($;$) { } close IN; - if ($content=~/(use\s+)?IkiWiki::Setup::(\w+)/) { + if ($content=~/((?:use|require)\s+)?IkiWiki::Setup::(\w+)/) { $config{setuptype}=$2; if ($1) { error sprintf(gettext("cannot load %s in safe mode"), $file) diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index 9da594e99..2dcb424e5 100644 --- a/IkiWiki/Setup/Automator.pm +++ b/IkiWiki/Setup/Automator.pm @@ -38,6 +38,7 @@ sub sanitize_wikiname ($) { sub import (@) { my $this=shift; + $config{setuptype}='Standard'; IkiWiki::Setup::merge({@_}); if (! $config{force_overwrite}) { @@ -71,9 +72,15 @@ sub import (@) { } elsif ($config{rcs} eq 'bzr') { # TODO + print STDERR "warning: do not know how to set up the bzr_wrapper hook!\n"; } elsif ($config{rcs} eq 'mercurial') { # TODO + print STDERR "warning: do not know how to set up the mercurial_wrapper hook!\n"; + } + elsif ($config{rcs} eq 'tla') { + # TODO + print STDERR "warning: do not know how to set up the tla_wrapper hook!\n"; } elsif ($config{rcs} eq 'cvs') { $config{cvs_wrapper}=$config{repository}."/CVSROOT/post-commit"; @@ -123,9 +130,10 @@ sub import (@) { IkiWiki::run_hooks(checkconfig => sub { shift->() }); }; if ($@) { + my $err=$@; print STDERR sprintf(gettext("** Disabling plugin %s, since it is failing with this message:"), $plugin)."\n"; - print STDERR "$@\n"; + print STDERR "$err\n"; push @{$bakconfig{disable_plugins}}, $plugin; } } diff --git a/IkiWiki/Setup/Yaml.pm b/IkiWiki/Setup/Yaml.pm index 0fc273675..904784728 100644 --- a/IkiWiki/Setup/Yaml.pm +++ b/IkiWiki/Setup/Yaml.pm @@ -10,17 +10,16 @@ sub loaddump ($$) { my $class=shift; my $content=shift; - eval q{use YAML}; + eval q{use YAML::Any}; + eval q{use YAML} if $@; die $@ if $@; + $YAML::Syck::ImplicitUnicode=1; IkiWiki::Setup::merge(Load($content)); } sub gendump ($@) { my $class=shift; - eval q{use YAML}; - die $@ if $@; - "# IkiWiki::Setup::Yaml - YAML formatted setup file", "#", (map { "# $_" } @_), @@ -35,7 +34,11 @@ sub dumpline ($$$$) { my $type=shift; my $prefix=shift; + eval q{use YAML::Old}; + eval q{use YAML} if $@; + die $@ if $@; $YAML::UseHeader=0; + my $dump=Dump({$key => $value}); chomp $dump; if (length $prefix) { diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index fd6b9c00f..2f0c95465 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -101,6 +101,7 @@ EOF #include #include +extern char **environ; char *newenviron[$#envsave+6]; int i=0; @@ -121,12 +122,17 @@ $envsave newenviron[i++]="HOME=$ENV{HOME}"; newenviron[i++]="WRAPPED_OPTIONS=$configstring"; +#ifdef __TINYC__ if (clearenv() != 0) { perror("clearenv"); exit(1); } for (; i>0; i--) putenv(newenviron[i-1]); +#else + newenviron[i]=NULL; + environ=newenviron; +#endif if (setregid(getegid(), -1) != 0 && setregid(getegid(), -1) != 0) { diff --git a/Makefile.PL b/Makefile.PL index 52421a711..38db20d44 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,15 +28,17 @@ W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi) extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:NYTProf"; fi) +outprogs=ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out +scripts=ikiwiki-update-wikilist ikiwiki-makerepo -ikiwiki.out: ikiwiki.in - ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out - chmod +x ikiwiki.out +%.out: %.in + ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < $< > $@ + chmod +x $@ ikiwiki.setup: ikiwiki.out HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup -extra_build: ikiwiki.out ikiwiki.setup docwiki +extra_build: $(outprogs) ikiwiki.setup docwiki ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man @@ -52,7 +54,7 @@ docwiki: ikiwiki.out extra_clean: $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean - rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc + rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean underlay_install: @@ -115,8 +117,9 @@ extra_install: underlay_install install ikiwiki-w3m.cgi $(DESTDIR)$(W3M_CGI_BIN) install -d $(DESTDIR)$(PREFIX)/bin - install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki - install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist ikiwiki-calendar $(DESTDIR)$(PREFIX)/bin/ + for prog in $(outprogs) $(scripts); do \ + install $$prog $(DESTDIR)$(PREFIX)/bin/$$(echo $$prog | sed 's/\.out//'); \ + done $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) diff --git a/README b/README index a4dc0d641..7efc59a51 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ All other documentation is in the ikiwiki documentation wiki, which is also available online at -A few special variables you can set while using the Makefile: +A few special variables you can set while using the Makefile.PL: PROFILE=1 turns on profiling for the build of the doc wiki. (Uses Devel::NYTProf) diff --git a/auto-blog.setup b/auto-blog.setup index 7ff413187..95347167f 100644 --- a/auto-blog.setup +++ b/auto-blog.setup @@ -48,4 +48,5 @@ IkiWiki::Setup::Automator->import( blogspam_pagespec => "postcomment(*)", discussion => 0, locked_pages => "*", + tagbase => "tags", ) diff --git a/debian/NEWS b/debian/NEWS index 50332670f..25ebed0b4 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,20 @@ +ikiwiki (3.20100406) unstable; urgency=low + + The title_natural sort method (as used by the inline directive, etc) + have been moved to the new sortnaturally plugin, which is not enabled + by default since it requires the Sort::Naturally perl module. + + Starting from this version, the `tagged()` pagespec only matches tags, + not regular wikilinks. If your wiki accidentially relied on the old, + buggy behavior, you might need to change pagespecs to use `link()`. + + Due to the above and other changes, all wikis need to be rebuilt on + upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist + this will be done automatically when the Debian package is upgraded. Or + use ikiwiki-mass-rebuild to force a rebuild. + + -- Simon McVittie Tue, 06 Apr 2010 20:53:07 +0100 + ikiwiki (3.20091017) unstable; urgency=low To take advantage of significant performance improvements, all diff --git a/debian/changelog b/debian/changelog index e020b380f..03361e6a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,49 @@ -ikiwiki (3.20100313) UNRELEASED; urgency=low +ikiwiki (3.20100415) UNRELEASED; urgency=low + + [ Joey Hess ] + * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) + * comments: Fix missing entity encoding in title. + * txt: Add a special case for robots.txt. + + [ Simon McVittie ] + * Add support for link types, and make the the tagged() pagespec only + match tags, not regular links (a bugfix). + * Rebuild wikis on upgrade to this version to get tag link types recorded + correctly. + * Revamp sorting system; allow new sort methods to be added by plugins, + and add a "sortspec" syntax that can combine, reverse, etc sort methods. + * meta: Add `meta(author)`, `meta(title)` etc sortspecs to allow sorting + by metadata. + * meta: Add optional sortas parameter to author and title meta directives. + This can be used to get names sorted by last name without displaying + them last name first. + * sortnaturally: New plugin; the title_natural sort method has moved here. + * meta: store fields consistently unescaped, and escape on use. + (A wiki rebuild is also needed due to this change.) + + [ Joey Hess ] + * Update dependency for git-core to git transition. + * po: Check that translated underlay directories exist before using them + for master language. + * po: Configuring the same language as master and slave confuses processing; + so filter out such a misconfiguration. + * calendar: Add archive_pagespec, which is used by ikiwiki-calendar to + specify which pages to include on the calendar archive pages. + (The pagespec can still also be specified on the ikiwiki-calendar command + line.) + * pagestats: Class parameter can be used to override default class for + custom styling. + * pagestats: Use style=list to get a list of tags, scaled by use like + in a tag cloud. This is useful to put in a sidebar. + * Rework example blog front page. + * CSS and templates for sidebar changed to use a class, not an id. + + -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 + +ikiwiki (3.20100403) unstable; urgency=low * websetup: Add websetup_unsafe to allow marking other settings as unsafe. - * openid: Use Openid Simple Registration or OpenID Attribute Exchange - to get the user's email address and username. * Improve openid url munging; do not display anchors and cgi parameters, as used by yahoo and google urls. * Add complete German basewiki and directives translation done by @@ -12,10 +52,26 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low wiki source files, such as .htaccess, that would normally be skipped for security or other reasons. Closes: #447267 (Thanks to Aaron Wilson for the original patch.) - * Allow wrappers to be built using tcc. * Add support for setup files written in YAML. - - -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 + * Add --set-yaml switch for setting more complex config file options. + * filecheck: Fix bugs that prevented the pagespecs from matching when + not called by attachment plugin. + * Fix incorrect influence info returned by a failing link() pagespec, + that could lead to bad dependency handling in certian situations. + * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar + if necessary for unusual install. + * auto-blog.setup: Set tagbase by default, since most bloggers will want it. + * Allow wrappers to be built using tcc. (Workaround #452876) + * openid: Use Openid Simple Registration or OpenID Attribute Exchange + to get the user's email address and username. (Neither is yet + used, but they are available in the session object now.) + * page.tmpl: Add Cache-Control must-revalidate to ensure that users + (especially of Firefox) see fresh page content. + * htmlscrubber: Allow colons in urls after '?' + * template: Search for templates in the templatedir, if they are not + found as pages in the wiki. + + -- Joey Hess Sat, 03 Apr 2010 14:17:28 -0400 ikiwiki (3.20100312) unstable; urgency=HIGH diff --git a/debian/control b/debian/control index b20f4db55..b8fe81914 100644 --- a/debian/control +++ b/debian/control @@ -23,7 +23,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends}, libhtml-parser-perl, liburi-perl Recommends: gcc | c-compiler, libc6-dev | libc-dev, - subversion | git-core (>= 1:1.5.0) | tla | bzr (>= 0.91) | mercurial | monotone (>= 0.38) | darcs, + subversion | git-core (>= 1:1.5.0) | git (>= 1:1.7) | tla | bzr (>= 0.91) | mercurial | monotone (>= 0.38) | darcs, libxml-simple-perl, libnet-openid-consumer-perl, liblwpx-paranoidagent-perl, libtimedate-perl, libcgi-formbuilder-perl (>= 3.05), libcgi-session-perl (>= 4.14-1), @@ -37,22 +37,22 @@ Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl, libtext-csv-perl, libdigest-sha1-perl, graphviz, libnet-amazon-s3-perl, sparkline-php, texlive, dvipng, libtext-wikicreole-perl, libsort-naturally-perl, libtext-textile-perl, libhighlight-perl, - po4a (>= 0.35-1), gettext + po4a (>= 0.35-1), gettext, libyaml-perl Conflicts: ikiwiki-plugin-table Replaces: ikiwiki-plugin-table Provides: ikiwiki-plugin-table Description: a wiki compiler - ikiwiki converts a directory full of wiki pages into HTML pages suitable + Ikiwiki converts a directory full of wiki pages into HTML pages suitable for publishing on a website. Unlike many wikis, ikiwiki does not have its own ad-hoc means of storing page history, and instead uses a revision control system such as Subversion or Git. . - ikiwiki implements all of the other standard features of a wiki, including + Ikiwiki implements all of the other standard features of a wiki, including web-based page editing, user registration and logins, a RecentChanges page, BackLinks, search, Discussion pages, tags, smart merging and conflict resolution, and page locking. . - ikiwiki also supports generating news feeds (RSS and Atom) and blogging. + Ikiwiki also supports generating news feeds (RSS and Atom) and blogging. ikiwiki provides a plugin system which allows many other features to be added. Some of the plugins have additional dependencies, found among the Recommends and Suggests of this package. diff --git a/debian/postinst b/debian/postinst index bf1825ab7..fa0591153 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.20091010 +firstcompat=3.20100410 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn new file mode 100644 index 000000000..7ff1a012f --- /dev/null +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -0,0 +1,35 @@ +Although I have comments enabled and I have been using them successfully for ages now, I've come to notice that they have stopped working in the last week or two. + +I am running version 3.20100312 with the following configuration: + + + +In my (HTML5 modified page.tmpl) it doesn't seem to enter the "TMPL_IF COMMENTS" block anymore. I tried the stock page.tmpl and they didn't seem to work either, so the variable name hasn't changed has it? + +Any other ideas? With thanks, + + comments_pagespec => 'archives/* and !*/Discussion', + +> Your setup file only allows comments to pages under archives. That +> seems unlikely to be right, so I guess it is causing your problem. +> --[[Joey]] + +That's the only place where I want comments. +Has the pagespec changed? Is it `archives/*/*` or something like that? + +It worked just fine with this configuration. I swear I have not modified it. :) -- [[Kai Hendry]] + +> No changes that I can think of. 'archives/*' will match *all* pages under +> archives. Anyway, I can see in your site's rss feed that comments are +> enabled for posts, since they have comments tags there. And +> in fact I see comments on eg +> . +> +> So I suspect you have simply not rebuilt your wiki after making some +> change that fixed the comments, and so only newer pages are getting them. +> --[[Joey]] + +I have tried rebuilding on my squeeze system and still comments don't appear. Any clues how to debug this? + + +I was worried is was due to a time skew problem I was experiencing on my VPS in the last month, though the time is right now and still comments do not appear on blog posts like diff --git a/doc/bugs/Error:_Your_login_session_has_expired._.mdwn b/doc/bugs/Error:_Your_login_session_has_expired._.mdwn index 046d6e10d..b993cd8e7 100644 --- a/doc/bugs/Error:_Your_login_session_has_expired._.mdwn +++ b/doc/bugs/Error:_Your_login_session_has_expired._.mdwn @@ -41,4 +41,6 @@ Whilst trying to edit http://hugh.vm.bytemark.co.uk/ikiwiki.cgi via OpenID. Any Thanks for you excellent analysis. The bug was due to old pre-3.0 **templates** laying about. After deleting them, ikiwiki defaults to its own templates. Clever. :-) +Great, this saved me big time! It is a google 1st hit. I had the same with accidentally using old templates. Thanks! --[[cstamas]] + [[bugs/done]] diff --git a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn new file mode 100644 index 000000000..39d57a4fe --- /dev/null +++ b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn @@ -0,0 +1,22 @@ +Table directive should support tab-delimited data, especially important since this is the format you will get if copy/pasting from an HTML table or spreadsheet (Gnumeric, OO Calc, Excel). Test case which fails: + +[[!table format=dsv delimiter="\t" data=""" +1 2 +2 4 +"""]] + +> They do work, but C-style backslash escapes aren't recognised, +> so the syntax `delimiter="\t"` (as in your test case) looks +> for the literal string `\t`. Replacing `\t` with a literal +> tab character makes it work - here's a test (I changed the data +> to make the table layout more obvious): +> +> [[!table format=dsv delimiter=" " data=""" +left 2 +2 right +alpha beta +"""]] +> +> So, I think this can be considered [[not_a_bug|done]]? --[[smcv]] + +>> I've clarified the documentation. --[[smcv]] diff --git a/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn b/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn index 42e6b9e27..c3cbff43e 100644 --- a/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn +++ b/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn @@ -39,3 +39,6 @@ a year ago in September 2007. > ikiwiki. (Doesn't quite seem to be version 2.53.x either) Try with a current > version, and see if you can send me a source tree that can reproduce the > problem? --[[Joey]] + +Did not hear back, so calling this [[done]], unless I hear differently. +--[[Joey]] diff --git a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn new file mode 100644 index 000000000..39500af20 --- /dev/null +++ b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn @@ -0,0 +1,87 @@ +Version 2.0 of bzr seems to break the bzr plugin. + +I traced this to the bzr_log method in the plugin, and patching that seems to fix it. The plugin just needs to parse the input little bit differently. +--liw + +> Patch applied, [[done]] (but, it would be good if it could be tested with +> an older bzr, and it's a pity bzr's human-targeted log has to be parsed, +> I assume there is no machine-targeted version?) --[[Joey]] + + From fb897114124e627fd3acf5af8e784c9a77419a81 Mon Sep 17 00:00:00 2001 + From: Lars Wirzenius + Date: Sun, 4 Apr 2010 21:05:07 +1200 + Subject: [PATCH] Fix bzr plugin to work with bzr 2.0. + + The output of "bzr log" seems to have changed a bit, so we change the + parsing accordingly. This has not been tested with earlier versions of + bzr. + + Several problems seemed to occur, all in the bzr_log subroutine: + + 1. The @infos list would contain an empty hash, which would confuse the + rest of the program. + 2. This was because bzr_log would push an empty anonymous hash to the + list whenever it thought a new record would start. + 3. However, a new record marker (now?) also happens at th end of bzr log + output. + 4. Now we collect the record to a hash that gets pushed to the list only + if it is not empty. + 5. Also, sometimes bzr log outputs "revno: 1234 [merge]", so we catch only + the revision number. + 6. Finally, there may be non-headers at the of the output, so we ignore + those. + --- + IkiWiki/Plugin/bzr.pm | 23 ++++++++++++++++------- + 1 files changed, 16 insertions(+), 7 deletions(-) + + diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm + index 1ffdc23..e813331 100644 + --- a/IkiWiki/Plugin/bzr.pm + +++ b/IkiWiki/Plugin/bzr.pm + @@ -73,28 +73,37 @@ sub bzr_log ($) { + my @infos = (); + my $key = undef; + + + my $hash = {}; + while (<$out>) { + my $line = $_; + my ($value); + if ($line =~ /^message:/) { + $key = "message"; + - $infos[$#infos]{$key} = ""; + + $$hash{$key} = ""; + } + elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) { + $key = "files"; + - unless (defined($infos[$#infos]{$key})) { $infos[$#infos]{$key} = ""; } + + unless (defined($$hash{$key})) { $$hash{$key} = ""; } + } + elsif (defined($key) and $line =~ /^ (.*)/) { + - $infos[$#infos]{$key} .= "$1\n"; + + $$hash{$key} .= "$1\n"; + } + elsif ($line eq "------------------------------------------------------------\n") { + + if (keys %$hash) { + + push (@infos, $hash); + + } + + $hash = {}; + $key = undef; + - push (@infos, {}); + } + - else { + + elsif ($line =~ /: /) { + chomp $line; + - ($key, $value) = split /: +/, $line, 2; + - $infos[$#infos]{$key} = $value; + + if ($line =~ /^revno: (\d+)/) { + + $key = "revno"; + + $value = $1; + + } else { + + ($key, $value) = split /: +/, $line, 2; + + } + + $$hash{$key} = $value; + } + } + close $out; + -- + 1.7.0 diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn new file mode 100644 index 000000000..f38c86e03 --- /dev/null +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn @@ -0,0 +1,5 @@ +When build wrapper on FreeBSD system, is error occured with clearenv reference. clearenv() das not exists at FreeBSD system, use workaround environ[0]=NULL; +P.S. new git instalation, FreeBSD 7.x + +> `#include ` fixed with nasty ifdefs to handle tcc w/o +> breaking everything else. [[done]] --[[Joey]] diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn new file mode 100644 index 000000000..713198b61 --- /dev/null +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn @@ -0,0 +1 @@ +Mmmm... i see. But it not setup under FreeBSD without magic manual passes. diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn new file mode 100644 index 000000000..2603ff04c --- /dev/null +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -0,0 +1,23 @@ +The [[bugs]] page, at least before I commit this, has a bug at the top that +has been modified to link to done, and ikiwiki's dependency calculations +failed to notice and update the bugs page. Looking at the indexdb, I saw +that the page was not included in the `depends_simple` of the bugs page. + +I was able to replicate the problem locally by starting off with the page +marked done (when it did appear in the bugs page `depends_simple` +(appropriatly as a link dependency, since a change to the page removing the +link would make it match)), then removing the done link. + +At that point, it vanished from `depends_simple`. Presumably because +the main (pagespec) depends for the bugs page now matched it, as a content +dependency. But, it seems to me it should still be listed in +`depends_simple` here. This, I think, is the cause of the bug. + +Then re-add the done link, and the dependency calc code breaks down, +not noticing that bugs dependeded on the page and needs to be updated. + +Ok.. Turns out this was not a problem with the actual influences +calculation or dependency calculation code. Whew! `match_link` +just didn't set the influence correctly when failing. [[fixed|done]] + +--[[Joey]] diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn new file mode 100644 index 000000000..6501508e4 --- /dev/null +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -0,0 +1,65 @@ +Using the attachment plugin, when filecheck was checking the mime-type of the attachment before allowing the attachment to be removed, it was returning with an error saying that the mime-type of the file was "unknown" (when the mime-type definitely was known!) + +It turns out that the filecheck plugin couldn't find the file, because it was merely using the $pagesources hash, rather than finding the absolute path of the file in question. + +> I don't understand why the file was not in `%pagesources`. Do you? +> --[[Joey]] + +>> The file *was* in `%pagesources`, but what returns from that is the filename relative to the `srcdir` directory; for example, `foo/bar.gif`. +>> When File::MimeInfo::Magic::magic is given that, it can't find the file. +>> But if it is given `/path/to/srcdir/foo/bar.gif` instead, then it *can* find the file, and returns the mime-type correctly. +>> --[[KathrynAndersen]] + +>>> Ok, so it's not removal specific, can in fact be triggered by using +>>> testpagespec (or really anything besides attachment, which passes +>>> the filename parameter). Nor is it limited to mimetype, all the tests in +>>> filecheck have the problem. --[[Joey]] + +>>>> Alas, not fixed. It seems I was mistaken in some of my assumptions. +>>>> It still happens when attempting to remove attachments. +>>>> With your fix, the `IkiWiki::srcfile` function is only called when the filename is not passed in, but it appears that in the case of removing attachments, the filename IS passed in, but it is the relative filename as mentioned above. Thus, the file is still not found, and the mime-type comes back as unknown. +>>>> The reason my patch worked is because, rather than checking whether a filename was passed in before applying IkiWiki::srcfile to the filename, it checks whether the file can be found, and if it cannot be found, then it applies IkiWiki::srcfile to the filename. +>>>> --[[KathrynAndersen]] + +>>>>> Can you test if this patch fixes that? --[[Joey]] + +>>>>>> Yes, it works! --[[KathrynAndersen]] + +applied && [[done]] + +
+diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
+index f59d026..0fc180f 100644
+--- a/IkiWiki/Plugin/remove.pm
++++ b/IkiWiki/Plugin/remove.pm
+@@ -49,7 +49,7 @@ sub check_canremove ($$$) {
+ 	# This is sorta overkill, but better safe than sorry.
+ 	if (! defined pagetype($pagesources{$page})) {
+ 		if (IkiWiki::Plugin::attachment->can("check_canattach")) {
+-			IkiWiki::Plugin::attachment::check_canattach($session, $page, $file);
++			IkiWiki::Plugin::attachment::check_canattach($session, $page, "$config{srcdir}/$file");
+ 		}
+ 		else {
+ 			error("removal of attachments is not allowed");
+diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
+index 3908443..1a9da63 100644
+--- a/IkiWiki/Plugin/rename.pm
++++ b/IkiWiki/Plugin/rename.pm
+@@ -50,7 +50,7 @@ sub check_canrename ($$$$$$) {
+ 	IkiWiki::check_canedit($src, $q, $session);
+ 	if ($attachment) {
+ 		if (IkiWiki::Plugin::attachment->can("check_canattach")) {
+-			IkiWiki::Plugin::attachment::check_canattach($session, $src, $srcfile);
++			IkiWiki::Plugin::attachment::check_canattach($session, $src, "$config{srcdir}/$srcfile");
+ 		}
+ 		else {
+ 			error("renaming of attachments is not allowed");
+@@ -85,7 +85,7 @@ sub check_canrename ($$$$$$) {
+ 		if ($attachment) {
+ 			# Note that $srcfile is used here, not $destfile,
+ 			# because it wants the current file, to check it.
+-			IkiWiki::Plugin::attachment::check_canattach($session, $dest, $srcfile);
++			IkiWiki::Plugin::attachment::check_canattach($session, $dest, "$config{srcdir}/$srcfile");
+ 		}
+ 	}
+
diff --git a/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn b/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn index 46e77a265..558eb90c8 100644 --- a/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn +++ b/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn @@ -5,3 +5,10 @@ Only explicitly pressing "reload" helps. Is it a bug? I haven't been noticing such problems usually on other sites. --Ivan Z. This remains to be true now, with Epiphany 2.26.3 (Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.1.4pre) Gecko/20080528 Epiphany/2.22 Firefox/3.5). --Ivan Z. + +> In the most recent ikiwiki release, I added a Cache-Control hack +> explicitly to work around firefox's broken over-caching. +> +> (When I tested epiphany and chromium, neither had firefox's problem.) +> +> [[!tag done]] diff --git a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn new file mode 100644 index 000000000..b3e87b529 --- /dev/null +++ b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn @@ -0,0 +1,17 @@ +When installing ikiwiki the perl module path is setup correctly + + use lib '/usr/local/ikiwiki-3.20100312/share/perl/5.10.0'; + +This is not true for ikiwiki-transition: + + $ PATH=/usr/local/ikiwiki-3.20100312/bin ikiwiki-transition prefix_directives ikiwiki.setup + Can't locate IkiWiki.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 + /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) + at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. + BEGIN failed--compilation aborted at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. + +The missing line should be added. + +Thanks! + +[[done]] --[[Joey]] diff --git a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn index de178d415..d12414d55 100644 --- a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn +++ b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn @@ -16,3 +16,5 @@ The [[ikiwiki/directive/map]] directive sort by pagename. That looks kind of odd >> 2. I cannot get inline to create a list when the htmltidy plugin is switched on. I have a template which is enclosed in an li tag, and i put the ul tag around the inline manually, but htmltidy breaks this. --martin >>>> You might want to check if the [[plugins/contrib/report]] plugin solves your problem. It can sort by title, among other things. --[[KathrynAndersen]] + +>> See also: [[todo/sort_parameter_for_map_plugin_and_directive]] --[[smcv]] diff --git a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn new file mode 100644 index 000000000..587771ba4 --- /dev/null +++ b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn @@ -0,0 +1,44 @@ +[[!template id=gitbranch branch=smcv/unescaped-meta author="[[Simon_McVittie|smcv]]"]] +[[!tag patch]] +(Warning: this branch has not been tested thoroughly.) + +While discussing the [[plugins/meta]] plugin on IRC, Joey pointed out that +it stores most meta fields unescaped, but 'title', 'guid' and 'description' +are special-cased and stored escaped (with numeric XML/HTML entities). This +is to avoid emitting markup in the `` of a HTML page, or in an RSS/Atom +feed, neither of which are subject to the [[plugins/htmlscrubber]]. + +However, having the meta fields "partially escaped" like this is somewhat +error-prone. Joey suggested that perhaps everything should be stored +unescaped, and the escaping should be done on output; this branch +implements that. + +Points of extra subtlety: + +* The title given to the [[plugins/search]] plugin was previously HTML; + now it's plain text, potentially containing markup characters. I suspect + that that's what Xapian wants anyway (which is why I didn't change it), + but I could be wrong... + + > AFAICS, this if anything, fixes a bug, xapian definitely expects + > unescaped text here. --[[Joey]] + +* Page descriptions in the HTML `<head>` were previously double-escaped: + the description was stored escaped with numeric entities, then that was + output with a second layer of escaping! In this branch, I just emit + the page description escaped once, as was presumably the intention. + +* It's safe to apply this change to a wiki and neglect to rebuild it + (assuming I implemented it correctly!), but until the wiki is rebuilt, + titles, descriptions and GUIDs for unchanged pages will appear + double-escaped on any page that inlines them in `quick=yes` mode, and + is rebuilt for some other reason. The failure mode is too much escaping + rather than too little, so it shouldn't be a security problem. + +* Reverting this change, if applied, is more dangerous; until the wiki is + rebuilt, any titles, descriptions and GUIDs on unchanged pages that + contained markup could appear unescaped on any page that inlines them + in `quick=yes` mode, and is rebuilt for some other reason. The failure + mode here would be too little escaping, i.e. cross-site scripting. + +[[!tag done]] diff --git a/doc/bugs/stray___60____47__p__62___tags.mdwn b/doc/bugs/stray___60____47__p__62___tags.mdwn index 6e508ffda..99d6fe09f 100644 --- a/doc/bugs/stray___60____47__p__62___tags.mdwn +++ b/doc/bugs/stray___60____47__p__62___tags.mdwn @@ -13,3 +13,5 @@ I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalanc } The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved. + +> [[done]] --[[Joey]] diff --git a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn index e7e4af7c3..a211654f1 100644 --- a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn +++ b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn @@ -28,6 +28,8 @@ rationale on this, or what am I doing wrong, and how to achieve what I want? >> is valid. [[todo/matching_different_kinds_of_links]] is probably >> how it will eventually be solved. --[[Joey]] +>>> [[Done]]: `tagged` no longer matches other wikilinks. --[[smcv]] + > And this is an illustration why a clean work-around (without changing the software) is not possible: while thinking about [[todo/matching_different_kinds_of_links]], I thought one could work around the problem by simply explicitly including the kind of the relation into the link target (like the tagbase in tags), and by having a separate page without the "tagbase" to link to when one wants simply to refer to the tag without tagging. But this won't work: one has to at least once refer to the real tag page if one wants to talk about it, and this reference will count as tagging (unwanted). --Ivan Z. > But well, perhaps there is a workaround without introducing different kinds of links. One could modify the [[tag plugin|plugins/tag]] so that it adds 2 links to a page: for tagging -- `tagbase/TAG`, and for navigation -- `tagdescription/TAG` (displayed at the bottom). Then the `tagdescription/TAG` page would hold whatever list one wishes (with `tagged(TAG)` in the pagespec), and whenever one wants to merely refer to the tag, one should link to `tagdescription/TAG`--this link won't count as tagging. So, `tagbase/TAG` would become completely auxiliary (internal) link targets for ikiwiki, the users would edit or link to only `tagdescription/TAG`. --Ivan Z. diff --git a/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn b/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn new file mode 100644 index 000000000..9804d86c5 --- /dev/null +++ b/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn @@ -0,0 +1,16 @@ +If i intsall perl modules in my custom directory, cgi wrapper can't find them. I found clearing enviroment variables in code of wrapper. But information about custom directories put to perl with PERL5LIB variable. + +Workaround: add newenviron variable PERL5LIB + +My additional question - what wrapper do? I'am russian hosting provider. I am interesting with ikiwiki. + +> The wrapper allows ikiwiki to run as the user who owns the wiki, which +> is generally not the same as the user that runs the web server. +> (It also handles some other things, like some locking.) +> +> As a suid program, the wrapper cannot safely let environment variables +> pass through. +> +> If you want to install ikiwiki's perl modules in a nonstandard location, +> you can set `INSTALL_BASE` when running `Makefile.PL`. ikiwiki will then +> be built to look in that location. --[[Joey]] [[!tag done]] diff --git a/doc/download.mdwn b/doc/download.mdwn index 45d0d7870..92c8a4f75 100644 --- a/doc/download.mdwn +++ b/doc/download.mdwn @@ -35,7 +35,7 @@ own RPM. ## BSD ports -IkiWiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki) +Ikiwiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki) by running `sudo port install ikiwiki`. NetBSD and many other platforms: pkgsrc has an [ikiwiki package](ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/www/ikiwiki/README.html). diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index f542cad0c..33637e57d 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -14,15 +14,13 @@ Some additional configuration you might want to do: \[[!tag tags/life]] * Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all - the categories you've tagged posts with. + the categories you've tagged posts with, and other navigation links. * Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud to display on the [[index]]. -* Enable the [[comments|plugins/comments]] plugin and configure it to - enable comments to posts to the blog: - - comments_pagespec => 'blog/posts/* and !*/Discussion', +* Enable the [[comments|plugins/comments]] plugin to + enable comments to posts to the blog. * Enable the [[calendar|plugins/calendar]] plugin and run the [[ikiwiki-calendar]] command from cron daily to get an interlinked diff --git a/doc/examples/blog/archives.mdwn b/doc/examples/blog/archives.mdwn new file mode 100644 index 000000000..14686cdfe --- /dev/null +++ b/doc/examples/blog/archives.mdwn @@ -0,0 +1,7 @@ +[[!if test="enabled(calendar)" then=""" +Browse through blog archives by year: +[[!map pages="./archives/* and !./archives/*/* and !*/Discussion"]] +""" +else=""" +Calendar based archives are not enabled. See [[posts]] for a full list of posts. +"""]] diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn index 4735dea08..0b503ba01 100644 --- a/doc/examples/blog/comments.mdwn +++ b/doc/examples/blog/comments.mdwn @@ -1,3 +1,3 @@ -This page will show all comments made to posts in my [[blog|index]]. +This page will show recent comments made to posts in the [[blog|index]]. [[!inline pages="./posts/*/Discussion or internal(./posts/*/comment_*)"]] diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index 01b714fcd..da95e7660 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,9 +1,12 @@ -[[!pagestats pages="./tags/*" among="./posts/*"]] +[[!template id=note text=""" -Welcome to my blog. +* [[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] +* [[Recent_Comments|comments]] +* [[Archives]] -Have a look at the most recent posts below, or browse the tag cloud on the -right. Archives of all [[posts]] and all [[comments]] are also available. +[[!calendar pages="./posts/* and !*/Discussion"]] + +"""]] [[!inline pages="./posts/* and !*/Discussion" show="10" actions=yes rootpage="posts"]] diff --git a/doc/examples/blog/posts/first_post.mdwn b/doc/examples/blog/posts/first_post.mdwn index d49432341..f2729fcef 100644 --- a/doc/examples/blog/posts/first_post.mdwn +++ b/doc/examples/blog/posts/first_post.mdwn @@ -1,4 +1,4 @@ This is the first post to this example blog. To add new posts, just add files to the posts/ subdirectory, or use the web form. -[[!tag tags/tech]] +[[!tag tech]] diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn deleted file mode 100644 index a9fac388e..000000000 --- a/doc/examples/blog/sidebar.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -Example sidebar - -* [[Blog|index]] -* [[Archive|posts]] - -Categories: -[[!map pages="./tags/* and !*/Discussion"]] diff --git a/doc/features.mdwn b/doc/features.mdwn index 3925d78ef..ab521213d 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -13,7 +13,7 @@ Instead of editing pages in a stupid web form, you can use vim and commit changes via [[Subversion|rcs/svn]], [[rcs/git]], or any of a number of other [[Revision_Control_Systems|rcs]]. -ikiwiki can be run from a [[post-commit]] hook to update your wiki +Ikiwiki can be run from a [[post-commit]] hook to update your wiki immediately whenever you commit a change using the RCS. It's even possible to securely let @@ -25,7 +25,7 @@ run a simple wiki without page history, it can do that too. ## A wiki compiler -ikiwiki is a wiki compiler; it builds a static website for your wiki, and +Ikiwiki is a wiki compiler; it builds a static website for your wiki, and updates it as pages are edited. It is fast and smart about updating a wiki, it only builds pages that have changed (and tracks things like creation of new pages and links that can indirectly cause a page to need a rebuild) @@ -45,7 +45,7 @@ easily be added by [[plugins]]. For example it also supports traditional [[plugins/HTML]], or pages written in [[reStructuredText|plugins/rst]] or [[Textile|plugins/textile]]. -ikiwiki also supports files of any other type, including plain text, +Ikiwiki also supports files of any other type, including plain text, images, etc. These are not converted to wiki pages, they are just copied unchanged by ikiwiki as it builds your wiki. So you can check in an image, program, or other special file and link to it from your wiki pages. @@ -70,8 +70,8 @@ you would care to syndicate. ## Valid html and [[css]] -ikiwiki aims to produce -[valid XHTML 1.0](http://validator.w3.org/check?url=referer). ikiwiki +Ikiwiki aims to produce +[valid XHTML 1.0](http://validator.w3.org/check?url=referer). Ikiwiki generates html using [[templates|wikitemplates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. @@ -163,7 +163,7 @@ Well, sorta. Rather than implementing YA history browser, it can link to ### Full text search -ikiwiki can use the xapian search engine to add powerful +Ikiwiki can use the xapian search engine to add powerful full text [[plugins/search]] capabilities to your wiki. ### Translation via po files diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index eb6ee4445..6e6af8adb 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -18,6 +18,12 @@ I think it could be really powerful and useful, especially if it becomes part of > It looks like an interesting idea. I don't have time right now to look at it in depth, but it looks interesting. -- [[Will]] +> I agree such a separation makes some sense. But note that the discussion on [[todo/structured_page_data]] +> talks about associating data types with fields for a good reason: It's hard to later develop a good UI for +> querying or modifying a page's data if all the data has an implicit type "string". --[[Joey]] + +>> I'm not sure that having an implicit type of "string" is really such a bad thing. After all, Perl itself manages with just string and number, and easily converts from one to the other. Strong typing is generally used to (a) restrict what can be done with the data and/or (b) restrict how the data is input. The latter could be done with some sort of validated form, but that, too, could be decoupled from looking up and returning the value of a field. --[[KathrynAndersen]] + ## Second Pass I have written additional plugins which integrate with the [[plugins/contrib/field]] plugin to both set and get structured page data. @@ -27,3 +33,31 @@ I have written additional plugins which integrate with the [[plugins/contrib/fie * [[plugins/contrib/ymlfront]] - looks for YAML-format data at the front of a page; this is just one possible back-end for the structured data --[[KathrynAndersen]] + +> I'm not an IkiWiki committer ([[Joey]] is the only one I think) +> but I really like the look of this scheme. In particular, +> having `getfield` interop with `field` without being *part of* +> `field` makes me happy, since I'm not very keen on `getfield`'s +> syntax (i.e. "ugh, yet another mini-markup-language without a +> proper escaping mechanism"), but this way people can experiment +> with different syntaxes while keeping `field` for the +> behind-the-scenes bits. +> +>> I've started using `field` on a private site and it's working +>> well for me; I'll try to do some code review on its +>> [[plugins/contrib/field/discussion]] page. --s +> +> My [[plugins/contrib/album]] plugin could benefit from +> integration with `field` for photos' captions and so on, +> probably... I'll try to work on that at some point. +> +> [[plugins/contrib/report]] may be doing too much, though: +> it seems to be an variation on `\[[inline archive="yes"]]`, +> with an enhanced version of sorting, a mini version of +> [[todo/wikitrails]], and some other misc. I suspect it could +> usefully be divided up into discrete features? One good way +> to do that might be to shuffle bits of its functionality into +> the IkiWiki distribution and/or separate plugins, until there's +> nothing left in `report` itself and it can just go away. +> +> --[[smcv]] diff --git a/doc/forum/speeding_up_ikiwiki.mdwn b/doc/forum/speeding_up_ikiwiki.mdwn index 2c2ac240e..799186cf8 100644 --- a/doc/forum/speeding_up_ikiwiki.mdwn +++ b/doc/forum/speeding_up_ikiwiki.mdwn @@ -56,7 +56,7 @@ number is still too large to really visualize: the graphviz PNG and PDF output engines segfault for me, the PS one works but I can't get any PS software to render it without exploding. -Now, the relations in the links hash are not the same thing as IkiWiki's notion of dependencies. Can anyone point me at that data structure / where I might be able to add some debugging foo to generate a graph of it? +Now, the relations in the links hash are not the same thing as Ikiwiki's notion of dependencies. Can anyone point me at that data structure / where I might be able to add some debugging foo to generate a graph of it? Once I've figured out that I might be able to optimize some pagespecs. I understand pagespecs are essentially translated into sequential perl code. I diff --git a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn b/doc/forum/utf8_warnings_for___34____92__xAB__34__.mdwn similarity index 100% rename from doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn rename to doc/forum/utf8_warnings_for___34____92__xAB__34__.mdwn diff --git a/doc/git.mdwn b/doc/git.mdwn index 289937121..55967e543 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -26,7 +26,8 @@ be browsed, subscribed to etc on its You are of course free to set up your own ikiwiki git repository with your own [[patches|patch]]. If you list it here, the `gitremotes` script will automatically add it to git remotes. Your repo will automatically be pulled -into [[Joey]]'s working tree. This is recommended. :-) +into [[Joey]]'s working repository where he can see your branches and +think about merging them. This is recommended. :-) <!-- Machine-parsed format: * wikilink <git:url> --> @@ -59,6 +60,8 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[roktas]] `git://github.com/roktas/ikiwiki.git` * [[davrieb|David_Riebenbauer]] `git://git.liegesta.at/git/ikiwiki` ([browse](http://git.liegesta.at/?p=ikiwiki.git;a=summary)) +* [[GustafThorslund]] `http://gustaf.thorslund.org/src/ikiwiki.git` +* [[peteg]] `git://git.hcoop.net/git/peteg/ikiwiki.git` ## branches diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index 982892fca..c1f4d7267 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -16,9 +16,11 @@ You must specify the setup file for your wiki. The pages will be created inside its `srcdir`, beneath the `archivebase` directory used by the calendar plugin (default "archives"). -You will probably want to specify a [[ikiwiki/PageSpec]] -to control which pages are included on the calendars. The -default is all pages. To limit it to only posts in a blog, +To control which pages are included on the calendars, +a [[ikiwiki/PageSpec]] can be specified. The default is +all pages, or the pages specified by the `comments_pagespec` +setting in the config file. A pagespec can also be specified +on the command line. To limit it to only posts in a blog, use something like "posts/* and !*/Discussion". It defaults to creating calendar pages for the current diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn index b2ac75b11..198da9d51 100644 --- a/doc/ikiwiki/directive/calendar.mdwn +++ b/doc/ikiwiki/directive/calendar.mdwn @@ -40,9 +40,12 @@ An example crontab: "month" or "year". The default is a month view calendar. * `pages` - Specifies the [[ikiwiki/PageSpec]] of pages to link to from the month calendar. Defaults to "*". -* `archivebase` - Configures the base of the archives hierarchy. The - default is "archives". Note that this default can also be overridden +* `archivebase` - Configures the base of the archives hierarchy. + The default is "archives". Note that this default can also be overridden for the whole wiki by setting `archivebase` in ikiwiki's setup file. + Calendars link to pages under here, with names like "2010/04" and + "2010". These pages can be automatically created using the + `ikiwiki-calendar` program. * `year` - The year for which the calendar is requested. Defaults to the current year. * `month` - The numeric month for which the calendar is requested, in the diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 557441c0b..5a3919dea 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -23,6 +23,13 @@ Supported fields: be set to a true value in the template; this can be used to format things differently in this case. + An optional `sortas` parameter will be used preferentially when + [[ikiwiki/pagespec/sorting]] by `meta(title)`: + + \[[!meta title="The Beatles" sortas="Beatles, The"]] + + \[[!meta title="David Bowie" sortas="Bowie, David"]] + * license Specifies a license for the page, for example, "GPL". Can contain @@ -37,6 +44,11 @@ Supported fields: Specifies the author of a page. + An optional `sortas` parameter will be used preferentially when + [[ikiwiki/pagespec/sorting]] by `meta(author)`: + + \[[!meta author="Joey Hess" sortas="Hess, Joey"]] + * authorurl Specifies an url for the author of a page. diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn index 68f4d2734..d0e0e7be7 100644 --- a/doc/ikiwiki/directive/pagestats.mdwn +++ b/doc/ikiwiki/directive/pagestats.mdwn @@ -4,10 +4,16 @@ This directive can generate stats about how pages link to each other. It can produce either a tag cloud, or a table counting the number of links to each page. -Here's how to use it to create a [[tag]] cloud: +Here's how to use it to create a [[tag]] cloud, with tags sized based +on frequency of use: \[[!pagestats pages="tags/*"]] +Here's how to create a list of tags, sized by use as they would be in a +cloud. + + \[[!pagestats style="list" pages="tags/*"]] + And here's how to create a table of all the pages on the wiki: \[[!pagestats style="table"]] @@ -28,4 +34,7 @@ links: \[[!pagestats style="table" show="10"]] +The optional `class` parameter can be used to control the class +of the generated tag cloud `div` or page stats `table`. + [[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/directive/table.mdwn b/doc/ikiwiki/directive/table.mdwn index e27a94b7c..a6692f92c 100644 --- a/doc/ikiwiki/directive/table.mdwn +++ b/doc/ikiwiki/directive/table.mdwn @@ -6,8 +6,8 @@ or DSV (delimiter-separated values) format. ## examples \[[!table data=""" - Customer|Amount - Fulanito|134,34 + Customer |Amount + Fulanito |134,34 Menganito|234,56 Menganito|234,56 """]] @@ -42,4 +42,9 @@ cells. For example: as the table header. Set it to "no" to make a table without a header, or "column" to make the first column be the header. +For tab-delimited tables (often obtained by copying and pasting from HTML +or a spreadsheet), `delimiter` must be set to a literal tab character. These +are difficult to type in most web browsers - copying and pasting one from +the table data is likely to be the easiest way. + [[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 697818a2a..ccd7f7eaa 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -4,10 +4,23 @@ specifying the order that matching pages are shown in. The following sort orders can be specified. * `age` - List pages from the most recently created to the oldest. + * `mtime` - List pages with the most recently modified first. -* `title` - Order by title. -* `title_natural` - Only available if [[!cpan Sort::Naturally]] is - installed. Orders by title, but numbers in the title are treated + +* `title` - Order by title (page name). +[[!if test="enabled(sortnaturally)" then=""" +* `title_natural` - Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +"""]] +[[!if test="enabled(meta)" then=""" +* `meta(title)` - Order according to the `\[[!meta title="foo" sortas="bar"]]` + or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no + full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc. + also work. +"""]] + +In addition, you can combine several sort orders and/or reverse the order of +sorting, with a string like `age -title` (which would sort by age, then by +title in reverse order if two pages have the same age). [[!meta robots="noindex, follow"]] diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 8e567ec0d..4a3e41e83 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -40,7 +40,6 @@ Projects & Organizations * [Chaos Computer Club Düsseldorf](https://www.chaosdorf.de) * [monkeysphere](http://web.monkeysphere.info/) * [The Walden Effect](http://www.waldeneffect.org/) -* The support pages for [Trinity Centre for High Performance Computing](http://www.tchpc.tcd.ie/support/) * [St Hugh of Lincoln Catholic Primary School in Surrey](http://www.sthugh-of-lincoln.surrey.sch.uk/) * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) @@ -54,6 +53,7 @@ Projects & Organizations * [Debian Costa Rica](http://cr.debian.net/) * [Fvwm Wiki](http://fvwmwiki.xteddy.org) * [Serialist](http://serialist.net/)'s static pages (documentation, blog). We actually have ikiwiki generate its static content as HTML fragments using a modified page.tmpl template, and then the FastCGI powering our site grabs those fragments and embeds them in the standard dynamic site template. +* [Banu](https://www.banu.com/) Personal sites and blogs ======================== @@ -139,10 +139,10 @@ Personal sites and blogs * [Cosmic Cookout](http://www.cosmiccookout.com/) * [Backyard Deer](http://www.backyarddeer.com/) * [Alex Ghitza homepage and blog](http://aghitza.org/) -* [Mukund's homepage](http://www.mukund.org/) * [Andreas's homepage](http://0x7.ch/) - Ikiwiki, Subversion and CSS template * [Chris Dombroski's boring bliki](https://www.icanttype.org/) * [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. +* [Gustaf Thorslund's blog](http://blog.thorslund.org) Please feel free to add your own ikiwiki site! diff --git a/doc/index.mdwn b/doc/index.mdwn index 732cf7a89..06acc9cec 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -24,5 +24,5 @@ The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] can be submitted and tracked using this wiki. -ikiwiki is developed by [[Joey]] and many contributors, +Ikiwiki is developed by [[Joey]] and many contributors, and is [[FreeSoftware]]. diff --git a/doc/news/version_3.20100102.3.mdwn b/doc/news/version_3.20100102.3.mdwn deleted file mode 100644 index b8f61978c..000000000 --- a/doc/news/version_3.20100102.3.mdwn +++ /dev/null @@ -1,21 +0,0 @@ -ikiwiki 3.20100102.3 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - Happy palindrome day! - - * pagestats: Add show parameter. Closes: #[562129](http://bugs.debian.org/562129) (David Paleino) - * toc: Add startlevel parameter. (kerravonsen) - * Remove example ikiwiki setup file from the Debian package. This - re-enables linking to /usr/share/ikiwiki/examples which has the - example sites also used by auto-blog.setup. The example setup file - can be generated at any time using ikiwiki --dumpsetup so I do - not see a reason to ship it. Closes: #[562183](http://bugs.debian.org/562183) - * Use env hack in python scripts. - * comments: Add a checksum to the name of comment pages, to - avoid merge conflicts when comments are posted to two branches of a - site. - * linkmap: Add option to omit disconnected pages from the map. - * inline: Fix bug that limited displayed pages when feedshow was - specified w/o show. - * Fix several places that did not properly handle capitalization of - the discussionpage setting. Specifically, fixes discussion actions - on discussion pages, and unbreaks the opendiscussion plugin."""]] diff --git a/doc/news/version_3.20100403.mdwn b/doc/news/version_3.20100403.mdwn new file mode 100644 index 000000000..3e9063028 --- /dev/null +++ b/doc/news/version_3.20100403.mdwn @@ -0,0 +1,30 @@ +ikiwiki 3.20100403 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * websetup: Add websetup\_unsafe to allow marking other settings + as unsafe. + * Improve openid url munging; do not display anchors and cgi parameters, + as used by yahoo and google urls. + * Add complete German basewiki and directives translation done by + Sebastian Kuhnert. + * Add a include setting, which can be used to make ikiwiki process + wiki source files, such as .htaccess, that would normally be skipped + for security or other reasons. Closes: #[447267](http://bugs.debian.org/447267) + (Thanks to Aaron Wilson for the original patch.) + * Add support for setup files written in YAML. + * Add --set-yaml switch for setting more complex config file options. + * filecheck: Fix bugs that prevented the pagespecs from matching when + not called by attachment plugin. + * Fix incorrect influence info returned by a failing link() pagespec, + that could lead to bad dependency handling in certain situations. + * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar + if necessary for unusual install. + * auto-blog.setup: Set tagbase by default, since most bloggers will want it. + * Allow wrappers to be built using tcc. (Workaround #452876) + * openid: Use Openid Simple Registration or OpenID Attribute Exchange + to get the user's email address and username. (Neither is yet + used, but they are available in the session object now.) + * page.tmpl: Add Cache-Control must-revalidate to ensure that users + (especially of Firefox) see fresh page content. + * htmlscrubber: Allow colons in urls after '?' + * template: Search for templates in the templatedir, if they are not + found as pages in the wiki."""]] diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn new file mode 100644 index 000000000..103e061e5 --- /dev/null +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -0,0 +1,326 @@ +Having tried out `field`, some comments (from [[smcv]]): + +The general concept looks great. + +The `pagetemplate` hook seems quite namespace-polluting: on a site containing +a list of books, I'd like to have an `author` field, but that would collide +with IkiWiki's use of `<TMPL_VAR AUTHOR>` for the author of the *page* +(i.e. me). Perhaps it'd be better if the pagetemplate hook was only active for +`<TMPL_VAR FIELD_AUTHOR>` or something? (For those who want the current +behaviour, an auxiliary plugin would be easy.) + +> No, please. The idea is to be *able* to override field names if one wishes to, and choose, for yourself, non-colliding field names if one wishes not to. I don't wish to lose the power of being able to, say, define a page title with YAML format if I want to, or to write a site-specific plugin which calculates a page title, or other nifty things. +>It's not like one is going to lose the fields defined by the meta plugin; if "author" is defined by \[[!meta author=...]] then that's what will be found by "field" (provided the "meta" plugin is registered; that's what the "field_register" option is for). +>--[[KathrynAndersen]] + +>> Hmm. I suppose if you put the title (or whatever) in the YAML, then +>> "almost" all the places in IkiWiki that respect titles will do the +>> right thing due to the pagetemplate hook, with the exception being +>> anything that has special side-effects inside `meta` (like `date`), +>> or anything that looks in `$pagestate{foo}{meta}` directly +>> (like `map`). Is your plan that `meta` should register itself by +>> default, and `map` and friends should be adapted to +>> work based on `getfield()` instead of `$pagestate{foo}{meta}`, then? + +>>> Based on `field_get_value()`, yes. That would be my ideal. Do you think I should implement that as an ikiwiki branch? --[[KathrynAndersen]] + +>>>> This doesn't solve cases where certain fields are treated specially; for +>>>> instance, putting a `\[[!meta permalink]]` on a page is not the same as +>>>> putting it in `ymlfront` (in the latter case you won't get your +>>>> `<link>` header), and putting `\[[!meta date]]` is not the same as putting +>>>> `date` in `ymlfront` (in the latter case, `%pagectime` won't be changed). +>>>> +>>>> One way to resolve that would be to have `ymlfront`, or similar, be a +>>>> front-end for `meta` rather than for `field`, and call +>>>> `IkiWiki::Plugin::meta::preprocess` (or a refactored-out function that's +>>>> similar). +>>>> +>>>> There are also some cross-site scripting issues (see below)... --[[smcv]] + +>> (On the site I mentioned, I'm using an unmodified version of `field`, +>> and currently working around the collision by tagging books' pages +>> with `bookauthor` instead of `author` in the YAML.) --s + +>> Revisiting this after more thought, the problem here is similar to the +>> possibility that a wiki user adds a `meta` shortcut +>> to [[shortcuts]], or conversely, that a plugin adds a `cpan` directive +>> that conflicts with the `cpan` shortcut that pages already use. (In the +>> case of shortcuts, this is resolved by having plugin-defined directives +>> always win.) For plugin-defined meta keywords this is the plugin +>> author's/wiki admin's problem - just don't enable conflicting plugins! - +>> but it gets scary when you start introducing things like `ymlfront`, which +>> allow arbitrary, wiki-user-defined fields, even ones that subvert +>> other plugins' assumptions. +>> +>> The `pagetemplate` hook is particularly alarming because page templates are +>> evaluated in many contexts, not all of which are subject to the +>> htmlscrubber or escaping; because the output from `field` isn't filtered, +>> prefixed or delimited, when combined with an arbitrary-key-setting plugin +>> like `ymlfront` it can interfere with other plugins' expectations +>> and potentially cause cross-site scripting exploits. For instance, `inline` +>> has a `pagetemplate` hook which defines the `FEEDLINKS` template variable +>> to be a blob of HTML to put in the `<head>` of the page. As a result, this +>> YAML would be bad: +>> +>> --- +>> FEEDLINKS: <script>alert('code injection detected')</script> +>> --- +>> +>> (It might require a different case combination due to implementation +>> details, I'm not sure.) +>> +>> It's difficult for `field` to do anything about this, because it doesn't +>> know whether a field is meant to be plain text, HTML, a URL, or something +>> else. +>> +>> If `field`'s `pagetemplate` hook did something more limiting - like +>> only emitting template variables starting with `field_`, or from some +>> finite set, or something - then this would cease to be a problem, I think? +>> +>> `ftemplate` and `getfield` don't have this problem, as far as I can see, +>> because their output is in contexts where the user could equally well have +>> written raw HTML directly; the user can cause themselves confusion, but +>> can't cause harmful output. --[[smcv]] + +From a coding style point of view, the `$CamelCase` variable names aren't +IkiWiki style, and the `match_foo` functions look as though they could benefit +from being thin wrappers around a common `&IkiWiki::Plugin::field::match` +function (see `meta` for a similar approach). + +I think the documentation would probably be clearer in a less manpage-like +and more ikiwiki-like style? + +> I don't think ikiwiki *has* a "style" for docs, does it? So I followed the Perl Module style. And I'm rather baffled as to why having the docs laid out in clear sections... make them less clear. --[[KathrynAndersen]] + +>> I keep getting distracted by the big shouty headings :-) +>> I suppose what I was really getting at was that when this plugin +>> is merged, its docs will end up split between its plugin +>> page, [[plugins/write]] and [[ikiwiki/PageSpec]]; on some of the +>> contrib plugins I've added I've tried to separate the docs +>> according to how they'll hopefully be laid out after merge. --s + +If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is +accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can +stop reimplementing sorting. Here's the implementation I'm using, with +your "sortspec" concept (a sort-hook would be very similar): if merged, +I think it should just be part of `field` rather than a separate plugin. + + # Copyright © 2010 Simon McVittie, released under GNU GPL >= 2 + package IkiWiki::Plugin::fieldsort; + use warnings; + use strict; + use IkiWiki 3.00; + use IkiWiki::Plugin::field; + + sub import { + hook(type => "getsetup", id => "fieldsort", call => \&getsetup); + } + + sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, + } + + package IkiWiki::SortSpec; + + sub cmp_field { + if (!length $_[0]) { + error("sort=field requires a parameter"); + } + + my $left = IkiWiki::Plugin::field::field_get_value($_[0], $a); + my $right = IkiWiki::Plugin::field::field_get_value($_[0], $b); + + $left = "" unless defined $left; + $right = "" unless defined $right; + return $left cmp $right; + } + + 1; + +---- + +Disclaimer: I've only looked at this plugin and ymlfront, not other related +stuff yet. (I quite like ymlfront, so I looked at this as its dependency. :) +I also don't want to annoy you with a lot of design discussion +if your main goal was to write a plugin that did exactly what you wanted. + +My first question is: Why we need another plugin storing metadata +about the page, when we already have the meta plugin? Much of the +complication around the field plugin has to do with it accessing info +belonging to the meta plugin, and generalizing that to be able to access +info stored by other plugins too. (But I don't see any other plugins that +currently store such info). Then too, it raises points of confusion like +smcv's discuission of field author vs meta author above. --[[Joey]] + +> The point is exactly in the generalization, to provide a uniform interface for accessing structured data, no matter what the source of it, whether that be the meta plugin or some other plugin. + +> There were a few reasons for this: + +>1. In converting my site over from PmWiki, I needed something that was equivalent to PmWiki's Page-Text-Variables (which is how PmWiki implements structured data). +>2. I also wanted an equivalent of PmWiki's Page-Variables, which, rather than being simple variables, are the return-value of a function. This gives one a lot of power, because one can do calculations, derive one thing from another. Heck, just being able to have a "basename" variable is useful. +>3. I noticed that in the discussion about structured data, it was mired down in disagreements about what form the structured data should take; I wanted to overcome that hurdle by decoupling the form from the content. +>4. I actually use this to solve (1), because, while I do use ymlfront, initially my pages were in PmWiki format (I wrote (another) unreleased plugin which parses PmWiki format) including PmWiki's Page-Text-Variables for structured data. So I needed something that could deal with multiple formats. + +> So, yes, it does cater to mostly my personal needs, but I think it is more generally useful, also. +> --[[KathrynAndersen]] + +>> Is it fair to say, then, that `field`'s purpose is to take other +>> plugins' arbitrary per-page data, and present it as a single +>> merged/flattened string => string map per page? From the plugins +>> here, things you then use that merged map for include: +>> +>> * sorting - stolen by [[todo/allow_plugins_to_add_sorting_methods]] +>> * substitution into pages with Perl-like syntax - `getfield` +>> * substitution into wiki-defined templates - the `pagetemplate` +>> hook +>> * substitution into user-defined templates - `ftemplate` +>> +>> As I mentioned above, the flattening can cause collisions (and in the +>> `pagetemplate` case, even security problems). +>> +>> I wonder whether conflating Page Text Variables with Page Variables +>> causes `field` to be more general than it needs to be? +>> To define a Page Variable (function-like field), you need to write +>> a plugin containing that Perl function; if we assume that `field` +>> or something resembling it gets merged into ikiwiki, then it's +>> reasonable to expect third-party plugins to integrate with whatever +>> scaffolding there is for these (either in an enabled-by-default +>> plugin that most people are expected to leave enabled, like `meta` +>> now, or in the core), and it doesn't seem onerous to expect each +>> plugin that wants to participate in this mechanism to have code to +>> do so. While it's still contrib, `field` could just have a special case +>> for the meta plugin, rather than the converse? +>> +>> If Page Text Variables are limited to being simple strings as you +>> suggest over in [[forum/an_alternative_approach_to_structured_data]], +>> then they're functionally similar to `meta` fields, so one way to +>> get their functionality would be to extend `meta` so that +>> +>> \[[!meta badger="mushroom"]] +>> +>> (for an unrecognised keyword `badger`) would store +>> `$pagestate{$page}{meta}{badger} = "mushroom"`? Getting this to +>> appear in templates might be problematic, because a naive +>> `pagetemplate` hook would have the same problem that `field` combined +>> with `ymlfront` currently does. +>> +>> One disadvantage that would appear if the function-like and +>> meta-like fields weren't in the same namespace would be that it +>> wouldn't be possible to switch a field from being meta-like to being +>> function-like without changing any wiki content that referenced it. +>> +>> Perhaps meta-like fields should just *be* `meta` (with the above +>> enhancement), as a trivial case of function-like fields? That would +>> turn `ymlfront` into an alternative syntax for `meta`, I think? +>> That, in turn, would hopefully solve the special-fields problem, +>> by just delegating it to meta. I've been glad of the ability to define +>> new ad-hoc fields with this plugin without having to write an extra plugin +>> to do so (listing books with a `bookauthor` and sorting them by +>> `"field(bookauthor) title"`), but that'd be just as easy if `meta` +>> accepted ad-hoc fields? +>> +>> --[[smcv]] + +>>> Your point above about cross-site scripting is a valid one, and something I +>>> hadn't thought of (oops). + +>>> I still want to be able to populate pagetemplate templates with field, because I +>>> use it for a number of things, such as setting which CSS files to use for a +>>> given page, and, as I said, for titles. But apart from the titles, I +>>> realize I've been setting them in places other than the page data itself. +>>> (Another unreleased plugin, `concon`, uses Config::Context to be able to +>>> set variables on a per-site, per-directory and a per-page basis). + +>>> The first possible solution is what you suggested above: for field to only +>>> set values in pagetemplate which are prefixed with *field_*. I don't think +>>> this is quite satisfactory, since that would still mean that people could +>>> put un-scrubbed values into a pagetemplate, albeit they would be values +>>> named field_foo, etc. --[[KathrynAndersen]] + +>>>> They can already do similar; `PERMALINK` is pre-sanitized to +>>>> ensure that it's a "safe" URL, but if an extremely confused wiki admin was +>>>> to put `COPYRIGHT` in their RSS/Atom feed's `<link>`, a malicious user +>>>> could put an unsafe (e.g. Javascript) URL in there (`COPYRIGHT` *is* +>>>> HTML-scrubbed, but "javascript:alert('pwned!')" is just text as far as a +>>>> HTML sanitizer is concerned, so it passes straight through). The solution +>>>> is to not use variables in situations where that variable would be +>>>> inappropriate. Because `field` is so generic, the definition of what's +>>>> appropriate is difficult. --[[smcv]] + +>>> An alternative solution would be to classify field registration as "secure" +>>> and "insecure". Sources such as ymlfront would be insecure, sources such +>>> as concon (or the $config hash) would be secure, since they can't be edited +>>> as pages. Then, when doing pagetemplate substitution (but not ftemplate +>>> substitution) the insecure sources could be HTML-escaped. +>>> --[[KathrynAndersen]] + +>>>> Whether you trust the supplier of data seems orthogonal to whether its value +>>>> is (meant to be) interpreted as plain text, HTML, a URL or what? +>>>> +>>>> Even in cases where you trust the supplier, you need to escape things +>>>> suitably for the context, not for security but for correctness. The +>>>> definition of the value, and the context it's being used in, changes the +>>>> processing you need to do. An incomplete list: +>>>> +>>>> * HTML used as HTML needs to be html-scrubbed if and only if untrusted +>>>> * URLs used as URLs need to be put through `safeurl()` if and only if +>>>> untrusted +>>>> * HTML used as plain text needs tags removed regardless +>>>> * URLs used as plain text are safe +>>>> * URLs or plain text used in HTML need HTML-escaping (and URLs also need +>>>> `safeurl()` if untrusted) +>>>> * HTML or plain text used in URLs need URL-escaping (and the resulting +>>>> URL might need sanitizing too?) +>>>> +>>>> I can't immediately think of other data types we'd be interested in beyond +>>>> text, HTML and URL, but I'm sure there are plenty. + +>>>>> But isn't this a problem with anything that uses pagetemplates? Or is +>>>>> the point that, with plugins other than `field`, they all know, +>>>>> beforehand, the names of all the fields that they are dealing with, and +>>>>> thus the writer of the plugin knows which treatment each particular field +>>>>> needs? For example, that `meta` knows that `title` needs to be +>>>>> HTML-escaped, and that `baseurl` doesn't. In that case, yes, I see the problem. +>>>>> It's a tricky one. It isn't as if there's only ever going to be a fixed set of fields that need different treatment, either. Because the site admin is free to add whatever fields they like to the page template (if they aren't using the default one, that is. I'm not using the default one myself). +>>>>> Mind you, for trusted sources, since the person writing the page template and the person providing the variable are the same, they themselves would know whether the value will be treated as HTML, plain text, or a URL, and thus could do the needed escaping themselves when writing down the value. + +>>>>> Looking at the content of the default `page.tmpl` let's see what variables fall into which categories: + +>>>>> * **Used as URL:** BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL +>>>>> * **Used as part of a URL:** FAVICON, LOCAL_CSS +>>>>> * **Needs to be HTML-escaped:** TITLE +>>>>> * **Used as-is (as HTML):** FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER + +>>>>> This looks as if only TITLE needs HTML-escaping all the time, and that the URLS all end with "URL" in their name. Unfortunately the FAVICON and LOCAL_CSS which are part of URLS don't have "URL" in their name, though that's fair enough, since they aren't full URLs. + +>>>>> --K.A. + +>>>> One reasonable option would be to declare that `field` takes text-valued +>>>> fields, in which case either consumers need to escape +>>>> it with `<TMPL_VAR FIELD_FOO ESCAPE=HTML>`, and not interpret it as a URL +>>>> without first checking `safeurl`), or the pagetemplate hook needs to +>>>> pre-escape. + +>>>>> Since HTML::Template does have the ability to do ESCAPE=HTML/URL/JS, why not take advantage of that? Some things, like TITLE, probably should have ESCAPE=HTML all the time; that would solve the "to escape or not to escape" problem that `meta` has with titles. After all, when one *sorts* by title, one doesn't really want HTML-escaping in it; only when one uses it in a template. -- K.A. + +>>>> Another reasonable option would be to declare that `field` takes raw HTML, +>>>> in which case consumers need to only use it in contexts that will be +>>>> HTML-scrubbed (but it becomes unsuitable for using as text - problematic +>>>> for text-based things like sorting or URLs, and not ideal for searching). +>>>> +>>>> You could even let each consumer choose how it's going to use the field, +>>>> by having the `foo` field generate `TEXT_FOO` and `HTML_FOO` variables? +>>>> --[[smcv]] + +>>>>> Something similar is already done in `template` and `ftemplate` with the `raw_` prefix, which determines whether the variable should have `htmlize` run over it first before the value is applied to the template. Of course, that isn't scrubbing or escaping, because with those templates, the scrubbing is done afterwards as part of the normal processing. + +>>> Another problem, as you point out, is special-case fields, such as a number of +>>> those defined by `meta`, which have side-effects associated with them, more +>>> than just providing a value to pagetemplate. Perhaps `meta` should deal with +>>> the side-effects, but use `field` as an interface to get the values of those special fields. + +>>> --[[KathrynAndersen]] diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn new file mode 100644 index 000000000..1e0bca5d8 --- /dev/null +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -0,0 +1,33 @@ +I initially thought this wasn't actually necessary - the combination +of [[plugins/template]] with [[plugins/contrib/field]]'s `pagetemplate` +hook ought to provide the same functionality. However, `template` +doesn't run `pagetemplate` hooks; a more general version of this +plugin would be to have a variant of `template` that runs `pagetemplate` +hooks (probably easiest to just patch `template` to implement a +second directive, or have a special parameter `run_hooks="yes"`, +or something). + +> I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] + +>> `Render`, `inline`, `comments` and `recentchanges` run `pagetemplate` +>> hooks, as does anything that uses `IkiWiki::misctemplate`. From that +>> quick survey, it seems as though `template` is the only thing that +>> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? +>> +>> It just seems strange to me that `field` needs to have its own +>> variant of `template` (this), its own variant of `inline` (`report`), +>> and so on - I'd tend to lean more towards having `field` +>> enhance the existing plugins. I'm not an ikiwiki committer, +>> mind... Joey, your opinion would be appreciated! --[[smcv]] + +>>> I did it that way basically because I needed the functionality ASAP, and I didn't want to step on anyone's toes, so I made them as separate plugins. If Joey wants to integrate the functionality into IkiWiki proper, I would be very happy, but I don't want to put pressure on him. --[[KathrynAndersen]] + +Another missing thing is that `ftemplate` looks in +the "system" templates directories, not just in the wiki, but that +seems orthogonal (and might be a good enhancement to `template` anyway). +--[[smcv]] + +> Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] + +>> Joey has added support for +>> [[todo/user-defined_templates_outside_the_wiki]] now. --s diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn new file mode 100644 index 000000000..9187b1350 --- /dev/null +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -0,0 +1,14 @@ +My one concern about this plugin is the `=for` markup in POD. + +> Some format names that formatters currently are known to +> accept include "roff", "man", "latex", "tex", "text", and "html". + +I don't know which of these [[!cpan Pod::Xhtml]] supports. If it currently +supports, or later support latex, that could be problimatic since that +could maybe be used to include files or run code. --[[Joey]] + +> I don't know, either; the documentation for [[!cpan Pod:Xhtml]] is silent on this subject. --[[KathrynAndersen]] + +>> I'm afraid the only approach is to audit the existing code in the perl +>> module(s), and then hope nothing is added to them later that opens a +>> security hole. --[[Joey]] diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn new file mode 100644 index 000000000..e23a4ced4 --- /dev/null +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -0,0 +1,75 @@ +Wow, this plugin does a lot... it seems to be `inline` (but without the feeds +or the ability to not have `archive="yes"`), plus part of +[[plugins/contrib/trail]], plus some sorting, plus an ingenious workaround +for template evaluation being relatively stateless. + +A large part of this plugin would just fall off if one of the versions of +"[[todo/allow_plugins_to_add_sorting_methods]]" was merged, which was a +large part of the idea of that feature request :-) To make use of that +you'd have to use `pagespec_match_list` in the trail case too, but that's +easy enough - just add `list => [@the_trail_pages]` to the arguments. + +Another large part would fall off if this plugin required, and internally +invoked, `inline` (like my `comments` plugin does) - `inline` runs +`pagetemplate` hooks, and in particular, it'll run the `field` hook. +Alternatively, this plugin could invoke `pagetemplate` hooks itself, +removing the special case for `field`. + +Perhaps the `headers` thing could migrate into inline somehow? That might +lead to making inline too big, though. + +> I think inline is *already* too big, honestly. --[[KathrynAndersen]] + +>> A fair point; perhaps my complaint should be that *inline* does +>> too many orthogonal things. I suppose the headers feature wouldn't +>> really make sense in an inline that didn't have `archive="yes"`, +>> so it'd make sense to recommend this plugin as a replacement +>> for inlining with archive=yes (for which I now realise "inline" +>> is the wrong verb anyway :-) ) --s + +>>> I think *inline* would be a bit less unwieldy if there was some way of factoring out the feed stuff into a separate plugin, but I don't know if that's possible. --K.A. + +Is the intention that the `trail` part is a performance hack, or a way +to select pages? How does it relate to [[todo/wikitrails]] or +[[plugins/contrib/trail]]? --[[smcv]] + +> The `trail` part is *both* a performance hack, and a way to select pages. I have over 5000 pages on my site, I need all the performance hacks I can get. +> For the performance hack, it is a way of reducing the need to iterate through every single page in the wiki in order to find matching pages. +> For the way-to-select-pages, yes, it is intended to be similar to [[todo/wikitrails]] and [[plugins/contrib/trail]] (and will be more similar with the new release which will be happening soon; it will add prev_* and next_* variables). +> The idea is that, rather than having to add special "trail" links on PageA to indicate that a page is part of the trail, +> it takes advantage of the `%links` hash, which already contains, for each page, an array of the links from that page to other pages. No need for special markup, just use what's there; a trail is defined as "all the pages linked to from page X", and since it's an array, it has an order already. +> But to avoid that being too limiting, one can use a `pages=...` pagespec to filter that list to a subset; only the pages one is interested in. +> And one can also sort it, if one so desires. +> --[[KathrynAndersen]] + +>> That's an interesting approach to trails; I'd missed the fact that +>> links are already ordered. +>> +>> This does have the same problems as tags, though: see +>> [[bugs/tagged()_matching_wikilinks]] and +>> [[todo/matching_different_kinds_of_links]]. I suppose the question +>> now is whether new code should be consistent with `tag` (and +>> potentially be fixed at the same time as tag itself), or try to +>> avoid those problems? +>> +>> The combination of `trail` with another pagespec in this plugin +>> does provide a neat way for it to work around having unwanted +>> pages in the report, by limiting by a suitable tag or subdirectory +>> or something. --s + +>>> Either that, or somehow combine tagging with fields, such that one could declare a tag, and it would create both a link and a field with a given value. (I've been working on something like that, but it still has bugs). +>>> That way, the test for whether something is tagged would be something like "link(tag/foo) and field(tag foo)". +>>> --K.A. + +>>>> I can see that this'd work well for 1:1 relationships like next +>>>> and previous, but I don't think that'd work for pages with more than +>>>> one tag - as far as I can see, `field`'s data model is that each +>>>> page has no more than one value for each field? +>>>> [[todo/Matching_different_kinds_of_links]] has some thoughts about +>>>> how it could be implemented, though. --s + +>>>>> You have a point there. I'm not sure what would be better: to add the concept of arrays/sets to `field`, or to think of tags as a special case. Problem is, I find tags as they currently exist to be too limiting. I prefer something that can be used for Faceted Tagging <http://en.wikipedia.org/wiki/Faceted_classification>; that is, things like Author:Fred Nurk, Genre:Historical, Rating:Good, and so on. Of course, that doesn't mean that each tag is limited to only one value, either; just to take the above examples, something might have more than one author, or have multiple genres (such as Historical + Romance). + +>>>>> It might be that adding arrays to the `field` plugin is a good way to go: after all, even though field=value is the most common, with the flexibility of things like YAML, one could define all sorts of things. What I'm not so sure about is how to return the values when queried, since some things would be expecting scalars all the time. Ah, perhaps I could use wantarray? +>>>>> Is there a way of checking a HTML::Template template to see if it expecting an array for a particular value? +>>>>> --[[KathrynAndersen]] diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn index 9cda02f88..72cce083c 100644 --- a/doc/plugins/contrib/xslt/discussion.mdwn +++ b/doc/plugins/contrib/xslt/discussion.mdwn @@ -20,3 +20,30 @@ possible. Can it also read other arbitrary files, run other programs, etc? > For the second point, I think the main concern would be resource usage. XSLT is a pretty limited language; it can read other XML files, but it can't run other programs so far as I know. > -- [[KathrynAndersen]] + +>> XSLT is, indeed, a Turing-complete programming language. + However, [XML::LibXSLT][] provides a set of functions to help + to minimize the damage that may be caused by running a random + program. + +>> In particular, `max_depth ()` allows for the maximum + recursion depth to be set, while + `read_file ()`, `write_file ()`, `create_dir ()`, + `read_net ()` and `write_net ()` + are the callbacks that allow any of the possible file + operations to be denied. + +>> To be honest, I'd prefer for the `read_file ()` callback to + only grant access to the files below the Ikiwiki source + directory, and for all the `write_`… and + …`_net` callbacks to deny the access unconditionally. + +>> One more wishlist item: allow the set of locations to take + `.xsl` files from to be preconfigured, so that, e. g., + one could allow (preasumably trusted) system stylesheets, + while disallowing any stylesheets that are placed on the Wiki + itself. + +>> — Ivan Shmakov, 2010-03-28Z. + +[XML::LibXSLT]: http://search.cpan.org/~PAJAS/XML-LibXSLT/LibXSLT.pm diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn new file mode 100644 index 000000000..3ad02af29 --- /dev/null +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -0,0 +1,11 @@ +My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: +<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>) +has some fixes for compatibility with old YAML modules, mostly done by imitating +Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] + +> I would if I could *find* it. I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what? +> --[[KathrynAndersen]] + +>> Sorry, I accidentally removed `field-etc` by pushing with `--mirror` from a +>> different checkout. I've put it back; it's a branch from your `ikiplugins.git`, +>> so yes, the code should be in `IkiWiki/Plugin`. --[[smcv]] diff --git a/doc/plugins/moderatedcomments.mdwn b/doc/plugins/moderatedcomments.mdwn index c29b0b052..f9466e833 100644 --- a/doc/plugins/moderatedcomments.mdwn +++ b/doc/plugins/moderatedcomments.mdwn @@ -8,5 +8,5 @@ By default, all comments made by anyone who is not an admin will be held for moderation. The `moderate_pagespec` setting can be used to specify a [[ikiwiki/PageSpec]] to match comments and users who should be moderated. For example, to avoid moderating comments from logged-in users, set -`moderate_pagespec` to "!user(*)". Or to moderate everyone except for -admins, set it to "!admin(*)". +`moderate_pagespec` to "`!user(*)`". Or to moderate everyone except for +admins, set it to "`!admin(*)`". diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn new file mode 100644 index 000000000..a16381946 --- /dev/null +++ b/doc/plugins/sortnaturally.mdwn @@ -0,0 +1,6 @@ +[[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]] +[[!tag type/meta]] + +This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] +order, which uses [[!cpan Sort::Naturally]] to sort numbered pages in a +more natural order. diff --git a/doc/plugins/txt.mdwn b/doc/plugins/txt.mdwn index 420898d09..a3087c9e0 100644 --- a/doc/plugins/txt.mdwn +++ b/doc/plugins/txt.mdwn @@ -12,3 +12,8 @@ The only exceptions are that [[WikiLinks|ikiwiki/WikiLink]] and [[directives|ikiwiki/directive]] are still expanded by ikiwiki, and that, if the [[!cpan URI::Find]] perl module is installed, URLs in the txt file are converted to hyperlinks. + +---- + +As a special case, a file `robots.txt` will be copied intact into the +`destdir`, as well as creating a wiki page named "robots". diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..707622956 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -633,6 +633,22 @@ reference. Do not modify this hash directly; call `add_link()`. $links{"foo"} = ["bar", "baz"]; +### `%typedlinks` + +The `%typedlinks` hash records links of specific types. Do not modify this +hash directly; call `add_link()`. The keys are page names, and the values +are hash references. In each page's hash reference, the keys are link types +defined by plugins, and the values are hash references with link targets +as keys, and 1 as a dummy value, something like this: + + $typedlinks{"foo"} = { + tag => { short_word => 1, metasyntactic_variable => 1 }, + next_page => { bar => 1 }, + }; + +Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in +`%typedlinks`. + ### `%pagesources` The `%pagesources` has can be used to look up the source filename @@ -718,7 +734,10 @@ Additional named parameters can be specified: * `filter` is a reference to a function, that is called and passed a page, and returns true if the page should be filtered out of the list. * `sort` specifies a sort order for the list. See - [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. + [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. Note that + if a sort method is specified that depends on the + page content (such as 'meta(foo)'), the deptype needs to be set to + a content dependency. * `reverse` if true, sorts in reverse. * `num` if nonzero, specifies the maximum number of matching pages that will be returned. @@ -939,11 +958,14 @@ Optionally, a third parameter can be passed, to specify the preferred filename of the page. For example, `targetpage("foo", "rss", "feed")` will yield something like `foo/feed.rss`. -### `add_link($$)` +### `add_link($$;$)` This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. +An optional third parameter sets the link type. If not specified, +it is an ordinary [[ikiwiki/WikiLink]]. + ## Miscellaneous ### Internal use pages @@ -1110,6 +1132,24 @@ For example, "backlink(foo)" is influenced by the contents of page foo; they match; "created_before(foo)" is influenced by the metadata of foo; while "glob(*)" is not influenced by the contents of any page. +### Sorting plugins + +Similarly, it's possible to write plugins that add new functions as +[[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to +the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting +by `foo` or `foo(...)` is requested. + +The names of pages to be compared are in the global variables `$a` and `$b` +in the IkiWiki::SortSpec package. The function should return the same thing +as Perl's `cmp` and `<=>` operators: negative if `$a` is less than `$b`, +positive if `$a` is greater, or zero if they are considered equal. It may +also raise an error using `error`, for instance if it needs a parameter but +one isn't provided. + +The function will also be passed one or more parameters. The first is +`undef` if invoked as `foo`, or the parameter `"bar"` if invoked as `foo(bar)`; +it may also be passed additional, named parameters. + ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index f66b85495..4e7a8d2a6 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -7,10 +7,27 @@ Ikiwiki started out supporting only [[Subversion|svn]], but the interface ikiwiki uses to a revision control system is sufficiently simple and generic that it can be adapted to work with many systems by writing a [[plugin|plugins/write]]. [[Subversion|svn]] is still a recommended choice; -[[git]] is another well-tested option. +[[git]] is another well-tested option. -These are all the supported revision control systems: -[[!inline pages="rcs/* and !*/Discussion and !rcs/details" archive=yes]] +While all supported revision control systems work well enough for basic +use, some advanced or special features are not supported in all of them. +Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to +set up a wiki using that revision control system. The `rcs_commit_staged` +hook is needed to use [[attachments|plugins/attachment]] or +[[plugins/comments]]. And so on. The table below summarises this for each +revision control system and links to more information about each. + +[[!table data=""" +feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] +[[ikiwiki-makerepo]]|yes |yes |yes |yes |yes |yes |no |yes +auto.setup |yes |yes |incomplete|yes |incomplete |yes |incomplete|yes +`rcs_commit_staged` |yes |yes |yes |yes |no |yes |no |yes +`rcs_rename` |yes |yes |yes |yes |no |yes |no |yes +`rcs_remove` |yes |yes |yes |yes |no |yes |no |yes +`rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes +anonymous push |yes |no |no |no |no |no |no |no +conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes +"""]] There is a page with [[details]] about how the different systems work with ikiwiki, for the curious. diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8cba8973f..c323153c8 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,6 +1,6 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). - +[[Testing 1 2 3| test]] # Header ## Subheader2 diff --git a/doc/style.css b/doc/style.css index 317d4c7aa..af0fc230c 100644 --- a/doc/style.css +++ b/doc/style.css @@ -228,7 +228,7 @@ div.recentchanges { .bigPC { font-size: 115%; } .biggestPC { font-size: 130%; } -#sidebar { +.sidebar { line-height: 3ex; width: 20ex; float: right; diff --git a/doc/templates.mdwn b/doc/templates.mdwn index eff0e15e9..07531ae98 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -43,6 +43,12 @@ page will provide a link that can be used to create the template. The template is a regular wiki page, located in the `templates/` subdirectory inside the source directory of the wiki. +(Alternatively, templates can be stored in a directory outside the wiki, +as files with the extension ".tmpl". +By default, these are searched for in `/usr/share/ikiwiki/templates`; +the `templatedir` setting can be used to make another directory be searched +first.) + The template uses the syntax used by the [[!cpan HTML::Template]] perl module, which allows for some fairly complex things to be done. Consult its documentation for the full syntax, but all you really need to know are a diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index fe73518ef..a07889e6b 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -34,7 +34,7 @@ branch. If there is, see 'erase spam from the commit history', below, first. Once you are confident it's clean: - # ensure you are on the doc branch + # ensure you are on the master branch $ git branch doc * master @@ -82,5 +82,6 @@ Caveat: if there are no commits you want to keep (i.e. all the commits since the last merge into master are either spam or spam reverts) then `git rebase` will abort. Therefore, this approach only works if you have at least one non-spam commit to the documentation since the last merge into `master`. For -this reason, it's best to tackle spam with reverts until you have at least one -commit you want merged back into the main history. +this reason, it's best to wait until you have at least one +commit you want merged back into the main history before doing a rebase, +and until then, tackle spam with reverts. diff --git a/doc/todo/More_flexible_po-plugin_for_translation.mdwn b/doc/todo/More_flexible_po-plugin_for_translation.mdwn new file mode 100644 index 000000000..3399f7834 --- /dev/null +++ b/doc/todo/More_flexible_po-plugin_for_translation.mdwn @@ -0,0 +1,5 @@ +I have a website with multi-language content, where some content is only in English, some in German, and some is available in both languages. + +The po-module currently has only one master-language, with slave languages, and a PageSpec should be considered. + +It would be nice to flag the content which should have a translation on a file-by-file basis (with some inline directive?) which could contain the information of the master-language for that file and the desired target-languages. diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn new file mode 100644 index 000000000..b523cd19f --- /dev/null +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -0,0 +1,304 @@ +[[!tag patch]] + +The available [[ikiwiki/pagespec/sorting]] methods are currently hard-coded in +IkiWiki.pm, making it difficult to add any extra sorting mechanisms. I've +prepared a branch which adds 'sort' as a hook type and uses it to implement a +new `meta_title` sort type. + +Someone could use this hook to make `\[[!inline sort=title]]` prefer the meta +title over the page name, but for compatibility, I'm not going to (I do wonder +whether it would be worth making sort=name an alias for the current sort=title, +and changing the meaning of sort=title in 4.0, though). + +> What compatability concerns, exactly, are there that prevent making that +> change now? --[[Joey]] + +*[sort-hooks branch now withdrawn in favour of sort-package --s]* + +I briefly tried to turn *all* the current sort types into hook functions, and +have some of them pre-registered, but decided that probably wasn't a good idea. +That earlier version of the branch is also available for comparison: + +*[also withdrawn in favour of sort-package --s]* + +>> I wonder if IkiWiki would benefit from the concept of a "sortspec", like a [[ikiwiki/PageSpec]] but dedicated to sorting lists of pages rather than defining lists of pages? Rather than defining a sort-hook, define a SortSpec class, and enable people to add their own sort methods as functions defined inside that class, similarly to the way they can add their own pagespec definitions. --[[KathrynAndersen]] + +>>> [[!template id=gitbranch branch=smcv/ready/sort-package author="[[Simon_McVittie|smcv]]"]] +>>> I'd be inclined to think that's overkill, but it wasn't very hard to +>>> implement, and in a way is more elegant. I set it up so sort mechanisms +>>> share the `IkiWiki::PageSpec` package, but with a `cmp_` prefix. Gitweb: +>>> <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-package> + +>>>> I agree it seems more elegant, so I have focused on it. +>>>> +>>>> I don't know about reusing `IkiWiki::PageSpec` for this. +>>>> --[[Joey]] + +>>>>> Fair enough, `IkiWiki::SortSpec::cmp_foo` would be just +>>>>> as easy, or `IkiWiki::Sorting::cmp_foo` if you don't like +>>>>> introducing "sort spec" in the API. I took a cue from +>>>>> [[ikiwiki/pagespec/sorting]] being a subpage of +>>>>> [[ikiwiki/pagespec]], and decided that yes, sorting is +>>>>> a bit like a pagespec :-) Which name would you prefer? --s + +>>>>>> `SortSpec` --[[Joey]] + +>>>>>>> [[Done]]. --s + +>>>> I would be inclined to drop the `check_` stuff. --[[Joey]] + +>>>>> It basically exists to support `title_natural`, to avoid +>>>>> firing up the whole import mechanism on every `cmp` +>>>>> (although I suppose that could just be a call to a +>>>>> memoized helper function). It also lets sort specs that +>>>>> *must* have a parameter, like +>>>>> [[field|plugins/contrib/field/discussion]], fail early +>>>>> (again, not so valuable). +>>>>> +>>>>>> AFAIK, `use foo` has very low overhead when the module is already +>>>>>> loaded. There could be some evalation overhead in `eval q{use foo}`, +>>>>>> if so it would be worth addressing across the whole codebase. +>>>>>> --[[Joey]] +>>>>>> +>>>>>>> check_cmp_foo now dropped. --s +>>>>> +>>>>> The former function could be achieved at a small +>>>>> compatibility cost by putting `title_natural` in a new +>>>>> `sortnatural` plugin (that fails to load if you don't +>>>>> have `title_natural`), if you'd prefer - that's what would +>>>>> have happened if `title_natural` was written after this +>>>>> code had been merged, I suspect. Would you prefer this? --s + +>>>>>> Yes! (Assuming it does not make sense to support +>>>>>> natural order sort of other keys than the title, at least..) +>>>>>> --[[Joey]] + +>>>>>>> Done. I added some NEWS.Debian for it, too. --s + +>>>> Wouldn't it make sense to have `meta(title)` instead +>>>> of `meta_title`? --[[Joey]] + +>>>>> Yes, you're right. I added parameters to support `field`, +>>>>> and didn't think about making `meta` use them too. +>>>>> However, `title` does need a special case to make it +>>>>> default to the basename instead of the empty string. +>>>>> +>>>>> Another special case for `title` is to use `titlesort` +>>>>> first (the name `titlesort` is derived from Ogg/FLAC +>>>>> tags, which can have `titlesort` and `artistsort`). +>>>>> I could easily extend that to other metas, though; +>>>>> in fact, for e.g. book lists it would be nice for +>>>>> `field(bookauthor)` to behave similarly, so you can +>>>>> display "Douglas Adams" but sort by "Adams, Douglas". +>>>>> +>>>>> `meta_title` is also meant to be a prototype of how +>>>>> `sort=title` could behave in 4.0 or something - sorting +>>>>> by page name (which usually sorts in approximately the +>>>>> same place as the meta-title, but occasionally not), while +>>>>> displaying meta-titles, does look quite odd. --s + +>>>>>> Agreed. --[[Joey]] + +>>>>>>> I've implemented meta(title). meta(author) also has the +>>>>>>> `sortas` special case; meta(updated) and meta(date) +>>>>>>> should also work how you'd expect them to (but they're +>>>>>>> earliest-first, unlike age). --s + +>>>> As I read the regexp in `cmpspec_translate`, the "command" +>>>> is required to have params. They should be optional, +>>>> to match the documentation and because most sort methods +>>>> do not need parameters. --[[Joey]] + +>>>>> No, `$2` is either `\w+\([^\)]*\)` or `[^\s]+` (with the +>>>>> latter causing an error later if it doesn't also match `\w+`). +>>>>> This branch doesn't add any parameterized sort methods, +>>>>> in fact, although I did provide one on +>>>>> [[field's_discussion_page|plugins/contrib/report/discussion]]. --s + +>>>> I wonder if it would make sense to add some combining keywords, so +>>>> a sortspec reads like `sort="age then ascending title"` +>>>> In a way, this reduces the amount of syntax that needs to be learned. +>>>> I like the "then" (and it could allow other operations than +>>>> simple combination, if any others make sense). Not so sure about the +>>>> "ascending", which could be "reverse" instead, but "descending age" and +>>>> "ascending age" both seem useful to be able to explicitly specify. +>>>> --[[Joey]] + +>>>>> Perhaps. I do like the simplicity of [[KathrynAndersen]]'s syntax +>>>>> from [[plugins/contrib/report]] (which I copied verbatim, except for +>>>>> turning sort-by-`field` into a parameterized spec). +>>>>> +>>>>> If we're getting into English-like (or at least SQL-like) queries, +>>>>> it might make sense to change the signature of the hook function +>>>>> so it's a function to return a key, e.g. +>>>>> `sub key_age { return -%pagemtime{$_[0]) }`. Then we could sort like +>>>>> this: +>>>>> +>>>>> field(artistsort) or field(artist) or constant(Various Artists) then meta(titlesort) or meta(title) or title +>>>>> +>>>>> with "or" binding more closely than "then". Does this seem valuable? +>>>>> I think the implementation would be somewhat more difficult. and +>>>>> it's probably getting too complicated to be worthwhile, though? +>>>>> (The keys that actually benefit from this could just +>>>>> have smarter cmp functions, I think.) +>>>>> +>>>>> If the hooks return keys rather than cmp results, then we could even +>>>>> have "lowercase" as an adjective used like "ascending"... maybe. +>>>>> However, there are two types of adjective here: "lowercase" +>>>>> really applies to the keys, whereas "ascending" applies to the "cmp" +>>>>> result. Again, I think this is getting too complex, and could just +>>>>> be solved with smarter cmp functions. +>>>>> +>>>>>> I agree. (Also, I think returning keys may make it harder to write +>>>>>> smarter cmp functions.) --[[Joey]] +>>>>> +>>>>> Unfortunately, `sort="ascending mtime"` actually sorts by *descending* +>>>>> timestamp (but`sort=age` is fine, because `age` could be defined as +>>>>> now minus `ctime`). `sort=freshness` isn't right either, because +>>>>> "sort by freshness" seems as though it ought to mean freshest first, +>>>>> but "sort by ascending freshness" means put the least fresh first. If +>>>>> we have ascending and descending keywords which are optional, I don't +>>>>> think we really want different sort types to have different default +>>>>> directions - it seems clearer to have `ascending` always be a no-op, +>>>>> and `descending` always negate. +>>>>> +>>>>>> I think you've convinced me that ascending/descending impose too +>>>>>> much semantics on it, so "-" is better. --[[Joey]] + +>>>>>>> I've kept the semantics from `report` as-is, then: +>>>>>>> e.g. `sort="age -title"`. --s + +>>>>> Perhaps we could borrow from `meta updated` and use `update_age`? +>>>>> `updateage` would perhaps be a more normal IkiWiki style - but that +>>>>> makes me think that updateage is a quantity analagous to tonnage or +>>>>> voltage, with more or less recently updated pages being said to have +>>>>> more or less updateage. I don't know whether that's good or bad :-) +>>>>> +>>>>> I'm sure there's a much better word, but I can't see it. Do you have +>>>>> a better idea? --s + +[Regarding the `meta title=foo sort=bar` special case] + +> I feel it sould be clearer to call that "sortas", since "sort=" is used +> to specify a sort method in other directives. --[[Joey]] +>> Done. --[[smcv]] + +## speed + +I notice the implementation does not use the magic `$a` and `$b` globals. +That nasty perl optimisation is still worthwhile: + + perl -e 'use warnings; use strict; use Benchmark; sub a { $a <=> $b } sub b ($$) { $_[0] <=> $_[1] }; my @list=reverse(1..9999); timethese(10000, {a => sub {my @f=sort a @list}, b => sub {my @f=sort b @list}, c => => sub {my @f=sort { b($a,$b) } @list}})' + Benchmark: timing 10000 iterations of a, b, c... + a: 80 wallclock secs (76.74 usr + 0.05 sys = 76.79 CPU) @ 130.23/s (n=10000) + b: 112 wallclock secs (106.14 usr + 0.20 sys = 106.34 CPU) @ 94.04/s (n=10000) + c: 330 wallclock secs (320.25 usr + 0.17 sys = 320.42 CPU) @ 31.21/s (n=10000) + +Unfortunatly, I think that c is closest to the new implementation. +--[[Joey]] + +> Unfortunately, `$a` isn't always `$main::a` - it's `$Package::a` where +> `Package` is the call site of the sort call. This was a showstopper when +> `sort` was a hook implemented in many packages, but now that it's a +> `SortSpec`, I may be able to fix this by putting a `sort` wrapper in the +> `SortSpec` namespace, so it's like this: +> +> sub sort ($@) +> { +> my $cmp = shift; +> return sort $cmp @_; +> } +> +> which would mean that the comparison used `$IkiWiki::SortSpec::a`. +> --s + +>> I've now done this. On a wiki with many [[plugins/contrib/album]]s +>> (a full rebuild takes half an hour!), I tested a refresh after +>> `touch tags/*.mdwn` (my tag pages contain inlines of the form +>> `tagged(foo)` sorted by date, so they exercise sorting). +>> I also tried removing sorting from `pagespec_match_list` +>> altogether, as an upper bound for how fast we can possibly make it. +>> +>> * `master` at branch point: 63.72user 0.29system +>> * `master` at branch point: 63.91user 0.37system +>> * my branch, with `@_`: 65.28user 0.29system +>> * my branch, with `@_`: 65.21user 0.28system +>> * my branch, with `$a`: 64.09user 0.28system +>> * my branch, with `$a`: 63.83user 0.36system +>> * not sorted at all: 58.99user 0.29system +>> * not sorted at all: 58.92user 0.29system +>> +>> --s + +> I do notice that `pagespec_match_list` performs the sort before the +> filter by pagespec. Is this a deliberate design choice, or +> coincidence? I can see that when `limit` is used, this could be +> used to only run the pagespec match function until `limit` pages +> have been selected, but the cost is that every page in the wiki +> is sorted. Or, it might be useful to do the filtering first, then +> sort the sub-list thus produced, then finally apply the limit? --s + +>> Yes, it was deliberate, pagespec matching can be expensive enough that +>> needing to sort a lot of pages seems likely to be less work. (I don't +>> remember what benchmarking was done though.) --[[Joey]] + +>>> We discussed this on IRC and Joey pointed out that this also affects +>>> dependency calculation, so I'm not going to get into this now... --s + +Joey pointed out on IRC that the `titlesort` feature duplicates all the +meta titles. I did that in order to sort by the unescaped version, but +I've now changed the branch to only store that if it makes a difference. +--s + +## Documentation from sort-package branch + +### advanced sort orders (conditionally added to [[ikiwiki/pagespec/sorting]]) + +* `title_natural` - Orders by title, but numbers in the title are treated + as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +* `meta(title)` - Order according to the `\[[!meta title="foo" sortas="bar"]]` + or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no + full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc. + also work. + +### Multiple sort orders (added to [[ikiwiki/pagespec/sorting]]) + +In addition, you can combine several sort orders and/or reverse the order of +sorting, with a string like `age -title` (which would sort by age, then by +title in reverse order if two pages have the same age). + +### meta sortas parameter (added to [[ikiwiki/directive/meta]]) + +[in title] + +An optional `sort` parameter will be used preferentially when +[[ikiwiki/pagespec/sorting]] by `meta(title)`: + + \[[!meta title="The Beatles" sort="Beatles, The"]] + + \[[!meta title="David Bowie" sort="Bowie, David"]] + +[in author] + + An optional `sortas` parameter will be used preferentially when + [[ikiwiki/pagespec/sorting]] by `meta(author)`: + + \[[!meta author="Joey Hess" sortas="Hess, Joey"]] + +### Sorting plugins (added to [[plugins/write]]) + +Similarly, it's possible to write plugins that add new functions as +[[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to +the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting +by `foo` or `foo(...)` is requested. + +The names of pages to be compared are in the global variables `$a` and `$b` +in the IkiWiki::SortSpec package. The function should return the same thing +as Perl's `cmp` and `<=>` operators: negative if `$a` is less than `$b`, +positive if `$a` is greater, or zero if they are considered equal. It may +also raise an error using `error`, for instance if it needs a parameter but +one isn't provided. + +The function will also be passed one or more parameters. The first is +`undef` if invoked as `foo`, or the parameter `"bar"` if invoked as `foo(bar)`; +it may also be passed additional, named parameters. diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 99a9cf1e2..82670250e 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -36,6 +36,30 @@ definitions essentially. >> I've made may not be acceptable, though -- I'd appreciate someone providing >> some feedback on that hunk! +>>> Well, re that hunk, taint checking is currently disabled, but +>>> if the perl bug that disallows it is fixed and it is turned back on, +>>> the hash values will remain tainted, which will probably lead to +>>> problems. +>>> +>>> I'm also leery of using such a complex data structure in config. +>>> The websetup plugin would be hard pressed to provide a UI for such a +>>> data structure. (It lacks even UI for a single hash ref yet, let alone +>>> a list.) +>>> +>>> Also, it seems sorta wrong to have two so very different syntaxes to +>>> represent the same meta data. A user without a lot of experience will +>>> be hard pressed to map from a directive to this in the setup file. +>>> +>>> All of which leads me to think the setup file could just contain +>>> a text that could hold meta directives. Which generalizes really to +>>> a text that contains any directives, and is, perhaps appended to the +>>> top of every page. Which nearly generalizes to the sidebar plugin, +>>> or perhaps something more general than that... +>>> +>>> However, excessive generalization is the root of all evil, so +>>> I'm not necessarily saying that's a good idea. Indeed, my memory +>>> concerns below invalidate this idea pretty well. --[[Joey]] + diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 6fe9cda..2f8c098 100644 --- a/IkiWiki/Plugin/meta.pm @@ -125,6 +149,10 @@ definitions essentially. >> are only relevant to defined fields that you wouldn't want to specify a >> global default for anyway. >> +>>> I generally agree with this. It is *possible* that meta would have a new +>>> field added, that takes parameters and make sense to use globally. +>>> --[[Joey]] +>> >> Due to this, and the added complexity of the second patch (having to adjust >> `IkiWiki/Setup.pm`), I think the first patch makes more sense. I've thus >> reverted to it here. @@ -183,3 +211,36 @@ definitions essentially. >>> ikiwiki for the break, and now I've returned to watching recentchanges. >>> Hopefully I'll be back in the mix soon, too. In the meantime, Joey, have >>> you had a chance to look at this yet? -- [[Jon]] + +>>>> Ping :) Hi. [[Joey]], would you consider this patch for the next +>>>> ikiwiki release? -- [[Jon]] + +>>> For this to work with websetup and --dumpsetup, it needs to define the +>>> `meta_*` settings in the getsetup function. +>>>> +>>>> I think this will be problematic with the current implementation of this +>>>> patch. The datatype here is an array of hash references, with each hash +>>>> having a variable (and arbitrary) number of key/value pairs. I can't +>>>> think of an intuitive way of implementing a way of editing such a +>>>> datatype in the web interface, let alone registering the option in +>>>> getsetup. +>>>> +>>>> Perhaps a limited set of defined meta values could be exposed via +>>>> websetup (the obvious ones: author, copyright, license, etc.) -- [[Jon]] +>>> +>>> I also have some concerns about both these patches, since both throw +>>> a lot of redundant data at meta, which then stores it in a very redundant +>>> way. Specifically, meta populates a per-page `%metaheaders` hash +>>> as well as storing per-page metadata in `%pagestate`. So, if you have +>>> a wiki with 10 thousand pages, and you add a 1k site-wide license text, +>>> that will bloat the memory usage of ikiwiki by in excess of 2 +>>> megabytes. It will also cause ikiwiki to write a similar amount more data +>>> to its state file which has to be loaded back in each +>>> run. +>>> +>>> Seems that this could be managed much more efficiently by having +>>> meta special-case the site-wide settings, not store them in these +>>> per-page data structures, and just make them be used if no per-page +>>> metadata of the given type is present. --[[Joey]] +>>>> +>>>> that should be easy enough to do. I will work on a patch. -- [[Jon]] diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index a0e76fd48..07b570b1b 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -164,8 +164,12 @@ wrong direction. > Starting review of this. Some of your commits are to very delicate, > optimised, and security-sensitive ground, so I have to look at them very > carefully. --[[Joey]] -> -> * In the refactoring in f3abeac919c4736429bd3362af6edf51ede8e7fe, + +>> First of, sorry that it took me so damn long to answer. I didn't lose +>> interest but it took a while for me to find the time and motivation +>> to address you suggestions. --[[David_Riebenbauer]] + +> * In the refactoring in [f3abeac919c4736429bd3362af6edf51ede8e7fe][], > you introduced at least 2 bugs, one a possible security hole. > Now one part of the code tests `if ($file)` and the other > caller tests `if ($f)`. These two tests both tested `if (! defined $f)` @@ -177,18 +181,39 @@ wrong direction. > bare `_` in the first to make perl reuse the stat buffer. > * (As a matter of style, could you put a space after the commas in your > perl?) -> + +>> The first two points should be addressed in +>> [da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0][]. And sure, I can add the +>> spaces. --[[David_Riebenbauer]] + > I'd like to cherry-pick the above commit, once it's in shape, before > looking at the rest in detail. So just a few other things that stood out. > -> * Commit 4af4d26582f0c2b915d7102fb4a604b176385748 seems unnecessary. +> * Commit [4af4d26582f0c2b915d7102fb4a604b176385748][] seems unnecessary. > `srcfile($file, 1)` already is documented to return undef if the > file does not exist. (But without the second parameter, it throws > an error.) -> -> * Commit f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 adds a line + +>> You're right. I must have been some confused by some other promplem I +>> introduced then. Reverted. --[[David_Riebenbauer]] + +> * Commit [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1][] adds a line > that is intented by a space, not a tab. -> -> * Commit f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 says that auto-added + +>> Sorry, That one was reverted anyway. --[[David_Riebenbauer]] + +> * Commit [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1][] says that auto-added > files will be recreated if the user deletes them. That seems bad. > `autoindex` goes to some trouble to not recreate deleted files. + +>> I reverted the commit and addressed the issue in +>> [a358d74bef51dae31332ff27e897fe04834571e6][] and +>> [981400177d68a279f485727be3f013e68f0bf691][]. + --[[David_Riebenbauer]] + +[f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) +[4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) +[f58f3e1bec41ccf9316f37b014ce0b373c8e49e1]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (commitdiff for f58f3e1bec41ccf9316f37b014ce0b373c8e49e1) +[da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0 (commitdiff for da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0) +[a358d74bef51dae31332ff27e897fe04834571e6]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=a358d74bef51dae31332ff27e897fe04834571e6 (commitdiff for a358d74bef51dae31332ff27e897fe04834571e6) +[981400177d68a279f485727be3f013e68f0bf691]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=981400177d68a279f485727be3f013e68f0bf691 (commitdiff for 981400177d68a279f485727be3f013e68f0bf691) diff --git a/doc/todo/link_plugin_perhaps_too_general__63__.mdwn b/doc/todo/link_plugin_perhaps_too_general__63__.mdwn new file mode 100644 index 000000000..8a5fd50eb --- /dev/null +++ b/doc/todo/link_plugin_perhaps_too_general__63__.mdwn @@ -0,0 +1,25 @@ +[[!tag wishlist blue-sky]] +(This isn't important to me - I don't use MediaWiki or Creole syntax myself - +but just thinking out loud...) + +The [[ikiwiki/wikilink]] syntax IkiWiki uses sometimes conflicts with page +languages' syntax (notably, [[plugins/contrib/MediaWiki]] and [[plugins/Creole]] +want their wikilinks the other way round, like +`\[[plugins/write|how to write a plugin]]`). It would be nice if there was +some way for page language plugins to opt in/out of the normal wiki link +processing - then MediaWiki and Creole could have their own `linkify` hook +that was only active for *their* page types, and used the appropriate +syntax. + +In [[todo/matching_different_kinds_of_links]] I wondered about adding a +`\[[!typedlink to="foo" type="bar"]]` directive. This made me wonder whether +a core `\[[!link]]` directive would be useful; this could be a fallback for +page types where a normal wikilink can't be done for whatever reason, and +could also provide extension points more easily than WikiLinks' special +syntax with extra punctuation, which doesn't really scale? + +Straw-man: + + \[[!link to="ikiwiki/wikilink" desc="WikiLinks"]] + +--[[smcv]] diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 26c5a072b..da3ea49f6 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -36,6 +36,11 @@ Besides pagespecs, the `rel=` attribute could be used for styles. --Ivan Z. > normal links.) Might be better to go ahead and add the variable to > core though. --[[Joey]] +>> I've implemented this with the data structure you suggested, except that +>> I called it `%typedlinks` instead of `%linktype` (it seemed to make more +>> sense that way). I also ported `tag` to it, and added a `tagged_is_strict` +>> config option. See below! --[[smcv]] + I saw somewhere else here some suggestions for the wiki-syntax for specifying the relation name of a link. One more suggestion---[the syntax used in Semantic MediaWiki](http://en.wikipedia.org/wiki/Semantic_MediaWiki#Basic_usage), like this: <pre> @@ -45,3 +50,147 @@ I saw somewhere else here some suggestions for the wiki-syntax for specifying th So a part of the effect of [[`\[[!taglink TAG\]\]`|plugins/tag]] could be represented as something like `\[[tag::TAG]]` or (more understandable relation name in what concerns the direction) `\[[tagged::TAG]]`. I don't have any opinion on this syntax (whether it's good or not)...--Ivan Z. + +------- + +>> [[!template id=gitbranch author="[[Simon_McVittie|smcv]]" branch=smcv/ready/link-types]] +>> [[!tag patch]] + +## Documentation for smcv's branch + +### added to [[ikiwiki/pagespec]] + +* "`typedlink(type glob)`" - matches pages that link to a given page (or glob) + with a given link type. Plugins can create links with a specific type: + for instance, the tag plugin creates links of type `tag`. + +### added to [[plugins/tag]] + +If the `tagged_is_strict` config option is set, `tagged()` will only match +tags explicitly set with [[ikiwiki/directive/tag]] or +[[ikiwiki/directive/taglink]]; if not (the default), it will also match +any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. + +### added to [[plugins/write]] + +#### `%typedlinks` + +The `%typedlinks` hash records links of specific types. Do not modify this +hash directly; call `add_link()`. The keys are page names, and the values +are hash references. In each page's hash reference, the keys are link types +defined by plugins, and the values are hash references with link targets +as keys, and 1 as a dummy value, something like this: + + $typedlinks{"foo"} = { + tag => { short_word => 1, metasyntactic_variable => 1 }, + next_page => { bar => 1 }, + }; + +Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in +`%typedlinks`. + +#### `add_link($$;$)` + + This adds a link to `%links`, ensuring that duplicate links are not + added. Pass it the page that contains the link, and the link text. + +An optional third parameter sets the link type (`undef` produces an ordinary +[[ikiwiki/WikiLink]]). + +## Review + +Some code refers to `oldtypedlinks`, and other to `oldlinktypes`. --[[Joey]] + +> Oops, I'll fix that. That must mean missing test coverage, too :-( +> --s + +>> A test suite for the dependency resolver *would* be nice. --[[Joey]] + +>>> Bug fixed, I think. A test suite for the dependency resolver seems +>>> more ambitious than I want to get into right now, but I added a +>>> unit test for this part of it... --s + +I'm curious what your reasoning was for adding a new variable +rather than using `pagestate`. Was it only because you needed +the `old` version to detect change, or was there other complexity? +--J + +> You seemed to be more in favour of adding it to the core in +> your proposal above, so I assumed that'd be more likely to be +> accepted :-) I don't mind one way or the other - `%typedlinks` +> costs one core variable, but saves one level of hash nesting. If +> you're not sure either, then I think the decision should come down +> to which one is easier to document clearly - I'm still unhappy with +> my docs for `%typedlinks`, so I'll try to write docs for it as +> `pagestate` and see if they work any better. --s + +>> On reflection, I don't think it's any better as a pagestate, and +>> the contents of pagestates (so far) aren't documented for other +>> plugins' consumption, so I'm inclined to leave it as-is, unless +>> you want to veto that. Loose rationale: it needs special handling +>> in the core to be a dependency type (I re-used the existing link +>> type), it's API beyond a single plugin, and it's really part of +>> the core parallel to pagestate rather than being tied to a +>> specific plugin. Also, I'd need to special-case it to have +>> ikiwiki not delete it from the index, unless I introduced a +>> dummy typedlinks plugin (or just hook) that did nothing... --s + +I have not convinced myself this is a real problem, but.. +If a page has a typed link, there seems to be no way to tell +if it also has a separate, regular link. `add_link` will add +to `@links` when adding a typed, or untyped link. If only untyped +links were recorded there, one could tell the difference. But then +typed links would not show up at all in eg, a linkmap, +unless it was changed to check for typed links too. +(Or, regular links could be recorded in typedlinks too, +with a empty type. (Bloaty.)) --J + +> I think I like the semantics as-is - I can't think of any +> reason why you'd want to ask the question "does A link to B, +> not counting tags and other typed links?". A typed link is +> still a link, in my mind at least. --s + +>> Me neither, let's not worry about it. --[[Joey]] + +I suspect we could get away without having `tagged_is_strict` +without too much transitional trouble. --[[Joey]] + +> If you think so, I can delete about 5 LoC. I don't particularly +> care either way; [[Jon]] expressed concern about people relying +> on the current semantics, on one of the pages requesting this +> change. --s + +>> Removed in a newer version of the branch. --s + +I might have been wrong to introduce `typedlink(tag foo)`. It's not +very user-friendly, and is more useful as a backend for other plugins +that as a feature in its own right - any plugin introducing a link +type will probably also want to have its own preprocessor directive +to set that link type, and its own pagespec function to match it. +I wonder whether to make a `typedlink` plugin that has the typedlink +pagespec match function and a new `\[[!typedlink to="foo" type="bar"]]` +though... --[[smcv]] + +> I agree, per-type matchers are more friendly and I'm not enamored of the +> multi-parameter pagespec syntax. --[[Joey]] + +>> Removed in a newer version of the branch. I re-introduced it as a +>> plugin in `smcv/typedlink`, but I don't think we really need it. --s + +---- + +I am ready to merge this, but I noticed one problem -- since `match_tagged` +now only matches pages with the tag linktype, a wiki will need to be +rebuilt on upgrade in order to get the linktype of existing tags in it +recorded. So there needs to be a NEWS item about this and +the postinst modified to force the rebuild. + +> Done, although you'll need to plug in an appropriate version number when +> you release it. Is there a distinctive reminder string you grep for +> during releases? I've used `UNRELEASED` for now. --[[smcv]] + +Also, the ready branch adds `typedlink()` to [[ikiwiki/pagespec]], +but you removed that feature as documented above. +--[[Joey]] + +> [[Done]]. --s diff --git a/doc/todo/more_flexible_inline_postform.mdwn b/doc/todo/more_flexible_inline_postform.mdwn index bc8bc0809..414476bd7 100644 --- a/doc/todo/more_flexible_inline_postform.mdwn +++ b/doc/todo/more_flexible_inline_postform.mdwn @@ -16,3 +16,8 @@ logical first step towards doing comment-like things with inlined pages). > Perhaps what we need is a `postform` plugin/directive that inline depends > on (automatically enables); its preprocess method could automatically be > invoked from preprocess_inline when needed. --[[smcv]] + +>> I've been looking at this stuff again. I think you are right, this would +>> be the right approach. The comments plugin could use it similarly, allowing +>> sites which desire it to have an inline comment submission form on all +>> pages with comments enabled. I'm going to take a look. -- [[Jon]] diff --git a/doc/todo/optional_underlaydir_prefix.mdwn b/doc/todo/optional_underlaydir_prefix.mdwn new file mode 100644 index 000000000..06900a904 --- /dev/null +++ b/doc/todo/optional_underlaydir_prefix.mdwn @@ -0,0 +1,46 @@ +For security reasons, symlinks are disabled in IkiWiki. That's fair enough, but that means that some problems, which one could otherwise solve by using a symlink, cannot be solved. The specfic problem in this case is that all underlays are placed at the root of the wiki, when it could be more convenient to place some underlays in specific sub-directories. + +Use-case 1 (to keep things tidy): + +Currently IkiWiki has some javascript files in `underlays/javascript`; that directory is given as one of the underlay directories. Thus, all the javascript files appear in the root of the generated site. But it would be tidier if one could say "put the contents of *this* underlaydir under the `js` directory". + +> Of course, this could be accomplished, if we wanted to, by moving the +> files to `underlays/javascript/js`. --[[Joey]] + +Use-case 2 (a read-only external dir): + +Suppose I want to include a subset of `/usr/local/share/docs` on my wiki, say the docs about `foo`. But I want them to be under the `docs/foo` sub-directory on the generated site. Currently I can't do that. If I give `/usr/local/share/docs/foo` as an underlaydir, then the contents of that will be in the root of the site, rather than under `docs/foo`. And if I give `/usr/local/share/docs` as an underlaydir, then the contents of the `foo` dir will be under `foo`, but it will also include every other thing in `/usr/local/share/docs`. + +Since we can't use symlinks in an underlay dir to link to these directories, then perhaps one could give a specific underlay dir a specific prefix, which defines the sub-directory that the underlay should appear in. + +I'm not sure how this would be implemented, but I guess it could be configured something like this: + + prefixed_underlay => { + 'js' => '/usr/local/share/ikiwiki/javascript', + 'docs/foo' => '/usr/local/share/docs/foo', + } + +> So, let me review why symlinks are an issue. For normal, non-underlay +> pages, users who do not have filesystem access to the server may have +> commit access, and so could commit eg, a symlink to `/etc/passwd` (or +> to `/` !). The guards are there to prevent ikiwiki either exposing the +> symlink target's contents, or potentially overwriting it. +> +> Is this a concern for underlays? Most of the time, certianly not; +> the underlay tends to be something only the site admin controls. +> Not all the security checks that are done on the srcdir are done +> on the underlays, either. Most checks done on files in the underlay +> are only done because the same code handles srcdir files. The one +> exception is the test that skips processing symlinks in the underlay dir. +> (But note that the underlay directory can be a symlinkt to elsewhere +> which the srcdir, by default, cannot.) +> +> So, one way to approach this is to make ikiwiki follow directory symlinks +> inside the underlay directory. Just a matter of passing `follow => 1` to +> find. (This would still not allow individual files to be symlinks, because +> `readfile` does not allow reading symlinks. But I don't see much need +> for that.) --[[Joey]] + +>> If you think that enabling symlinks in underlay directories wouldn't be a security issue, then I'm all for it! That would be much simpler to implement, I'm sure. --[[KathrynAndersen]] + +[[!taglink wishlist]] diff --git a/doc/todo/rewrite_ikiwiki_in_haskell.mdwn b/doc/todo/rewrite_ikiwiki_in_haskell.mdwn index 204c48cd7..48ed744b1 100644 --- a/doc/todo/rewrite_ikiwiki_in_haskell.mdwn +++ b/doc/todo/rewrite_ikiwiki_in_haskell.mdwn @@ -29,6 +29,7 @@ It's appealing for a lot of reasons, including: edit in html editors currently. - This would be a chance to make WikiLinks with link texts read "the right way round" (ie, vaguely wiki creole compatably). + *[See also [[todo/link_plugin_perhaps_too_general?]] --[[smcv]]]* - The data structures would probably be quite different. - I might want to drop a lot of the command-line flags, either requiring a setup file be used for those things, or leaving the diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn new file mode 100644 index 000000000..901e143a7 --- /dev/null +++ b/doc/todo/smarter_sorting.mdwn @@ -0,0 +1,141 @@ +I benchmarked a build of a large wiki (my home wiki), and it was spending +quite a lot of time sorting; `CORE::sort` was called only 1138 times, but +still flagged as the #1 time sink. (I'm not sure I trust NYTProf fully +about that FWIW, since it also said 27238263 calls to `cmp_age` were +the #3 timesink, and I suspect it may not entirely accurately measure +the overhead of so many short function calls.) + +`pagespec_match_list` currently always sorts *all* pages first, and then +finds the top M that match the pagespec. That's innefficient when M is +small (as for example in a typical blog, where only 20 posts are shown, +out of maybe thousands). + +As [[smcv]] noted, It could be flipped, so the pagespec is applied first, +and then sort the smaller matching set. But, checking pagespecs is likely +more expensive than sorting. (Also, influence calculation complicates +doing that.) + +Another option, when there is a limit on M pages to return, might be to +cull the M top pages without sorting the rest. + +> The patch below implements this. +> +> But, I have not thought enough about influence calculation. +> I need to figure out which pagespec matches influences need to be +> accumulated for in order to determine all possible influences of a +> pagespec are known. +> +> The old code accumulates influences from matching all successful pages +> up to the num cutoff, as well as influences from an arbitrary (sometimes +> zero) number of failed matches. New code does not accumulate influences +> from all the top successful matches, only an arbitrary group of +> successes and some failures. +> +> Also, by the time I finished this, it was not measuarably faster than +> the old method. At least not with a few thousand pages; it +> might be worth revisiting this sometime for many more pages? [[done]] +> --[[Joey]] + +<pre> +diff --git a/IkiWiki.pm b/IkiWiki.pm +index 1730e47..bc8b23d 100644 +--- a/IkiWiki.pm ++++ b/IkiWiki.pm +@@ -2122,36 +2122,54 @@ sub pagespec_match_list ($$;@) { + my $num=$params{num}; + delete @params{qw{num deptype reverse sort filter list}}; + +- # when only the top matches will be returned, it's efficient to +- # sort before matching to pagespec, +- if (defined $num && defined $sort) { +- @candidates=IkiWiki::SortSpec::sort_pages( +- $sort, @candidates); +- } +- ++ # Find the first num matches (or all), before sorting. + my @matches; +- my $firstfail; + my $count=0; + my $accum=IkiWiki::SuccessReason->new(); +- foreach my $p (@candidates) { +- my $r=$sub->($p, %params, location => $page); ++ my $i; ++ for ($i=0; $i < @candidates; $i++) { ++ my $r=$sub->($candidates[$i], %params, location => $page); + error(sprintf(gettext("cannot match pages: %s"), $r)) + if $r->isa("IkiWiki::ErrorReason"); + $accum |= $r; + if ($r) { +- push @matches, $p; ++ push @matches, $candidates[$i]; + last if defined $num && ++$count == $num; + } + } + ++ # We have num natches, but they may not be the best. ++ # Efficiently find and add the rest, without sorting the full list of ++ # candidates. ++ if (defined $num && defined $sort) { ++ @matches=IkiWiki::SortSpec::sort_pages($sort, @matches); ++ ++ for ($i++; $i < @candidates; $i++) { ++ # Comparing candidate with lowest match is cheaper, ++ # so it's done before testing against pagespec. ++ if (IkiWiki::SortSpec::cmptwo($candidates[$i], $matches[-1], $sort) < 0 && ++ $sub->($candidates[$i], %params, location => $page) ++ ) { ++ # this could be done less expensively ++ # using a binary search ++ for (my $j=0; $j < @matches; $j++) { ++ if (IkiWiki::SortSpec::cmptwo($candidates[$i], $matches[$j], $sort) < 0) { ++ splice @matches, $j, $#matches-$j+1, $candidates[$i], ++ @matches[$j..$#matches-1]; ++ last; ++ } ++ } ++ } ++ } ++ } ++ + # Add simple dependencies for accumulated influences. +- my $i=$accum->influences; +- foreach my $k (keys %$i) { +- $depends_simple{$page}{lc $k} |= $i->{$k}; ++ my $inf=$accum->influences; ++ foreach my $k (keys %$inf) { ++ $depends_simple{$page}{lc $k} |= $inf->{$k}; + } + +- # when all matches will be returned, it's efficient to +- # sort after matching ++ # Sort if we didn't already. + if (! defined $num && defined $sort) { + return IkiWiki::SortSpec::sort_pages( + $sort, @matches); +@@ -2455,6 +2473,12 @@ sub sort_pages { + sort $f @_ + } + ++sub cmptwo { ++ $a=$_[0]; ++ $b=$_[1]; ++ $_[2]->(); ++} ++ + sub cmp_title { + IkiWiki::pagetitle(IkiWiki::basename($a)) + cmp +</pre> + +This would be bad when M is very large, and particularly, of course, when +there is no limit and all pages are being matched on. (For example, an +archive page shows all pages that match a pagespec specifying a creation +date range.) Well, in this case, it *does* make sense to flip it, limit by +pagespe first, and do a (quick)sort second. (No influence complications, +either.) + +> Flipping when there's no limit implemented, and it knocked 1/3 off +> the rebuild time of my blog's archive pages. --[[Joey]] + +Adding these special cases will be more complicated, but I think the best +of both worlds. --[[Joey]] diff --git a/doc/todo/structured_page_data.mdwn b/doc/todo/structured_page_data.mdwn index da9da9663..9f21fab7f 100644 --- a/doc/todo/structured_page_data.mdwn +++ b/doc/todo/structured_page_data.mdwn @@ -253,6 +253,9 @@ in a large number of other cases. > dependencies between bugs from arbitrary links. >> This issue (the need for distinguished kinds of links) has also been brought up in other discussions: [[tracking_bugs_with_dependencies#another_kind_of_links]] (deps vs. links) and [[tag_pagespec_function]] (tags vs. links). --Ivan Z. +>>> And multiple link types are now supported; plugins can set the link +>>> type when registering a link, and pagespec functions can match on them. --[[Joey]] + ---- #!/usr/bin/perl diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn index 5f3ece290..456dadad0 100644 --- a/doc/todo/tracking_bugs_with_dependencies.mdwn +++ b/doc/todo/tracking_bugs_with_dependencies.mdwn @@ -81,6 +81,9 @@ I like the idea of [[tips/integrated_issue_tracking_with_ikiwiki]], and I do so >> I saw that this issue is targeted at by the work on [[structured page data#another_kind_of_links]]. --Ivan Z. +>>> It's fixed now; links can have a type, such as "tag", or "dependency", +>>> and pagespecs can match links of a given typo. --[[Joey]] + Okie - I've had a quick attempt at this. Initial patch attached. This one doesn't quite work. And there is still a lot of debugging stuff in there. diff --git a/doc/todo/user-defined_templates_outside_the_wiki.mdwn b/doc/todo/user-defined_templates_outside_the_wiki.mdwn new file mode 100644 index 000000000..1d72aa6a7 --- /dev/null +++ b/doc/todo/user-defined_templates_outside_the_wiki.mdwn @@ -0,0 +1,10 @@ +[[!tag wishlist]] + +The [[plugins/contrib/ftemplate]] plugin looks for templates inside the wiki +source, but also looks in the system templates directory (the one with +`page.tmpl`). This means the wiki admin can provide templates that can be +invoked via `\[[!template]]`, but don't have to "work" as wiki pages in their +own right. I think the normal [[plugins/template]] plugin could benefit from +this functionality. + +[[done]] --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index f735170f0..db1e36a10 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -331,9 +331,13 @@ also be configured using a setup file. * --set var=value This allows setting an arbitrary configuration variable, the same as if it - were set via a setup file. Since most options can be configured - using command-line switches, you will rarely need to use this, but it can be - useful for the odd option that lacks a command-line switch. + were set via a setup file. Since most options commonly used options can be + configured using command-line switches, you will rarely need to use this. + +* --set-yaml var=value + + This is like --set, but it allows setting configuration variables that + use complex data structures, by passing in a YAML document. # EXAMPLES diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn index 16cb390c4..8e827b0da 100644 --- a/doc/users/KathrynAndersen.mdwn +++ b/doc/users/KathrynAndersen.mdwn @@ -1,8 +1,8 @@ * aka [[rubykat]] -* Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). * <http://kerravonsen.dreamwidth.org> -* <http://www.katspace.org> +* <http://www.katspace.org> (uses IkiWiki!) * <http://github.com/rubykat> +* Also an active [PmWiki](http://www.pmwiki.org) user, interested in having the best of both worlds. Has written the following plugins: [[!map pages="!*/Discussion and ((link(users/KathrynAndersen) or link(users/rubykat)) and plugins/*) "]] diff --git a/doc/users/KathrynAndersen/discussion.mdwn b/doc/users/KathrynAndersen/discussion.mdwn new file mode 100644 index 000000000..4f2790c39 --- /dev/null +++ b/doc/users/KathrynAndersen/discussion.mdwn @@ -0,0 +1,20 @@ +Had a look at your site. Sprawling, individualistic, using ikiwiki in lots of +ways. Makes me happy. :) I see that I have let a lot of contrib plugins +pile up. I will try to get to these. I'm particularly interested in +your use of yaml+fields. Encourage you to go ahead with any others you +have not submitted here, like pmap. (Unless it makes more sense to submit +that as a patch to the existing map plugin.) --[[Joey]] + +> Thanks. I would have put more up, but I didn't want to until they were properly documented, and other things have taken a higher priority. + +> I think pmap is probably better as a separate plugin, because it has additional dependencies (HTML::LinkList) which people might not want to have to install. + +>> One approach commonly used in ikiwiki is to make such optional features +>> be enabled by a switch somewhere, and 'eval q{use Foo}` so the module +>> does not have to be loaded unless the feature is used. --[[Joey]] + +>>> Unfortunately, HTML::LinkList isn't an optional feature for pmap; that's what it uses to create the HTML for the map. --[[KathrynAndersen]] + +> The "includepage" plugin I'm not sure whether it is worth releasing or not; it's basically a cut-down version of "inline", because the inline plugin is so complicated and has so many options, I felt more at ease to have something simpler. + +> --[[KathrynAndersen]] diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn index 41bf9b09a..4123e0fc6 100644 --- a/doc/users/ivan_shmakov.mdwn +++ b/doc/users/ivan_shmakov.mdwn @@ -1,3 +1,50 @@ … To put it short: an Ikiwiki newbie. -I run an Ikiwiki instance at <http://gray.am-1.org/~ivan/lhc/> (though the DNS servers seem to be temporarily out of smoke as of 2010-03-12Z.) +[Emacs]: http://www.gnu.org/software/emacs/ +[Lynx]: http://lynx.isc.org/ + +## Wikis + +Currently, I run a couple of Ikiwiki instances. Namely: + +* <http://lhc.am-1.org/lhc/> + — to hold random stuff written by me, my colleagues, + students, etc. + +* <http://rsdesne.am-1.org/rsdesne-2010/> + — for some of the materials related to the + “Remote Sensing in Education, Science and National + Economy” (2010-03-29 … 2010-04-10, Altai State + University) program I've recently participated in as + an instructor. + +## Preferences + +I prefer to use [Lynx][] along with [Emacs][] (via +`emacsclient`) to work with the wikis. (Note the “Local +variables” section below.) + +The things I dislike in the wiki engines are: + +* the use of home-brew specialized version control systems + — while there're a lot of much more developed general + purpose ones; + +* oversimplified syntax + — which (to some extent) precludes more sophisticated + forms of automated processing; in particular, this forces one + to reformat the material, once complete, to, say, prepare a + book, or an article, or slides. + +Out of all the wiki engines I'm familiar with, only Ikiwiki is +free of the first of these. I hope that it will support more +elaborate syntaxes eventually. + +---- + + Local variables: + mode: markdown + coding: utf-8 + fill-column: 64 + ispell-dictionary: "american" + End: diff --git a/doc/users/schmonz.mdwn b/doc/users/schmonz.mdwn index 7ebd8311c..03c52b6aa 100644 --- a/doc/users/schmonz.mdwn +++ b/doc/users/schmonz.mdwn @@ -1,3 +1,3 @@ -[Amitai Schlair](http://www.columbia.edu/~ays2105/) recently discovered ikiwiki and finds himself using it for all sorts of things. His attempts at contributing: +[Amitai Schlair](http://www.netbsd.org/~schmonz/) recently discovered ikiwiki and finds himself using it for all sorts of things. His attempts at contributing: [[!map pages="!*/Discussion and ((link(users/schmonz) and plugins/*) or rcs/cvs)"]] diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn index 6c0480cea..6e5a7261d 100644 --- a/doc/wikitemplates.mdwn +++ b/doc/wikitemplates.mdwn @@ -5,7 +5,8 @@ to learn. The aim is to keep almost all html out of ikiwiki and in the templates. It ships with some basic templates which can be customised. These are -located in /usr/share/ikiwiki/templates by default. +located in `/usr/share/ikiwiki/templates` by default; the `templatedir` +setting can be used to make another directory be searched first. * `page.tmpl` - Used for displaying all regular wiki pages. * `misc.tmpl` - Generic template used for any page that doesn't @@ -43,7 +44,8 @@ The [[plugins/pagetemplate]] plugin can allow individual pages to use a different template than `page.tmpl`. The [[plugins/template]] plugin also uses templates, though those -[[templates]] are stored in the wiki and inserted into pages. +[[templates]] are typically stored as pages in the wiki, and are inserted +into pages. The [[plugins/edittemplate]] plugin is used to make new pages default to containing text from a template, which can be filled as out the page is diff --git a/docwiki.setup b/docwiki.setup index 86f012c50..8278b73ea 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -16,5 +16,5 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, - add_plugins => [qw{goodstuff version haiku polygen fortune}], + add_plugins => [qw{goodstuff version haiku polygen fortune table}], } diff --git a/ikiwiki-calendar b/ikiwiki-calendar.in similarity index 83% rename from ikiwiki-calendar rename to ikiwiki-calendar.in index a9548d6ec..cdfecff3f 100755 --- a/ikiwiki-calendar +++ b/ikiwiki-calendar.in @@ -1,6 +1,7 @@ #!/usr/bin/perl use warnings; use strict; +use lib '.'; # For use in nonstandard directory, munged by Makefile. use IkiWiki; use IkiWiki::Setup; use Getopt::Long; @@ -14,7 +15,7 @@ GetOptions( "force" => \$force, ) || usage(); my $setup=shift || usage(); -my $pagespec=shift || "*"; +my $pagespec=shift; my $startyear=shift || 1900+(localtime(time))[5]; my $endyear=shift || $startyear; @@ -26,6 +27,10 @@ IkiWiki::checkconfig(); my $archivebase = 'archives'; $archivebase = $config{archivebase} if defined $config{archivebase}; +if (! defined $pagespec) { + $pagespec=$config{archive_pagespec} || "*"; +} + sub writearchive ($$;$) { my $template=template(shift); my $year=shift; @@ -54,4 +59,5 @@ foreach my $y ($startyear..$endyear) { IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) if $config{rcs}; -system("ikiwiki", "-setup", $setup, "-refresh"); +exec("ikiwiki", "-setup", $setup, "-refresh"); +die "failed to run ikiwiki -setup $setup -refresh\n"; diff --git a/ikiwiki-transition b/ikiwiki-transition.in similarity index 99% rename from ikiwiki-transition rename to ikiwiki-transition.in index 1bebb1176..e3be645cc 100755 --- a/ikiwiki-transition +++ b/ikiwiki-transition.in @@ -1,6 +1,7 @@ #!/usr/bin/perl use warnings; use strict; +use lib '.'; # For use in nonstandard directory, munged by Makefile. use IkiWiki; use HTML::Entities; diff --git a/ikiwiki.in b/ikiwiki.in index da5555629..38e4d3201 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -96,6 +96,17 @@ sub getconfig () { } $config{$var}=$val; }, + "set-yaml=s" => sub { + my ($var, $val)=split('=', $_[1], 2); + if (! defined $var || ! defined $val) { + die gettext("usage: --set-yaml var=value"), "\n"; + } + eval q{use YAML::Any}; + eval q{use YAML} if $@; + die $@ if $@; + eval q{$YAML::Syck::ImplicitUnicode=1}; + $config{$var}=Load($val."\n"); + }, "version" => sub { print "ikiwiki version $IkiWiki::version\n"; exit; diff --git a/ikiwiki.spec b/ikiwiki.spec index 2bb87724d..fb7971b27 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20100312 +Version: 3.20100403 Release: 1%{?dist} Summary: A wiki compiler diff --git a/po/bg.po b/po/bg.po index 0e2108597..5585a10d6 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-bg\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov <dam@modsodtsys.com>\n" "Language-Team: Bulgarian <dict@fsa-bg.org>\n" @@ -55,7 +55,7 @@ msgstr "Предпочитанията са запазени." msgid "You are banned." msgstr "Достъпът ви е забранен." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Грешка" @@ -137,7 +137,7 @@ msgstr "създаване на нова страницa „%s”" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "готово" @@ -246,7 +246,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -517,7 +517,7 @@ msgstr "Огледала" msgid "Mirror" msgstr "Огледало" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "" @@ -893,12 +893,12 @@ msgstr "грешка при запис на файла „%s”: %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "" @@ -988,60 +988,60 @@ msgstr "грешка при запис на файла „%s”: %s" msgid "missing id parameter" msgstr "липсващ параметър „id” на шаблона" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 #, fuzzy msgid "failed to process:" msgstr "грешка при обработване на шаблона" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 #, fuzzy msgid "failed to generate image from code" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1110,25 +1110,35 @@ msgstr "ikiwiki: неуспех при обновяване на страниц #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "грешка при четене на „%s”: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "грешка при четене на „%s”: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "крешка при компилиране на файла %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1147,13 +1157,13 @@ msgid "wrapper filename not specified" msgstr "не е указан файл на обвивката" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "крешка при компилиране на файла %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "успешно генериране на %s" @@ -1166,19 +1176,23 @@ msgstr "формат: ikiwiki [опции] източник местоназна msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "генериране на обвивки..." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "обновяване на уики..." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "осъвременяване на уики..." @@ -1186,40 +1200,40 @@ msgstr "осъвременяване на уики..." msgid "Discussion" msgstr "Дискусия" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "При използване на пареметъра „--cgi” е необходимо да се укаже и " "местоположението на уикито чрез параметъра „--url”" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "грешка при четене на „%s”: %s" diff --git a/po/cs.po b/po/cs.po index 09d411e98..0b45bb97a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2009-09-11 20:23+0200\n" "Last-Translator: Miroslav Kure <kurem@debian.cz>\n" "Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n" @@ -55,7 +55,7 @@ msgstr "Nastavení uloženo." msgid "You are banned." msgstr "Jste vyhoÅ¡těni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Chyba" @@ -136,7 +136,7 @@ msgstr "vytvářím novou stránku %s" msgid "deleting bucket.." msgstr "mažu bucket..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "hotovo" @@ -244,7 +244,7 @@ msgstr "Přidán komentář" msgid "Added a comment: %s" msgstr "Přidán komentář: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "nejste přihlášeni jako správce" @@ -498,7 +498,7 @@ msgstr "Zrcadla" msgid "Mirror" msgstr "Zrcadlo" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 #, fuzzy msgid "comment needs moderation" msgstr "schvalování komentářů" @@ -877,12 +877,12 @@ msgstr "nepodařilo se přečíst %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "pro indexování %s je potřeba Digest::SHA1" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "hledání" @@ -964,52 +964,52 @@ msgstr "zpracovávání selhalo na řádku %d: %s" msgid "missing id parameter" msgstr "chybí parametr id" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "Å¡ablona %s nebyla nalezena" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "nepodařilo se zpracovat:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "chybí TeXový kód" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "z kódu se nepodařilo vygenerovat obrázek" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, fuzzy, perl-format msgid "%s plugin:" msgstr "modul" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, fuzzy, perl-format msgid "%s plugins" msgstr "moduly" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "povolit %s?" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "konfigurační soubor této wiki je neznámý" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "hlavní" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "Níže uvedené změny v konfiguraci se projeví až po znovusestavení wiki." -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." @@ -1017,7 +1017,7 @@ msgstr "" "Aby se níže uvedené změny v konfiguraci zcela projevily, budete možná muset " "znovusestavit wiki." -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1090,25 +1090,35 @@ msgstr "ikiwiki: nelze sestavit %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "nemohu číst %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "nemohu číst %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "nepodařilo se aktualizovat %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "musíte zadat název wiki (který obsahuje alfanumerické znaky)" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "nepodporovaný systém pro správu verzí: %s" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "nepodařilo se nastavit repositář pomocí ikiwiki-makerepo" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "** Deaktivuji modul %s, protože selhává s touto hláškou:" @@ -1127,13 +1137,13 @@ msgid "wrapper filename not specified" msgstr "jméno souboru s obalem nebylo zadáno" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "nelze zkompilovat %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "%s byl úspěšně vytvořen" @@ -1146,19 +1156,24 @@ msgstr "použití: ikiwiki [volby] zdroj cíl" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup konfigurační.soubor" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +#, fuzzy +msgid "usage: --set-yaml var=value" +msgstr "použití: --set proměnná=hodnota" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "generuji obaly..." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "znovusestavuji wiki..." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "obnovuji wiki..." @@ -1166,38 +1181,38 @@ msgstr "obnovuji wiki..." msgid "Discussion" msgstr "Diskuse" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Při použití --cgi musíte pomocí --url zadat url k wiki" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "nelze použít několik rcs modulů" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "nepodařilo se nahrát externí modul vyžadovaný modulem %s: %s" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Byla rozpoznána smyčka na %s v hloubce %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "ano" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "nelze vybrat stránky: %s" diff --git a/po/da.po b/po/da.po index 13d1dca59..be7a95e6a 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2009-07-23 01:07+0200\n" "Last-Translator: Jonas Smedegaard <dr@jones.dk>\n" "Language-Team: None\n" @@ -59,7 +59,7 @@ msgstr "Indstillinger gemt" msgid "You are banned." msgstr "Du er banlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Fejl" @@ -140,7 +140,7 @@ msgstr "opretter ny side %s" msgid "deleting bucket.." msgstr "sletter bundt.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "færdig" @@ -251,7 +251,7 @@ msgstr "Tilføjede en kommentar" msgid "Added a comment: %s" msgstr "Tilføjede en kommentar: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "du er ikke logget pÃ¥ som en administrator" @@ -511,7 +511,7 @@ msgstr "Spejle" msgid "Mirror" msgstr "Spejl" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 #, fuzzy msgid "comment needs moderation" msgstr "kommentarkoderering" @@ -892,12 +892,12 @@ msgstr "læsning af %s mislykkedes" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "behøver Digest::SHA1 til indeks %s" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "søg" @@ -979,54 +979,54 @@ msgstr "afkodningsfejl pÃ¥ linje %d: %s" msgid "missing id parameter" msgstr "manglende id-parameter" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "skabelon %s ikke fundet" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "dannelsen mislykkedes:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "manglende tex-kode" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "billedopbygning fra kode mislykkedes" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, fuzzy, perl-format msgid "%s plugin:" msgstr "udvidelse" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, fuzzy, perl-format msgid "%s plugins" msgstr "udvidelser" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "aktivér %s?" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "opsætningsfilen for denne wiki er ukendt" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "primær" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" "Opsætningsændringerne vist nedenfor kræver wiki-genopbygning for at træde i " "kraft." -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." @@ -1034,7 +1034,7 @@ msgstr "" "For at opsætningsændringerne vist nedenfor træder fuldt ud i kraft, skal du " "muligvis genopbygge wikien." -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "Fejl: %s returnerede ikke-nul (%s). Dropper opsætningsændringer." @@ -1105,25 +1105,35 @@ msgstr "ikiwiki: kan ikke danne %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "kan ikke læse %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "kan ikke læse %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "opdatering af %s mislykkedes" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "du skal angive et wikinavn (som indeholder alfanumeriske tegn)" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "revisionskontrolsystem %s ikke understøttet" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "opsætning af depotet med ikiwiki-makerepo mislykkedes" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "** Deaktiverer udvidelse %s, da den fejler med denne besked:" @@ -1142,13 +1152,13 @@ msgid "wrapper filename not specified" msgstr "wrapper-navn ikke angivet" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "kompilering af %s mislykkedes" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "Korrekt bygget %s" @@ -1161,19 +1171,24 @@ msgstr "brug: ikiwiki [valg] kilde mÃ¥l" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup opsætningsfil" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +#, fuzzy +msgid "usage: --set-yaml var=value" +msgstr "brug: --set var=værdi" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "bygger wrappers.." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "genopbygger wiki..." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "genopfrisker wiki..." @@ -1181,39 +1196,39 @@ msgstr "genopfrisker wiki..." msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Skal angive url til wiki med --url nÃ¥r der bruges --cgi" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "kan ikke bruge flere samtidige RCS-udvidelser" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" "indlæsning af ekstern udvidelse krævet af udvidelsen %s mislykkedes: %s" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "forudberegningssløkke fundet pÃ¥ %s ved dybde %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally krævet for title_natural sortering" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "kan ikke fÃ¥ sider til at passe sammen: %s" diff --git a/po/de.po b/po/de.po index f69b98603..e5a18d47b 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2010-03-14 16:09+0530\n" "Last-Translator: Sebastian Kuhnert <mail@sebastian-kuhnert.de>\n" "Language-Team: German <debian-l10n-german@lists.debian.org>\n" @@ -56,7 +56,7 @@ msgstr "Einstellungen gespeichert." msgid "You are banned." msgstr "Sie sind ausgeschlossen worden." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Fehler" @@ -137,7 +137,7 @@ msgstr "erstelle neue Seite %s" msgid "deleting bucket.." msgstr "lösche Behälter (bucket)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "fertig" @@ -247,7 +247,7 @@ msgstr "Kommentar hinzugefügt" msgid "Added a comment: %s" msgstr "Kommentar hinzugefügt: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Sie sind nicht als Administrator angemeldet" @@ -507,7 +507,7 @@ msgstr "Spiegel" msgid "Mirror" msgstr "Spiegel" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "Kommentar muss moderiert werden" @@ -891,12 +891,12 @@ msgstr "konnte das rsync_command nicht ausführen: %s" msgid "rsync_command exited %d" msgstr "rsync_command gibt Fehler %d zurück" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "benötige Digest::SHA1 um einen Index von %s zu erstellen" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "suchen" @@ -978,54 +978,54 @@ msgstr "Auswertungsfehler in Zeile %d: %s" msgid "missing id parameter" msgstr "fehlender Parameter id" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "Vorlage %s nicht gefunden" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "Fehler beim Ablauf:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "fehlender TeX-Code" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "konnte kein Bild aus dem Code erzeugen" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "%s-Erweiterung:" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, fuzzy, perl-format msgid "%s plugins" msgstr "%s-Erweiterungen" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "%s aktivieren?" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "Die Einrichtungsdatei für dieses Wiki ist unbekannt" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "Hauptseite" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" "Die unten aufgeführten Konfigurationsänderungen erfordern ein Neubau des " "Wikis, um wirksam zu werden." -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." @@ -1033,7 +1033,7 @@ msgstr "" "Damit die unten aufgeführten Konfigurationsänderungen insgesamt wirksam " "werden, kann es notwendig sein, das Wikis neu zu bauen." -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1107,26 +1107,36 @@ msgstr "ikiwiki: kann %s nicht erzeugen" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "kann %s nicht lesen: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "kann %s nicht lesen: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "aktualisieren von %s fehlgeschlagen" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" "Sie müssen einen Wiki-Namen eingeben (der alphanumerische Zeichen enthält)" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "nicht unterstütztes Versionskontrollsystem %s" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "erstellen des Depots mit ikiwiki-makerepo ist fehlgeschlagen" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1147,13 +1157,13 @@ msgid "wrapper filename not specified" msgstr "Dateiname des Wrappers nicht angegeben" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "erzeugen von %s fehlgeschlagen" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "%s wurde erfolgreich erstellt" @@ -1166,19 +1176,24 @@ msgstr "Aufruf: ikiwiki [Optionen] Quelle Ziel" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup Konfigurationsdatei" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +#, fuzzy +msgid "usage: --set-yaml var=value" +msgstr "Aufruf: --set Variable=Wert" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "erzeuge Wrapper.." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "erzeuge Wiki neu.." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "aktualisiere Wiki.." @@ -1186,41 +1201,41 @@ msgstr "aktualisiere Wiki.." msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es muss eine URL zum Wiki mit --url angegeben werden, wenn --cgi verwandt " "wird" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" "Es können nicht mehrere Versionskontrollsystem-Erweiterungen verwandt werden" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Laden der für %s benötigten externen Erweiterung fehlgeschlagen: %s" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Präprozessorschleife auf %s in Tiefe %i erkannt" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally wird benötigt für title_natural sort" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "Kann die Seiten nicht zuordnen: %s" diff --git a/po/es.po b/po/es.po index 465e9c1a1..413572866 100644 --- a/po/es.po +++ b/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2009-06-14 12:32+0200\n" "Last-Translator: Victor Moral <victor@taquiones.net>\n" "Language-Team: <en@li.org>\n" @@ -60,7 +60,7 @@ msgstr "Las preferencias se han guardado." msgid "You are banned." msgstr "Ha sido expulsado." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Error" @@ -142,7 +142,7 @@ msgstr "creando nueva página %s" msgid "deleting bucket.." msgstr "borrando el directorio.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "completado" @@ -253,7 +253,7 @@ msgstr "Añadir un comentario" msgid "Added a comment: %s" msgstr "Comentario añadido: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "No está registrado como un administrador" @@ -515,7 +515,7 @@ msgstr "Réplicas" msgid "Mirror" msgstr "Réplica" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 #, fuzzy msgid "comment needs moderation" msgstr "aprobación de comentarios" @@ -892,12 +892,12 @@ msgstr "no puedo leer de %s: %s " msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "se necesita la instalación de Digest::SHA1 para indexar %s" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "buscar" @@ -983,54 +983,54 @@ msgstr "error de análisis en la línea %d: %s" msgid "missing id parameter" msgstr "falta el parámetro \"id\"" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "no he encontrado la plantilla %s" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "se ha producido un error fatal mientras procesaba la plantilla:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "falta el código tex" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "no he podido crear la imagen desde el código" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, fuzzy, perl-format msgid "%s plugin:" msgstr "complemento" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, fuzzy, perl-format msgid "%s plugins" msgstr "complementos" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "¿ activar %s ?" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "El archivo de configuración para este wiki es desconocido" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "principal" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" "Los cambios en la configuración que se muestran más abajo precisan una " "reconstrucción del wiki para tener efecto." -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." @@ -1038,7 +1038,7 @@ msgstr "" "Para que los cambios en la configuración mostrados más abajo tengan efecto, " "es posible que necesite reconstruir el wiki." -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1113,25 +1113,35 @@ msgstr "ikiwiki: no puedo convertir la página %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "no puedo leer el archivo %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "no puedo leer el archivo %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "ha fallado la compilación del programa %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "debe escribir un nombre wiki (que contiene caracteres alfanuméricos)" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "el sistema de control de versiones %s no está soportado" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "no he podido crear un repositorio con el programa ikiwiki-makerepo" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1152,13 +1162,13 @@ msgid "wrapper filename not specified" msgstr "el programa envoltorio no ha sido especificado" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "ha fallado la compilación del programa %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "creado con éxito el programa envoltorio %s" @@ -1171,19 +1181,24 @@ msgstr "uso: ikiwiki [opciones] origen destino" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup archivo_de_configuración" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +#, fuzzy +msgid "usage: --set-yaml var=value" +msgstr "uso: --set variable=valor" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "generando programas auxiliares.." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "reconstruyendo el wiki.." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "actualizando el wiki.." @@ -1191,44 +1206,44 @@ msgstr "actualizando el wiki.." msgid "Discussion" msgstr "Comentarios" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es obligatorio especificar un url al wiki con el parámetro --url si se " "utiliza el parámetro --cgi" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "no puedo emplear varios complementos rcs" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "no he podido cargar el complemento externo %s necesario para %s" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" "se ha detectado en la página %s un bucle de preprocesado en la iteración " "número %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "si" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" "Se necesita el módulo Sort::Naturally para el tipo de ordenación " "title_natural" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "no encuentro páginas coincidentes: %s" diff --git a/po/fr.po b/po/fr.po index 723d3a036..6be9482ce 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.141\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2009-08-17 10:06+0200\n" "Last-Translator: Philippe Batailler <philippe.batailler@free.fr>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" @@ -57,7 +57,7 @@ msgstr "Les préférences ont été enregistrées." msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Erreur" @@ -138,7 +138,7 @@ msgstr "Création de la nouvelle page %s" msgid "deleting bucket.." msgstr "Suppression du compartiment S3 (« bucket »)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "Terminé" @@ -246,7 +246,7 @@ msgstr "Commentaire ajouté" msgid "Added a comment: %s" msgstr "Commentaire ajouté : %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Vous n'êtes pas authentifié comme administrateur" @@ -506,7 +506,7 @@ msgstr "Miroirs" msgid "Mirror" msgstr "Miroir" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 #, fuzzy msgid "comment needs moderation" msgstr "modération du commentaire" @@ -896,12 +896,12 @@ msgstr "Impossible de lire %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "Digest::SHA1 est nécessaire pour indexer %s" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "recherche" @@ -983,54 +983,54 @@ msgstr "Erreur d'analyse à la ligne %d : %s" msgid "missing id parameter" msgstr "Paramètre d'identification manquant" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "Modèle de page %s introuvable" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "Échec du traitement :" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "Il manque le code TeX" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "Échec de la création de l'image à partir du code" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, fuzzy, perl-format msgid "%s plugin:" msgstr "greffon" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, fuzzy, perl-format msgid "%s plugins" msgstr "Greffons" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "activer %s ?" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "Le fichier de configuration de ce wiki n'est pas connu" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "Partie principale" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" "Les changements de configuration ci-dessous nécessitent une recompilation du " "wiki pour prendre effet" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." @@ -1038,7 +1038,7 @@ msgstr "" "Pour que les changements de configuration ci-dessous prennent effet vous " "devez recompiler le wiki" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "Erreur : %s s'est terminé anormalement (%s). Modifications ignorées." @@ -1110,27 +1110,37 @@ msgstr "ikiwiki : impossible de reconstruire %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "Lecture impossible de %s : %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "Lecture impossible de %s : %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "Impossible de mettre à jour %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" "Vous devez spécifier un nom de wiki (contenant des caractères " "alphanumériques)" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "Système de contrôle de version non reconnu : %s" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "Échec lors de la création du dépôt avec ikiwiki-makerepo" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1152,13 +1162,13 @@ msgid "wrapper filename not specified" msgstr "Le nom du fichier CGI n'a pas été indiqué" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "Échec de la compilation de %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "%s a été créé avec succès" @@ -1171,19 +1181,24 @@ msgstr "Syntaxe : ikiwiki [options] source destination" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup fichier de configuration" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +#, fuzzy +msgid "usage: --set-yaml var=value" +msgstr "Syntaxe : -- set var=valeur" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "Création des fichiers CGI..." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "Reconstruction du wiki..." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "Rafraîchissement du wiki..." @@ -1191,39 +1206,39 @@ msgstr "Rafraîchissement du wiki..." msgid "Discussion" msgstr "Discussion" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Vous devez indiquer l'URL du wiki par --url lors de l'utilisation de --cgi" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de prétraitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "oui" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "Impossible de trouver les pages %s" diff --git a/po/gu.po b/po/gu.po index f7725abb9..d4bfd42c0 100644 --- a/po/gu.po +++ b/po/gu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-gu\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n" "Language-Team: Gujarati <team@utkarsh.org>\n" @@ -54,7 +54,7 @@ msgstr "પ્રાથમિકતાઓ સંગ્રહાઇ." msgid "You are banned." msgstr "તમારા પર પ્રતિબંધ છે." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "ક્ષતિ" @@ -135,7 +135,7 @@ msgstr "નવું પાનું %s બનાવે છે" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "સંપૂર્ણ" @@ -244,7 +244,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -507,7 +507,7 @@ msgstr "મિરરો" msgid "Mirror" msgstr "મિરર" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "" @@ -883,12 +883,12 @@ msgstr "%s વાંચવામાં નિષ્ફળ: %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "" @@ -974,60 +974,60 @@ msgstr "ઉકેલવાનું લીટી %d પર નિષ્ફળ: % msgid "missing id parameter" msgstr "ખોવાયેલ આઇડી વિકલ્પ" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "ક્રિયા કરવામાં નિષ્ફળ:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy msgid "missing tex code" msgstr "ખોવાયેલ કિંમતો" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 #, fuzzy msgid "failed to generate image from code" msgstr "માપ બદલવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1096,25 +1096,35 @@ msgstr "ikiwiki: %s રેન્ડર કરી શકાતું નથી" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "વાંચી શકાતી નથી %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "વાંચી શકાતી નથી %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1133,13 +1143,13 @@ msgid "wrapper filename not specified" msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ નથી" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "સફળતાપૂર્વક પેદા કરેલ છે %s" @@ -1152,19 +1162,23 @@ msgstr "ઉપયોગ: ikiwiki [વિકલ્પો] source dest" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "આવરણ બનાવે છે.." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "વીકી ફરીથી બનાવે છે.." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "વીકીને તાજી કરે છે.." @@ -1172,38 +1186,38 @@ msgstr "વીકીને તાજી કરે છે.." msgid "Discussion" msgstr "ચર્ચા" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "વાંચી શકાતી નથી %s: %s" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index df3000feb..c2f4e24a9 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-12 15:02-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -55,7 +55,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "" @@ -136,7 +136,7 @@ msgstr "" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "" @@ -242,7 +242,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -951,12 +951,12 @@ msgstr "" msgid "missing id parameter" msgstr "" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "" @@ -968,41 +968,41 @@ msgstr "" msgid "failed to generate image from code" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1071,25 +1071,35 @@ msgstr "" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "" +#: ../IkiWiki/Setup.pm:34 +#, perl-format +msgid "cannot load %s in safe mode" +msgstr "" + +#: ../IkiWiki/Setup.pm:46 +#, perl-format +msgid "failed to parse %s" +msgstr "" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1108,13 +1118,13 @@ msgid "wrapper filename not specified" msgstr "" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "" @@ -1127,19 +1137,23 @@ msgstr "" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "" -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "" -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "" @@ -1147,38 +1161,38 @@ msgstr "" msgid "Discussion" msgstr "" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "" diff --git a/po/it.po b/po/it.po index d664c4d30..b1b3dbd55 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2009-08-16 11:01+0100\n" "Last-Translator: Luca Bruno <lucab@debian.org>\n" "Language-Team: Italian TP <tp@lists.linux.it>\n" @@ -53,7 +53,7 @@ msgstr "Preferenze salvate." msgid "You are banned." msgstr "Avete ricevuto un ban." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Errore" @@ -135,7 +135,7 @@ msgstr "creazione nuova pagina %s" msgid "deleting bucket.." msgstr "eliminazione contenitore..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "fatto" @@ -243,7 +243,7 @@ msgstr "Aggiunto commento" msgid "Added a comment: %s" msgstr "Aggiunto commento: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "non siete autenticati come amministratore" @@ -501,7 +501,7 @@ msgstr "Mirror" msgid "Mirror" msgstr "Mirror" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 #, fuzzy msgid "comment needs moderation" msgstr "moderazione commento" @@ -888,12 +888,12 @@ msgstr "impossibile leggere %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "è necessario Digest::SHA1 per l'indice di %s" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "cerca" @@ -975,54 +975,54 @@ msgstr "errore di interpretazione alla riga %d: %s" msgid "missing id parameter" msgstr "parametro id mancante" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "modello %s non trovato" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "errore nell'elaborazione:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "codice tex mancante" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "impossibile generare l'immagine dal codice" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, fuzzy, perl-format msgid "%s plugin:" msgstr "plugin" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, fuzzy, perl-format msgid "%s plugins" msgstr "plugin" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "abilitare %s?" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "il file di setup di questo wiki non è noto" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "principale" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" "Le sottostanti modifiche alla configurazione richiedono la ricompilazione " "del wiki." -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." @@ -1030,7 +1030,7 @@ msgstr "" "Affinché le sottostanti modifiche alla configurazione abbiano effetto, " "occorre ricostruire il wiki." -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "Errore: %s è terminato con errore (%s). Modifiche al setup scartate." @@ -1101,25 +1101,35 @@ msgstr "ikiwiki: impossibile compilare %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "impossibile leggere %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "impossibile leggere %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "impossibile aggiornare %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "occorre inserire un wikiname (contente caratteri alfanumerici)" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "sistema di controllo di revisione %s non supportato" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "impossibile creare un repository tramite ikiwiki-makerepo" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1139,13 +1149,13 @@ msgid "wrapper filename not specified" msgstr "nome del file del contenitore non specificato" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "errore nel compilare %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "%s generato con successo" @@ -1158,19 +1168,24 @@ msgstr "utilizzo: ikiwiki [opzioni] sorgente destinazione" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup configfile" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +#, fuzzy +msgid "usage: --set-yaml var=value" +msgstr "utilizzo: --set var=valore" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "generazione contenitori..." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "ricostruzione wiki..." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "aggiornamento wiki..." @@ -1178,38 +1193,38 @@ msgstr "aggiornamento wiki..." msgid "Discussion" msgstr "Discussione" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Occorre specificare l'url del wiki tramite --url quando si usa --cgi" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "impossibile usare più plugin rcs" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "impossibile caricare il plugin esterno per il plugin %s: %s" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "ciclo del preprocessore individuato su %s alla profondità %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "sì" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "impossibile trovare pagine corrispondenti: %s" diff --git a/po/pl.po b/po/pl.po index 77e1537f4..9fb3cacc0 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 1.51\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza <ptecza@net.icm.edu.pl>\n" "Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n" @@ -57,7 +57,7 @@ msgstr "Preferencje zapisane." msgid "You are banned." msgstr "Twój dostęp został zabroniony przez administratora." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Błąd" @@ -139,7 +139,7 @@ msgstr "tworzenie nowej strony %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "gotowe" @@ -248,7 +248,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -520,7 +520,7 @@ msgstr "Kopie lustrzane" msgid "Mirror" msgstr "Kopia lustrzana" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "" @@ -898,12 +898,12 @@ msgstr "awaria w trakcie odczytu %s: %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "" @@ -995,61 +995,61 @@ msgstr "awaria w trakcie przetwarzania linii %d: %s" msgid "missing id parameter" msgstr "brakujący parametr id" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "nieznaleziony szablon %s" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 #, fuzzy msgid "failed to process:" msgstr "awaria w trakcie przetwarzania:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy msgid "missing tex code" msgstr "brakujące wartości" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 #, fuzzy msgid "failed to generate image from code" msgstr "awaria w trakcie zmiany rozmiaru: %s" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1118,25 +1118,35 @@ msgstr "ikiwiki: awaria w trakcie tworzenia %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "awaria w trakcie odczytu %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "awaria w trakcie odczytu %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "awaria w trakcie kompilowania %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1155,13 +1165,13 @@ msgid "wrapper filename not specified" msgstr "nieokreślona nazwa pliku osłony" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "awaria w trakcie kompilowania %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "pomyślnie utworzono %s" @@ -1174,19 +1184,23 @@ msgstr "użycie: ikiwiki [parametry] źródło cel" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "tworzenie osłon..." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "przebudowywanie wiki..." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "odświeżanie wiki..." @@ -1194,40 +1208,40 @@ msgstr "odświeżanie wiki..." msgid "Discussion" msgstr "Dyskusja" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Użycie parametru --cgi wymaga podania adresu URL do wiki za pomocą parametru " "--url" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "awaria w trakcie odczytu %s: %s" diff --git a/po/sv.po b/po/sv.po index 20a8020c1..0d4c6202e 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -54,7 +54,7 @@ msgstr "Inställningar sparades." msgid "You are banned." msgstr "Du är bannlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Fel" @@ -136,7 +136,7 @@ msgstr "skapar nya sidan %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "klar" @@ -245,7 +245,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -513,7 +513,7 @@ msgstr "Speglar" msgid "Mirror" msgstr "Spegel" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "" @@ -888,12 +888,12 @@ msgstr "misslyckades med att skriva %s: %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "" @@ -983,60 +983,60 @@ msgstr "misslyckades med att skriva %s: %s" msgid "missing id parameter" msgstr "mall saknar id-parameter" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 #, fuzzy msgid "failed to process:" msgstr "misslyckades med att behandla mall:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 #, fuzzy msgid "failed to generate image from code" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1105,25 +1105,35 @@ msgstr "ikiwiki: kan inte rita upp %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "kan inte läsa %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "kan inte läsa %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "misslyckades med att kompilera %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1142,13 +1152,13 @@ msgid "wrapper filename not specified" msgstr "filnamn för wrapper har inte angivits" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "misslyckades med att kompilera %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "generering av %s lyckades" @@ -1161,19 +1171,23 @@ msgstr "användning: ikiwiki [flaggor] källa mÃ¥l" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "genererar wrappers.." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "bygger om wiki.." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "uppdaterar wiki.." @@ -1181,38 +1195,38 @@ msgstr "uppdaterar wiki.." msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "MÃ¥ste ange url till wiki med --url när --cgi används" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s förbehandlingsslinga detekterades pÃ¥ %s, djup %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "kan inte läsa %s: %s" diff --git a/po/tr.po b/po/tr.po index b3742ca36..b59f5e941 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.20091031\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2009-11-08 03:04+0200\n" "Last-Translator: Recai Oktaş <roktas@debian.org>\n" "Language-Team: Turkish <debian-l10n-turkish@lists.debian.org>\n" @@ -51,7 +51,7 @@ msgstr "Tercihler kaydedildi." msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Hata" @@ -132,7 +132,7 @@ msgstr "%s için yeni sayfa oluşturuluyor" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "" @@ -238,7 +238,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -490,7 +490,7 @@ msgstr "" msgid "Mirror" msgstr "" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "" @@ -860,12 +860,12 @@ msgstr "" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "" @@ -947,58 +947,58 @@ msgstr "" msgid "missing id parameter" msgstr "" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 msgid "failed to process:" msgstr "" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 msgid "failed to generate image from code" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1067,25 +1067,35 @@ msgstr "" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "" +#: ../IkiWiki/Setup.pm:34 +#, perl-format +msgid "cannot load %s in safe mode" +msgstr "" + +#: ../IkiWiki/Setup.pm:46 +#, perl-format +msgid "failed to parse %s" +msgstr "" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1104,13 +1114,13 @@ msgid "wrapper filename not specified" msgstr "" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "" @@ -1123,19 +1133,23 @@ msgstr "" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "" -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "" -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "" @@ -1143,38 +1157,38 @@ msgstr "" msgid "Discussion" msgstr "" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, perl-format msgid "cannot match pages: %s" msgstr "" diff --git a/po/vi.po b/po/vi.po index cfc7184ef..5f968ccb3 100644 --- a/po/vi.po +++ b/po/vi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-02 22:18-0500\n" +"POT-Creation-Date: 2010-04-03 14:18-0400\n" "PO-Revision-Date: 2007-01-13 15:31+1030\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" @@ -55,7 +55,7 @@ msgstr "Tùy thích đã được lÆ°u." msgid "You are banned." msgstr "Bạn bị cấm ra." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1280 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 msgid "Error" msgstr "Lỗi" @@ -137,7 +137,7 @@ msgstr "đang tạo trang mới %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:216 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 msgid "done" msgstr "xong" @@ -246,7 +246,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:256 +#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" @@ -513,7 +513,7 @@ msgstr "Nhân bản" msgid "Mirror" msgstr "Nhân bản" -#: ../IkiWiki/Plugin/moderatedcomments.pm:42 +#: ../IkiWiki/Plugin/moderatedcomments.pm:57 msgid "comment needs moderation" msgstr "" @@ -888,12 +888,12 @@ msgstr "lỗi ghi %s: %s" msgid "rsync_command exited %d" msgstr "" -#: ../IkiWiki/Plugin/search.pm:183 +#: ../IkiWiki/Plugin/search.pm:184 #, perl-format msgid "need Digest::SHA1 to index %s" msgstr "" -#: ../IkiWiki/Plugin/search.pm:218 +#: ../IkiWiki/Plugin/search.pm:221 msgid "search" msgstr "" @@ -983,60 +983,60 @@ msgstr "lỗi ghi %s: %s" msgid "missing id parameter" msgstr "mẫu thiếu tham số id" -#: ../IkiWiki/Plugin/template.pm:41 +#: ../IkiWiki/Plugin/template.pm:47 #, perl-format msgid "template %s not found" msgstr "không tìm thấy mẫu %s" -#: ../IkiWiki/Plugin/template.pm:60 +#: ../IkiWiki/Plugin/template.pm:66 #, fuzzy msgid "failed to process:" msgstr "mẫu không xá»­ lý được:" -#: ../IkiWiki/Plugin/teximg.pm:71 +#: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" -#: ../IkiWiki/Plugin/teximg.pm:123 +#: ../IkiWiki/Plugin/teximg.pm:124 #, fuzzy msgid "failed to generate image from code" msgstr "lỗi ghi %s: %s" -#: ../IkiWiki/Plugin/websetup.pm:91 +#: ../IkiWiki/Plugin/websetup.pm:105 #, perl-format msgid "%s plugin:" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:107 +#: ../IkiWiki/Plugin/websetup.pm:121 #, perl-format msgid "%s plugins" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:121 +#: ../IkiWiki/Plugin/websetup.pm:135 #, perl-format msgid "enable %s?" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:260 +#: ../IkiWiki/Plugin/websetup.pm:274 msgid "setup file for this wiki is not known" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:276 +#: ../IkiWiki/Plugin/websetup.pm:290 msgid "main" msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:419 +#: ../IkiWiki/Plugin/websetup.pm:433 msgid "" "The configuration changes shown below require a wiki rebuild to take effect." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:423 +#: ../IkiWiki/Plugin/websetup.pm:437 msgid "" "For the configuration changes shown below to fully take effect, you may need " "to rebuild the wiki." msgstr "" -#: ../IkiWiki/Plugin/websetup.pm:460 +#: ../IkiWiki/Plugin/websetup.pm:474 #, perl-format msgid "Error: %s exited nonzero (%s). Discarding setup changes." msgstr "" @@ -1105,25 +1105,35 @@ msgstr "ikiwiki: không thể vẽ %s" #. translators: The first parameter is a filename, and the second #. translators: is a (probably not translated) error message. -#: ../IkiWiki/Setup.pm:19 +#: ../IkiWiki/Setup.pm:23 #, perl-format msgid "cannot read %s: %s" msgstr "không thể đọc %s: %s" +#: ../IkiWiki/Setup.pm:34 +#, fuzzy, perl-format +msgid "cannot load %s in safe mode" +msgstr "không thể đọc %s: %s" + +#: ../IkiWiki/Setup.pm:46 +#, fuzzy, perl-format +msgid "failed to parse %s" +msgstr "lỗi biên dịch %s" + #: ../IkiWiki/Setup/Automator.pm:34 msgid "you must enter a wikiname (that contains alphanumerics)" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:82 +#: ../IkiWiki/Setup/Automator.pm:89 #, perl-format msgid "unsupported revision control system %s" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:108 +#: ../IkiWiki/Setup/Automator.pm:115 msgid "failed to set up the repository with ikiwiki-makerepo" msgstr "" -#: ../IkiWiki/Setup/Automator.pm:126 +#: ../IkiWiki/Setup/Automator.pm:134 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" msgstr "" @@ -1142,13 +1152,13 @@ msgid "wrapper filename not specified" msgstr "chÆ°a xác định tên tập tin bộ bao bọc" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:149 +#: ../IkiWiki/Wrapper.pm:159 #, perl-format msgid "failed to compile %s" msgstr "lỗi biên dịch %s" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:169 +#: ../IkiWiki/Wrapper.pm:179 #, perl-format msgid "successfully generated %s" msgstr "%s đã được tạo ra" @@ -1161,19 +1171,23 @@ msgstr "cách sá»­ dụng: ikiwiki [tùy chọn] nguồn đích" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:92 +#: ../ikiwiki.in:95 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:142 +#: ../ikiwiki.in:102 +msgid "usage: --set-yaml var=value" +msgstr "" + +#: ../ikiwiki.in:156 msgid "generating wrappers.." msgstr "đang tạo ra các bộ bao bọc.." -#: ../ikiwiki.in:205 +#: ../ikiwiki.in:219 msgid "rebuilding wiki.." msgstr "đang xây dá»±ng lại wiki.." -#: ../ikiwiki.in:208 +#: ../ikiwiki.in:222 msgid "refreshing wiki.." msgstr "đang làm tÆ°Æ¡i wiki.." @@ -1181,38 +1195,38 @@ msgstr "đang làm tÆ°Æ¡i wiki.." msgid "Discussion" msgstr "Thảo luận" -#: ../IkiWiki.pm:514 +#: ../IkiWiki.pm:530 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --cgi »" -#: ../IkiWiki.pm:560 +#: ../IkiWiki.pm:576 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:589 +#: ../IkiWiki.pm:605 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1262 +#: ../IkiWiki.pm:1278 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "vòng lặp tiền xá»­ lý %s được phát hiện trên %s ở độ sâu %i" -#: ../IkiWiki.pm:1877 +#: ../IkiWiki.pm:1901 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2020 +#: ../IkiWiki.pm:2044 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki.pm:2031 +#: ../IkiWiki.pm:2055 #, perl-format msgid "unknown sort type %s" msgstr "kiểu sắp xếp không rõ %s" -#: ../IkiWiki.pm:2050 +#: ../IkiWiki.pm:2074 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "không thể đọc %s: %s" diff --git a/t/calculate_changed_links.t b/t/calculate_changed_links.t new file mode 100755 index 000000000..bf6e2af45 --- /dev/null +++ b/t/calculate_changed_links.t @@ -0,0 +1,58 @@ +#!/usr/bin/perl +package IkiWiki; + +use warnings; +use strict; +use Test::More tests => 5; + +BEGIN { use_ok("IkiWiki"); } +BEGIN { use_ok("IkiWiki::Render"); } +%config=IkiWiki::defaultconfig(); +$config{srcdir}=$config{destdir}="/dev/null"; + +%oldrenderedfiles=%pagectime=(); +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= +%destsources=%renderedfiles=%pagecase=%pagestate=(); + +IkiWiki::checkconfig(); + +foreach my $page (qw(tags/a tags/b Reorder Add Remove TypeAdd TypeRemove)) { + $pagesources{$page} = "$page.mdwn"; + $pagemtime{$page} = $pagectime{$page} = 1000000; +} + +$oldlinks{Reorder} = [qw{tags/a tags/b}]; +$links{Reorder} = [qw{tags/b tags/a}]; + +$oldlinks{Add} = [qw{tags/b}]; +$links{Add} = [qw{tags/a tags/b}]; + +$oldlinks{Remove} = [qw{tags/a}]; +$links{Remove} = []; + +$oldlinks{TypeAdd} = [qw{tags/a tags/b}]; +$links{TypeAdd} = [qw{tags/a tags/b}]; +# This causes TypeAdd to be rebuilt, but isn't a backlink change, so it doesn't +# cause tags/b to be rebuilt. +$oldtypedlinks{TypeAdd}{tag} = { "tags/a" => 1 }; +$typedlinks{TypeAdd}{tag} = { "tags/a" => 1, "tags/b" => 1 }; + +$oldlinks{TypeRemove} = [qw{tags/a tags/b}]; +$links{TypeRemove} = [qw{tags/a tags/b}]; +# This causes TypeRemove to be rebuilt, but isn't a backlink change, so it +# doesn't cause tags/b to be rebuilt. +$oldtypedlinks{TypeRemove}{tag} = { "tags/a" => 1 }; +$typedlinks{TypeRemove}{tag} = { "tags/a" => 1, "tags/b" => 1 }; + +my $oldlink_targets = calculate_old_links([keys %pagesources], []); +is_deeply($oldlink_targets, { + Reorder => { "tags/a" => "tags/a", "tags/b" => "tags/b" }, + Add => { "tags/b" => "tags/b" }, + Remove => { "tags/a" => "tags/a" }, + TypeAdd => { "tags/a" => "tags/a", "tags/b" => "tags/b" }, + TypeRemove => { "tags/a" => "tags/a", "tags/b" => "tags/b" }, + }); +my ($backlinkchanged, $linkchangers) = calculate_changed_links([keys %pagesources], [], $oldlink_targets); + +is_deeply($backlinkchanged, { "tags/a" => 1 }); +is_deeply($linkchangers, { add => 1, remove => 1, typeadd => 1, typeremove => 1 }); diff --git a/t/index.t b/t/index.t index 2f23524a7..44273059d 100755 --- a/t/index.t +++ b/t/index.t @@ -4,7 +4,7 @@ use strict; use IkiWiki; package IkiWiki; # use internal variables -use Test::More tests => 27; +use Test::More tests => 31; $config{wikistatedir}="/tmp/ikiwiki-test.$$"; system "rm -rf $config{wikistatedir}"; @@ -31,6 +31,7 @@ $renderedfiles{"bar"}=["bar.html", "bar.rss", "sparkline-foo.gif"]; $renderedfiles{"bar.png"}=["bar.png"]; $links{"Foo"}=["bar.png"]; $links{"bar"}=["Foo", "new-page"]; +$typedlinks{"bar"}={tag => {"Foo" => 1}}; $links{"bar.png"}=[]; $depends{"Foo"}={}; $depends{"bar"}={"foo*" => 1}; @@ -45,7 +46,7 @@ ok(-s "$config{wikistatedir}/indexdb", "index file created"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); ok(loadindex(), "load index"); @@ -104,10 +105,16 @@ is_deeply(\%destsources, { "sparkline-foo.gif" => "bar", "bar.png" => "bar.png", }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%typedlinks loaded correctly"); +is_deeply(\%oldtypedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%oldtypedlinks loaded correctly"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); # When state is loaded for a wiki rebuild, only ctime and oldrenderedfiles @@ -140,5 +147,9 @@ is_deeply(\%pagecase, { }, "%pagecase generated correctly"); is_deeply(\%destsources, { }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { +}, "%typedlinks cleared correctly"); +is_deeply(\%oldtypedlinks, { +}, "%oldtypedlinks cleared correctly"); system "rm -rf $config{wikistatedir}"; diff --git a/t/pagespec_match.t b/t/pagespec_match.t index 8b0be4e8a..ade9bca5a 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 72; +use Test::More tests => 75; BEGIN { use_ok("IkiWiki"); } @@ -54,6 +54,7 @@ $config{userdir}=""; $links{foo}=[qw{bar baz}]; $links{bar}=[]; $links{baz}=[]; +$links{meh}=[]; $links{"bugs/foo"}=[qw{bugs/done}]; $links{"bugs/done"}=[]; $links{"bugs/bar"}=[qw{done}]; @@ -82,6 +83,7 @@ ok(! pagespec_match("bar", ""), "empty pagespec should match nothing"); ok(! pagespec_match("bar", " "), "blank pagespec should match nothing"); ok(pagespec_match("ook", "link(blog/tags/foo)"), "link internal absolute success"); ok(pagespec_match("ook", "link(/blog/tags/foo)"), "link explicit absolute success"); +ok(pagespec_match("meh", "!link(done)"), "negated failing match is a success"); $IkiWiki::pagectime{foo}=1154532692; # Wed Aug 2 11:26 EDT 2006 $IkiWiki::pagectime{bar}=1154532695; # after @@ -122,3 +124,7 @@ $i=pagespec_match("foo", "link(baz) and created_after(bar)")->influences; is(join(",", sort keys %$i), 'bar,foo', "influences add up over OR"); $i=pagespec_match("foo", "!link(baz) and !created_after(bar)")->influences; is(join(",", sort keys %$i), 'bar,foo', "influences unaffected by negation"); +$i=pagespec_match("foo", "!link(baz) and !created_after(bar)")->influences; +is(join(",", sort keys %$i), 'bar,foo', "influences unaffected by negation"); +$i=pagespec_match("meh", "!link(done)")->influences; +is(join(",", sort keys %$i), 'meh', "a negated, failing link test is successful, so the page is a link influence"); diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index dd5dcc5b0..05dc012fe 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 88; +use Test::More tests => 94; BEGIN { use_ok("IkiWiki"); } @@ -9,6 +9,12 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); +{ + package IkiWiki::SortSpec; + + sub cmp_path { $a cmp $b } +} + %pagesources=( foo => "foo.mdwn", foo2 => "foo2.mdwn", @@ -18,6 +24,13 @@ IkiWiki::checkconfig(); "post/2" => "post/2.mdwn", "post/3" => "post/3.mdwn", ); +$IkiWiki::pagectime{foo} = 2; +$IkiWiki::pagectime{foo2} = 2; +$IkiWiki::pagectime{foo3} = 1; +$IkiWiki::pagectime{bar} = 3; +$IkiWiki::pagectime{"post/1"} = 6; +$IkiWiki::pagectime{"post/2"} = 6; +$IkiWiki::pagectime{"post/3"} = 6; $links{foo}=[qw{post/1 post/2}]; $links{foo2}=[qw{bar}]; $links{foo3}=[qw{bar}]; @@ -25,15 +38,24 @@ $links{foo3}=[qw{bar}]; is_deeply([pagespec_match_list("foo", "bar")], ["bar"]); is_deeply([sort(pagespec_match_list("foo", "* and !post/*"))], ["bar", "foo", "foo2", "foo3"]); is_deeply([sort(pagespec_match_list("foo", "post/*"))], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title")], + ["post/1", "post/2", "post/3"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", reverse => 1)], ["post/3", "post/2", "post/1"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 2)], ["post/1", "post/2"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50, reverse => 1)], + ["post/3", "post/2", "post/1"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); +is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], + ["bar", "foo"]); +is_deeply([pagespec_match_list("foo", "foo* or bar*", + sort => "-age title")], # oldest first, break ties by title + ["foo3", "foo", "foo2", "bar"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); @@ -110,3 +132,14 @@ foreach my $spec ("nosuchpage or link(bar)", "link(bar) or nosuchpage", %IkiWiki::depends_simple=(); %IkiWiki::depends=(); } + +my @ps; +foreach my $p (100..500) { + $IkiWiki::pagectime{"p/$p"} = $p; + $pagesources{"p/$p"} = "p/$p.mdwn"; + unshift @ps, "p/$p"; +} +is_deeply([pagespec_match_list("foo", "p/*", sort => "age")], + [@ps]); +is_deeply([pagespec_match_list("foo", "p/*", sort => "age", num => 20)], + [@ps[0..19]]); diff --git a/t/tag.t b/t/tag.t new file mode 100755 index 000000000..fe547d85b --- /dev/null +++ b/t/tag.t @@ -0,0 +1,39 @@ +#!/usr/bin/perl +package IkiWiki; + +use warnings; +use strict; +use Test::More tests => 7; + +BEGIN { use_ok("IkiWiki"); } +BEGIN { use_ok("IkiWiki::Plugin::tag"); } + +ok(! system("rm -rf t/tmp; mkdir t/tmp")); + +$config{userdir} = "users"; +$config{tagbase} = "tags"; + +%oldrenderedfiles=%pagectime=(); +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= +%destsources=%renderedfiles=%pagecase=%pagestate=(); + +foreach my $page (qw(tags/numbers tags/letters one two alpha beta)) { + $pagesources{$page} = "$page.mdwn"; + $pagemtime{$page} = $pagectime{$page} = 1000000; +} + +$links{one}=[qw(tags/numbers alpha tags/letters)]; +$links{two}=[qw(tags/numbers)]; +$links{alpha}=[qw(tags/letters one)]; +$links{beta}=[qw(tags/letters)]; +$typedlinks{one}={tag => {"tags/numbers" => 1 }}; +$typedlinks{two}={tag => {"tags/numbers" => 1 }}; +$typedlinks{alpha}={tag => {"tags/letters" => 1 }}; +$typedlinks{beta}={tag => {"tags/letters" => 1 }}; + +ok(pagespec_match("one", "tagged(numbers)")); +ok(!pagespec_match("two", "tagged(alpha)")); +ok(pagespec_match("one", "link(tags/numbers)")); +ok(pagespec_match("one", "link(alpha)")); + +1; diff --git a/templates/page.tmpl b/templates/page.tmpl index d4d681084..0597b04f7 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -3,6 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta http-equiv="Cache-Control" content="must-revalidate" /> <title><TMPL_VAR TITLE>