Child: [45e459] (diff)

Download this file

custom.html    415 lines (345 with data), 13.6 kB

  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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>RECOLL: result list customisation tips</title>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta name="Author" content="Jean-Francois Dockes">
<meta name="Description" content=
"recoll is a simple full-text search system for unix and linux
based on the powerful and mature xapian engine">
<meta name="Keywords" content=
"full text search, desktop search, unix, linux">
<meta http-equiv="Content-language" content="en">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="robots" content="All,Index,Follow">
<link type="text/css" rel="stylesheet" href="styles/style.css">
<style type="text/css">
/* Photo-Caption PZ3 CSS v080630
* copyright: http://randsco.com/copyright
* www.randsco.com
*/
.PZ3-l { float:left; margin-right:10px; }
.PZ3-r { float:right; margin-left:10px; direction:rtl; }
html>/**/body .PZ3-r { position:relative; }
.PZ3zoom { border:1px solid #369; }
.PZ3zoom a,.PZ3zoom a:visited { display:block;
padding:0; overflow:hidden; text-decoration:none;
height:100%; width:100%; }
html>/**/body .PZ3-r a { right:0; }
.PZ3zoom a:hover { position:absolute;
z-index:999; padding:0; background:none;
cursor:default; height:auto; width:auto;
overflow:visible; border:1px solid #369;
margin:-1px 0 0 -1px; }
html>body .PZ3zoom a:hover { margin:-1px -1px 0 -1px; }
.PZ3zoom a img { border:0; height:100%; width:100%; }
.PZ3zoom a:hover img { height:auto; width:auto;
border:0; }
a:hover .PZ3cap,
a:hover .PZ31cap { display:block;
direction:ltr; font:10pt verdana,sans-serif;
margin-top:-3px; background:#369; color:#fff;
text-align:left; }
a:hover .PZ3cap { padding:3px 5px; }
.PZ3inr { display:block; padding:2px 5px; }
.noCap a:hover .PZ3cap,
.noCap a:hover .PZ31cap { display:none; }
.noBdr,.noBdr a:hover { border:0; }
.Lnk a:hover { cursor:pointer; }
/* End Photo-Caption Zoom CSS */
</style>
</head>
<body>
<div class="rightlinks">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="pics/index.html">Screenshots</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="usermanual/index.html">User manual</a></li>
<li><a href="index.html#support">Support</a></li>
</ul>
</div>
<div class="content">
<h1>Recoll result list customising exemples</h1>
<p>The Recoll result list is actually made of html text
displayed inside a Qt Widget. In all Recoll versions, you
can specify the format for the list entries: what data is
displayed for each hit document and how. This used to include
"almost full" support for HTML capabilities, with a few
restrictions due to the Qt QTextBrowser object.</p>
<p>As of Recoll 1.17, the result list is by default a WebKit
object (WebKit is the basis for several major browsers), which
yields full CSS and even Javascript support. For these
versions you can specify both the individual result format and
code to be included in the html header (ie: CSS or
Javascript).</p>
<h2>New in Recoll 1.17: the WebKit result list</h2>
<p>With WebKit, things that used to not work are now
possible. The exemple which follow are probably not generally
very useful (else they'd be included in the standard Recoll),
but they provide samples of what can be done, and may be of use
anyway.</p>
<p>You can now make the list icons links that activate the
preview or open action (or the document url which you can then
drag/drop to other windows) (turning images into links did
not work with QTextBrowser).</p>
<h3>Zooming the paragraph font size</h3>
<p>If you are using a format with small fonts, it may be useful
to be able to zoom the text when the mouse hovers over it. A
very basic way to do this -<em>with the standard paragraph
format, which is a table</em>- would be to include the following
code in the header:</p>
<pre>
&lt;STYLE type="text/css">
table:hover {font-size: 130%;}
&lt;/STYLE>
</pre>
<p>Of course, the selector should be adapted to your own
result format. You should know that every result will be
enclosed by Recoll inside a <tt>&lt;div
class="rclresult" rcldocnum="nn"&gt;</tt> element.</p>
<h3>Zooming the thumbnails</h3>
<p>Recoll 1.17 and newer will display document
thumbnails instead of the type icon if the thumbnail exists in
the standard Freedesktop location. The icons/thumbnails are
64x64 pixels in size, which is a bit small. The standard
thumbnail files are actually 128x128, which is much more
detailed. Using them statically would consume too much list
space though. Using CSS, you can get them to expand when the
mouse is over them. Recipee:</p>
<blockquote>
<p>Retrieve the CSS code
from <a href="http://randsco.com/_miscPgs/cssZoomPZ3.html">randsco
pure CSS photo-caption zoom</a>, and include it inside the
result list html header by using the "Edit result page html
header insert" from the GUI preferences. Don't forget to
enclose the CSS code between <code>&lt;style type="text/css"&gt;
&lt;/style&gt</code> tags.</p>
<p>Use something like the following result paragraph format
(only the code around the img tag is relevant, the rest can be
what you want):</p>
<pre>
<!--
<table><tr><td>
<div class="PZ3zoom PZ3-l noBdr noCap noLnk" style="width:64px;height:64px;">
<a href="%U"> <img src='%I' width='64'></a>
</div>
</td><td>
%R %S %L &nbsp;&nbsp;<b>%T</b><br>%M&nbsp;%D&nbsp;&nbsp;&nbsp;<i>%U</i>&nbsp;%i<br>%A %K
</td></tr></table>
-->
&lt;table&gt;&lt;tr&gt;&lt;td&gt;
&lt;div class="PZ3zoom PZ3-l noBdr noCap noLnk" style="width:64px;height:64px;"&gt;
&lt;a href="%U"&gt; &lt;img src='%I' width='64'&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;td&gt;
%R %S %L &amp;nbsp;&amp;nbsp;&lt;b&gt;%T&lt;/b&gt;&lt;br&gt;%M&amp;nbsp;%D&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;%U&lt;/i&gt;&amp;nbsp;%i&lt;br&gt;%A %K
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</pre>
</blockquote>
<div class="PZ3zoom PZ3-r noCap noLnk" style="width:100px;height:40px;">
<a href="resparpics/pz3.png" onclick="return false">
<img src="resparpics/pz3.png" alt="hover zoom" />
</a>
</div>
<p>Et voil�! The icons will grow to their full size when the mouse is
over them.</p>
<h2>Result list paragraph format samples</h2>
<p>The format for paragraphs inside the Recoll GUI result list is
customisable by specifying an html fragment (menu:
<tt>Preferences->Query&nbsp;configuration->User&nbsp;interface->Result&nbsp;paragraph&nbsp;format&nbsp;string</tt>)</p>
<p>Here follow some sample formats. Most of them were contributed by
kind users, and I'll be happy to show their names if they so
wish (abstaining by default).</p>
<h3>Recoll 1.15 default</h3>
<pre>
<!--
<table>
<tr>
<td><img src='%I'></td>
<td>%R %S %L&nbsp;&nbsp;<b>%T</b><br>
%M&nbsp;%D&nbsp;&nbsp;&nbsp;<i>%U</i><br>
%A %K
</td>
</tr>
</table>
-->
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src='%I'&gt;&lt;/td&gt;
&lt;td&gt;%R %S %L&amp;nbsp;&amp;nbsp;&lt;b&gt;%T&lt;/b&gt;&lt;br&gt;
%M&amp;nbsp;%D&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;%U&lt;/i&gt;&lt;br&gt;
%A %K
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<br clear="all">
<img src="resparpics/default.png"/>
<h3>A simpler format, suggested in Bitbucket issue #69</h3>
<pre>
<!--
<img src="%I" align="left">%R %L&nbsp;&nbsp;<b>%T</b><br>
&nbsp;&nbsp;<i><font color="#808080">%U</font></i>&nbsp;%i<br>
%A %K
-->
&lt;img src=&quot;%I&quot; align=&quot;left&quot;&gt;%R %L&amp;nbsp;&amp;nbsp;&lt;b&gt;%T&lt;/b&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;font color=&quot;#808080&quot;&gt;%U&lt;/font&gt;&lt;/i&gt;&amp;nbsp;%i&lt;br&gt;
%A %K
</pre>
<br clear="all">
<img src="resparpics/issue73.png"/>
<h3>Simple+table</h3>
<p>Same format, but using a table to avoid text flowing into the icon
area.</p>
<pre>
<!--
<table>
<tr>
<td><img src="%I" align="left"></td>
<td>%R %L&nbsp;&nbsp;<b>%T</b><br>
&nbsp;&nbsp;<i><font color="#808080">%U</font></i>&nbsp;%i<br>
%A %K
</td>
</tr>
</table>
-->
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src=&quot;%I&quot; align=&quot;left&quot;&gt;&lt;/td&gt;
&lt;td&gt;%R %L&amp;nbsp;&amp;nbsp;&lt;b&gt;%T&lt;/b&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;font color=&quot;#808080&quot;&gt;%U&lt;/font&gt;&lt;/i&gt;&amp;nbsp;%i&lt;br&gt;
%A %K
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<br clear="all">
<img src="resparpics/issue73+table.png"/>
<h3>Using a small font to make the size/date details less obstrusive</h3>
<pre>
<!--
<table>
<tr>
<td><img src="%I" align="left"></td>
<td><table bgcolor="#bababa">
<tr><td><div>
<font face="Tahoma, sans-serif"><u><b><a href="P%N">%T</a></b></u><br>
<font color=#008000>%L</font><br>
<font color=#510101>%A %K</font><br>
<font color=#0100FF>%U</font>
<p align="right"><font size=1><font color=#000000>%S
&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp; %D
&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp; %M</font></p>
</div></td></tr>
</table></td>
</tr>
</table>
-->
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src=&quot;%I&quot; align=&quot;left&quot;&gt;&lt;/td&gt;
&lt;td&gt;&lt;table bgcolor=&quot;#bababa&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;div&gt;
&lt;font face=&quot;Tahoma, sans-serif&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;a href=&quot;P%N&quot;&gt;%T&lt;/a&gt;&lt;/b&gt;&lt;/u&gt;&lt;br&gt;
&lt;font color=#008000&gt;%L&lt;/font&gt;&lt;br&gt;
&lt;font color=#510101&gt;%A %K&lt;/font&gt;&lt;br&gt;
&lt;font color=#0100FF&gt;%U&lt;/font&gt;
&lt;p align=&quot;right&quot;&gt;&lt;font size=1&gt;&lt;font color=#000000&gt;%S
&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;nbsp;&amp;nbsp; %D
&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;nbsp;&amp;nbsp; %M&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<br clear="all">
<img src="resparpics/detailSmallGreyTable.png"/>
<h3>A very structured table</h3>
<pre>
<!--
<table border="1" bgcolor="lightyellow">
<tr>
<td rowspan="4" width="40px" align="center" valign="center">
<img src="%I" width="32" height="32">
<p><b>%R</b></p>
<p><a href="P%N">Aper�u</a></p>
</td>
<th colspan="3" bgcolor="lightgrey">%T</th>
</tr>
<tr>
<td align="center">%M</td>
<td align="center">%D</td>
<td align="center">%S</td>
</tr>
<tr>
<td colspan="3"><a href="E%N">%U</a></td>
</tr>
<tr>
<td colspan="3">%A</td>
</tr>
</table>
-->
&lt;table border=&quot;1&quot; bgcolor=&quot;lightyellow&quot;&gt;
&lt;tr&gt;
&lt;td rowspan=&quot;4&quot; width=&quot;40px&quot; align=&quot;center&quot; valign=&quot;center&quot;&gt;
&lt;img src=&quot;%I&quot; width=&quot;32&quot; height=&quot;32&quot;&gt;
&lt;p&gt;&lt;b&gt;%R&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;P%N&quot;&gt;Aper&Atilde;&sect;u&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;th colspan=&quot;3&quot; bgcolor=&quot;lightgrey&quot;&gt;%T&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;%M&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;%D&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;%S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;3&quot;&gt;&lt;a href=&quot;E%N&quot;&gt;%U&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;3&quot;&gt;%A&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<br clear="all">
<img src="resparpics/structuredTable.png"/>
<h3>Web-like from the user manual</h3>
<pre>
<!--
<u><b><a href="P%N">%T</a></b></u><br>
%U<br>
%A <font color=#008000>%S</font> - <a href="E%N">Edit</a>
-->
&lt;u&gt;&lt;b&gt;&lt;a href=&quot;P%N&quot;&gt;%T&lt;/a&gt;&lt;/b&gt;&lt;/u&gt;&lt;br&gt;
%U&lt;br&gt;
%A &lt;font color=#008000&gt;%S&lt;/font&gt; - &lt;a href=&quot;E%N&quot;&gt;Edit&lt;/a&gt;
</pre>
<br clear="all">
<img src="resparpics/weblike.png"/>
<h3>Clean-Looking from the user manual</h3>
<pre>
<!--
<table>
<tr><td><img src="%I" align="left"></td>
<td>%L <font color="#900000">%R</font> <b>%T</b><br>
%S <font color="#808080"><i>%U</i></font>
<table bgcolor="#e0e0e0">
<tr><td><div>%A</div> %K </td></tr>
</table></td>
</table>
-->
&lt;table&gt;
&lt;tr&gt;&lt;td&gt;&lt;img src=&quot;%I&quot; align=&quot;left&quot;&gt;&lt;/td&gt;
&lt;td&gt;%L &lt;font color=&quot;#900000&quot;&gt;%R&lt;/font&gt; &lt;b&gt;%T&lt;/b&gt;&lt;br&gt;
%S &lt;font color=&quot;#808080&quot;&gt;&lt;i&gt;%U&lt;/i&gt;&lt;/font&gt;
&lt;table bgcolor=&quot;#e0e0e0&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;div&gt;%A&lt;/div&gt; %K &lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;/table&gt;
</pre>
<br clear="all">
<img src="resparpics/clean.png"/>
</div>
</body>
</html>