1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pagespec</title>
<link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../../bootstrap/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="../../local.css" type="text/css" />
<meta name="robots" content="noindex, follow" />
<style type="text/css">
@media (max-width: 979px) {
.navbar-fixed-top {
position: fixed;
margin-left: 0px;
margin-right: 0px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="row-fluid">
<div class="span12">
<h1></h1>
<ul class="breadcrumb">
<li><a href="../../">Arquivo Público de Memória Coletiva</a> <span class="divider">/</span> </li>
<li><a href="../">ikiwiki</a> <span class="divider">/</span> </li>
<li>pagespec</li>
<li><span class="divider">|</span> <a href="../../conteudo">Conteúdo</a></li>
<li><span class="divider">|</span> <a href="../../documentacao">Documentação</a></li>
<li><span class="divider">|</span> <a href="../../tarefas">Tarefas</a></li>
<li><span class="divider">|</span> <a href="https://git.fluxo.info/?p=arquivo.git;a=history;f=ikiwiki/pagespec.mdwn">Histórico</a></li>
<li><span class="divider">|</span> <a href="https://git.sarava.org/?p=arquivo.git;a=atom">Feed</a></li>
</ul>
</div>
</div>
<div class="page row-fluid">
<div>
<div class="pageheader">
<div class="header">
<h1>
pagespec
</h1>
</div>
</div>
<div id="pagebody">
<div id="content">
<p class="pagedate">
<strong>Posted <span class="date">dom 02 fev 2020 17:23:50</span></strong>
</p>
<p>To select a set of pages, such as pages that are locked, pages
whose commit emails you want subscribe to, or pages to combine into a
blog, the wiki uses a PageSpec. This is an expression that matches
a set of pages.</p>
<p>The simplest PageSpec is a simple list of pages. For example, this matches
any of the three listed pages:</p>
<pre><code>foo or bar or baz
</code></pre>
<p>More often you will want to match any pages that have a particular thing in
their name. You can do this using a glob pattern. "<code>*</code>" stands for any part
of a page name, and "<code>?</code>" for any single letter of a page name. So this
matches all pages about music, and any <a href="../subpage/">SubPage</a>s of the SandBox, but does
not match the SandBox itself:</p>
<pre><code>*music* or SandBox/*
</code></pre>
<p>You can also prefix an item with "<code>!</code>" to skip pages that match it. So to
match all pages except for Discussion pages and the SandBox:</p>
<pre><code>* and !SandBox and !*/Discussion
</code></pre>
<p>Some more elaborate limits can be added to what matches using these functions:</p>
<ul>
<li>"<code>glob(someglob)</code>" - matches pages and other files that match the given glob.
Just writing the glob by itself is actually a shorthand for this function.</li>
<li>"<code>page(glob)</code>" - like <code>glob()</code>, but only matches pages, not other files</li>
<li>"<code>link(page)</code>" - matches only pages that link to a given page (or glob)</li>
<li>"<code>tagged(tag)</code>" - matches pages that are tagged or link to the given tag (or
tags matched by a glob)</li>
<li>"<code>backlink(page)</code>" - matches only pages that a given page links to</li>
<li>"<code>creation_month(month)</code>" - matches only files created on the given month
number</li>
<li>"<code>creation_day(mday)</code>" - or day of the month</li>
<li>"<code>creation_year(year)</code>" - or year</li>
<li>"<code>created_after(page)</code>" - matches only files created after the given page
was created</li>
<li>"<code>created_before(page)</code>" - matches only files created before the given page
was created</li>
<li>"<code>internal(glob)</code>" - like <code>glob()</code>, but matches even internal-use
pages that globs do not usually match.</li>
<li>"<code>title(glob)</code>", "<code>author(glob)</code>", "<code>authorurl(glob)</code>",
"<code>license(glob)</code>", "<code>copyright(glob)</code>", "<code>guid(glob)</code>"
<ul>
<li>match pages that have the given metadata, matching the specified glob.</li>
</ul>
</li>
<li>"<code>user(username)</code>" - tests whether a modification is being made by a
user with the specified username. If openid is enabled, an openid can also
be put here. Glob patterns can be used in the username. For example,
to match all openid users, use <code>user(*://*)</code></li>
<li>"<code>admin()</code>" - tests whether a modification is being made by one of the
wiki admins.</li>
<li>"<code>ip(address)</code>" - tests whether a modification is being made from the
specified IP address. Glob patterns can be used in the address. For
example, <code>ip(127.0.0.*)</code></li>
<li>"<code>comment(glob)</code>" - matches comments to a page matching the glob.</li>
<li>"<code>comment_pending(glob)</code>" - matches unmoderated, pending comments.</li>
<li>"<code>postcomment(glob)</code>" - matches only when comments are being
posted to a page matching the specified glob</li>
</ul>
<p>For example, to match all pages in a blog that link to the page about music
and were written in 2005:</p>
<pre><code>blog/* and link(music) and creation_year(2005)
</code></pre>
<p>Note the use of "and" in the above example, that means that only pages that
match each of the three expressions match the whole. Use "and" when you
want to combine expression like that; "or" when it's enough for a page to
match one expression. Note that it doesn't make sense to say "index and
SandBox", since no page can match both expressions.</p>
<p>If you want to include only one level of subpages, you can use</p>
<pre><code>blog/* and !blog/*/*
</code></pre>
<p>More complex expressions can also be created, by using parentheses for
grouping. For example, to match pages in a blog that are tagged with either
of two tags, use:</p>
<pre><code>blog/* and (tagged(foo) or tagged(bar))
</code></pre>
<p>Note that page names in PageSpecs are matched against the absolute
filenames of the pages in the wiki, so a pagespec "foo" used on page
"a/b" will not match a page named "a/foo" or "a/b/foo". To match
relative to the directory of the page containing the pagespec, you can
use "./". For example, "./foo" on page "a/b" matches page "a/foo".</p>
<p>To indicate the name of the page the PageSpec is used in, you can
use a single dot. For example, <code>link(.)</code> matches all the pages
linking to the page containing the PageSpec.</p>
</div>
<hr />
</div>
<div id="footer" class="pagefooter">
<div id="pageinfo">
<div id="backlinks">
Links:
<a href="../">ikiwiki</a>
<a href="./attachment/">pagespec/attachment</a>
<a href="./po/">pagespec/po</a>
<a href="./sorting/">pagespec/sorting</a>
</div>
<!--<div class="pagedate">
Last edited <span class="date">dom 02 fev 2020 17:23:50</span>
</div> -->
</div>
<!-- from Arquivo Público de Memória Coletiva -->
</div>
</div>
<div class="span4">
</div>
</div>
</div>
</body>
</html>
|