/usr/share/doc/lire/dev-manual/ch05.html is in lire-devel-doc 2:2.1.1-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Writing a New Report</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Lire Developer's Manual"><link rel="up" href="pt02.html" title="Part II. Using the Lire Framework"><link rel="prev" href="ch04s03.html" title="DLF Analyser API"><link rel="next" href="pt03.html" title="Part III. Developer's Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Writing a New Report</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s03.html">Prev</a> </td><th width="60%" align="center">Part II. Using the <span class="application">Lire</span> Framework</th><td width="20%" align="right"> <a accesskey="n" href="pt03.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. Writing a New Report"><div class="titlepage"><div><div><h2 class="title"><a name="chap:writing-report-spec"></a>Chapter 5. Writing a New Report</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch05.html#sect:filter-spec">Filter Specification</a></span></dt></dl></div><p>Writing a new report involves writing a report specification,
e.g.
<code class="filename">/service/<superservice>/reports/top-foo-by-bar.xml</code>,
and adding this report along with possible configuration parameters to
<code class="filename"><service>.cfg</code>. E.g., to create a new report,
based upon <code class="filename">email/from-domain.xml</code>: copy the file
<code class="filename">/usr/local/etc/lire/email.cfg</code> to
<code class="filename">~/.lire/etc/email.cfg</code>. Copy the file
<code class="filename">/usr/local/share/lire/reports/email/top-from-domain.xml</code>
to e.g.
<code class="filename">~/.lire/reports/reports/email/from-domain.xml</code>.
Edit the last file to your needs, and enable it by listing it in your
<code class="filename">~/.lire/etc/email.cfg</code>.
</p><p>
Beware! The name of the report generally consists of alphanumerics and
'-', but the name of parameters may <span class="emphasis"><em>not</em></span> contain
any '-' characters. It generally consists of alphanumerics and '_'
characters.
</p><div class="section" title="Filter Specification"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sect:filter-spec"></a>Filter Specification</h2></div></div></div><p>
For now, you'll have to refer to the example filters as found in the
current report specification files. We'll give one other example
here: specifying a time range.
</p><p>
Suppose you want to be able to report on only a specific
time range. You could build a (possibly global and reused) filter
like:
</p><pre class="programlisting">
<lire:filter-spec>
<lire:and>
<lire:ge arg1="$timestamp" arg2="$period-start"/>
<lire:le arg1="$period-end" arg2="$timestamp"/>
</lire:and>
</lire:filter-spec>
</pre><p>
</p><p>
When trying your new filter, you could install it in
<code class="filename">~/.lire/filters/your-filter-name.xml</code>. When lr_dlf2xml
looks up a filter which was mentioned in the report configuration file, it
looks first in <code class="filename">~/.lire/filters/</code>, and then in
<code class="filename">.../share/lire/filters/</code>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pt03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">DLF Analyser API </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part III. Developer's Reference</td></tr></table></div></body></html>
|