summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-02 00:14:31 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-02 00:14:31 +0000
commit2794d7ef5abc4fa8fc2eb42d5c85ada197df0767 (patch)
treea79c4c81a7cb989fb3cfa5f84a0d8fad831c5085 /IkiWiki/Plugin
parent418096be9e56f9078c19605f867b44d25ccadf58 (diff)
* Renamed GlobLists to PageSpecs.
* PageSpecs can now include nested parens, "and", and "or". This remains backwards compatible to the old GlobList format. It's implemented by treating the GlobList as a very limited microlanguage that is transformed to perl code that does the matching. * The old GlobList format is deprecated, and I encourage users to switch to using the new PageSpec format. Compatability with the old format will be removed at some point, possibly by 2.0. * Wiki rebuild needed on upgrade to this version due to PageSpec change. * Add support for creation_month and creation_year to PageSpec. Closes: #380680 * Changes to index file encoding.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/aggregate.pm2
-rw-r--r--IkiWiki/Plugin/brokenlinks.pm2
-rw-r--r--IkiWiki/Plugin/inline.pm2
-rw-r--r--IkiWiki/Plugin/orphans.pm2
-rw-r--r--IkiWiki/Plugin/pagecount.pm2
-rw-r--r--IkiWiki/Plugin/pagestats.pm2
6 files changed, 5 insertions, 7 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 7142e6106..46f2d5128 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -108,8 +108,6 @@ sub delete (@) { #{{{
} #}}}
sub loadstate () { #{{{
- eval q{use HTML::Entities};
- die $@ if $@;
if (-e "$IkiWiki::config{wikistatedir}/aggregate") {
open (IN, "$IkiWiki::config{wikistatedir}/aggregate" ||
die "$IkiWiki::config{wikistatedir}/aggregate: $!");
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index 09ce181cf..7fae9a2f2 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
@@ -21,7 +21,7 @@ sub preprocess (@) { #{{{
my @broken;
foreach my $page (keys %IkiWiki::links) {
- if (IkiWiki::globlist_match($page, $params{pages})) {
+ if (IkiWiki::pagespec_match($page, $params{pages})) {
foreach my $link (@{$IkiWiki::links{$page}}) {
next if $link =~ /.*\/discussion/i && $IkiWiki::config{discussion};
my $bestlink=IkiWiki::bestlink($page, $link);
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 6a0f00f0f..d8f2ca0d8 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -48,7 +48,7 @@ sub preprocess_inline (@) { #{{{
my @list;
foreach my $page (keys %pagesources) {
next if $page eq $params{page};
- if (globlist_match($page, $params{pages})) {
+ if (pagespec_match($page, $params{pages})) {
push @list, $page;
}
}
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index ac4b77527..2219634ca 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
@@ -28,7 +28,7 @@ sub preprocess (@) { #{{{
my @orphans;
foreach my $page (keys %IkiWiki::renderedfiles) {
next if $linkedto{$page};
- next unless IkiWiki::globlist_match($page, $params{pages});
+ next unless IkiWiki::pagespec_match($page, $params{pages});
# If the page has a link to some other page, it's
# indirectly linked to a page via that page's backlinks.
next if grep {
diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm
index 8a1376e09..cfc962b6c 100644
--- a/IkiWiki/Plugin/pagecount.pm
+++ b/IkiWiki/Plugin/pagecount.pm
@@ -23,7 +23,7 @@ sub preprocess (@) { #{{{
return $#pages+1 if $params{pages} eq "*"; # optimisation
my $count=0;
foreach my $page (@pages) {
- $count++ if IkiWiki::globlist_match($page, $params{pages});
+ $count++ if IkiWiki::pagespec_match($page, $params{pages});
}
return $count;
} # }}}
diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm
index a1b4c1d45..de559e2c5 100644
--- a/IkiWiki/Plugin/pagestats.pm
+++ b/IkiWiki/Plugin/pagestats.pm
@@ -34,7 +34,7 @@ sub preprocess (@) { #{{{
my %counts;
my $max = 0;
foreach my $page (keys %IkiWiki::links) {
- if (IkiWiki::globlist_match($page, $params{pages})) {
+ if (IkiWiki::pagespec_match($page, $params{pages})) {
my @bl = IkiWiki::backlinks($page);
$counts{$page} = scalar(@bl);
$max = $counts{$page} if $counts{$page} > $max;