18b1d616dda820f63c3ce23192ae5fa83e4af182
[utils] / crawler / kiss / docs / content / xdocs / index.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Copyright 2002-2004 The Apache Software Foundation or its licensors,
4   as applicable.
5
6   Licensed under the Apache License, Version 2.0 (the "License");
7   you may not use this file except in compliance with the License.
8   You may obtain a copy of the License at
9
10       http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17 -->
18 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
19 <document> 
20   <header> 
21     <title>Automatic Recording for KiSS Hard Disk Recorders</title> 
22   </header> 
23   <body> 
24     <section id="overview">
25       <title>Overview</title>
26    
27       <p>
28         In 2005,  <a href="site:links/kiss">KiSS</a> introduced the ability
29         to schedule recordings on KiSS hard disk recorder (such as the 
30         DP-558) through a web site on the internet. When a new recording is
31         scheduled through the web site, the KiSS recorder finds out about 
32         this new recording by polling a server on the internet. 
33         This is a really cool feature since it basically allows programming
34         the recorder when away from home. 
35       </p>
36       <p>
37         After using this feature for some time now, I started noticing regular
38         patterns. Often you are looking for the same programs and for certain
39         types of programs. So, wouldn't it be nice to have a program 
40         do this work for you and automatically record programs and notify you
41         of possibly interesting ones?
42       </p>
43       <p>
44         This is where the KiSS crawler comes in. This is a simple crawler which 
45         logs on to the KiSS electronic programme guide web site and gets
46         programme information from there. Then based on that it automatically
47         records programs for you or sends notifications about interesting ones.
48       </p>
49       <p>
50         In its current version, the crawler can be used a standalone program
51         only and the preferred way to run it is as a scheduled task. 
52       </p>
53     </section>
54     
55     <section>
56       <title>Downloading</title>
57       
58       <p>
59         At this moment, no formal releases have been made and only the latest
60         version can be downloaded. 
61       </p>
62       <p>
63         The easy way to start is the 
64         <a href="installs/crawler/kiss/kiss-crawler-bin.zip">binary version</a>.
65       </p>
66       <p>
67         The latest source can be obtained from subversion with the 
68         URL <code>https://wamblee.org/svn/public/utils</code>. The subversion 
69         repository allows read-only access to anyone. 
70       </p>
71     </section>
72     
73     <section>
74       <title>Configuring the crawler</title>
75       
76       <p>
77         The crawler comes with three configuration files:
78       </p>
79       <ul>
80         <li><code>crawler.xml</code>: basic crawler configuration
81           tailored to the KiSS electronic programme guide.</li>
82         <li><code>programs.xml</code>: containing a description of which 
83           programs must be recorded and which programs are interesting.</li>
84         <li><code>org.wamblee.crawler.properties</code>: Containing a configuration of 
85           how to notify users of results. </li>
86       </ul>
87    
88       
89       <section>
90         <title>Crawler configuration <code>crawler.xml</code></title>
91         
92         <p>
93           First of all, copy the <code>config.xml.example</code> file 
94           to <code>config.xml</code>. After that, edit the first entry of 
95           that file and replace <code>user</code> and <code>passwd</code>
96           with your personal user id and password for the KiSS Electronic
97           Programme Guide. 
98         </p>
99       </section>
100
101         <section>
102           <title>Program configuration</title>
103           <p>
104             Interesting TV shows are described using <code>program</code>
105             elements. Each <code>program</code> element contains 
106             one or more <code>match</code> elements that describe 
107             a condition that the interesting program must match. 
108           </p>
109           <p>
110             Matching can be done on the following properties of a program:
111           </p>
112           <table>
113             <tr><th>Field name</th>
114             <th>Description</th></tr>
115             <tr>
116               <td>name</td>
117               <td>Program name</td>
118             </tr>
119             <tr>
120               <td>description</td>
121               <td>Program description</td>
122             </tr>
123             <tr>
124               <td>channel</td>
125               <td>Channel name</td>
126             </tr>
127             <tr>
128               <td>keywords</td>
129               <td>Keywords/classification of the program.</td>
130             </tr>
131           </table>
132           <p>
133             The field to match is specified using the <code>field</code>
134             attribute of the <code>match</code> element. If no field name 
135             is specified then the program name is matched. Matching is done
136             by converting the field value to lowercase and then doing a 
137             perl-like regular expression match of the provided value. As a
138             result, the content of the match element should be specified in 
139             lower case otherwise the pattern will never match.
140             If multiple <code>match</code> elements are specified for a 
141             given <code>program</code> element, then all matches must 
142             apply for a program to be interesting. 
143           </p>
144           <p>
145             Example patterns:
146           </p>
147           <table>
148             <tr>
149               <th>Pattern</th>
150               <th>Example of matching field values</th>
151             </tr>
152             <tr>
153               <td>the.*x.*files</td>
154               <td>"The X files", "The X-Files: the making of"</td>
155             </tr>
156             <tr>
157               <td>star trek</td>
158               <td>"Star Trek Voyager", "Star Trek: The next generation"</td>
159             </tr>
160           </table>
161           
162           <p>
163             It is possible that different programs cannot be recorded 
164             since they overlap. To deal with such conflicts, it is possible
165             to specify a priority using the <code>priority</code> element. 
166             Higher values of the priority value mean a higher priority. 
167             If two programs have the same priority, then it is (more or less)
168             unspecified which of the two will be recorded, but it will at least
169             record one program. If no priority is specified, then the
170             priority is 1 (one).
171           </p>
172           
173           <p>
174             Since it is not always desirable to try to record every
175             program that matches the criteria, it is also possible to 
176             generate notifications for interesting programs only without
177             recording them. This is done by specifying the 
178             <code>action</code> alement with the content <code>notify</code>.
179             By default, the <code>action</code> is <code>record</code>. 
180             To make the mail reports more readable it is possible to 
181             also assign a category to a program for grouping interesting
182             programs. This can be done using the <code>category</code>
183             element. Note that if the <code>action</code> is 
184             <code>notify</code>. then the <code>priority</code> element
185             is not used. 
186           </p>
187           
188         </section>
189       
190       <section>
191         <title>Notification configuration</title>
192         <p>
193            Edit the configuration file <code>org.wamblee.crawler.properties</code>. 
194           The properties file is self-explanatory. 
195         </p>
196       </section>
197     </section>
198     
199    
200     
201     
202     <section>
203       <title>Installing and running the crawler</title>
204       
205       <section>
206         <title>Binary distribution</title>
207         <p>
208           In the binary distribution, execute the 
209           <code>run</code> script for your operating system
210           (<code>run.bat</code> for windows, and 
211           <code>run.sh</code> for unix). 
212         </p>
213       </section>
214       
215       <section>
216         <title>Source distribution</title>
217         <p>
218           With the source code, build everything with 
219           <code>ant dist-lite</code>, then locate the binary
220           distribution in <code>lib/wamblee/crawler/kiss/kiss-crawler-bin.zip</code>.
221           Then proceed as for the binary distribution. 
222         </p>
223       </section>
224       
225       <section>
226         <title>General usage</title>
227         <p>
228           The crawler, as it is now, is s standalone program which is 
229           intended to be run from a command-line. When it runs, it 
230           retrieves the programs for today. As a result, it is advisable 
231           to run the program at an early point of the day as a scheduled
232           task (e.g. cron on unix). 
233         </p>
234         <p>
235           Modifying the program to allow it to investigate tomorrow's
236           programs instead is easy as well but not yet implemented. 
237         </p>
238       </section>
239       
240       
241     </section>
242
243     <section id="examples">
244       <title>Examples</title>
245     
246       <p>
247         The best example is in the distribution itself. It is my personal
248         <code>programs.xml</code> file. 
249       </p>
250     </section>
251     
252     <section>
253       <title>Contributing</title>
254       
255       <p>
256         You are always welcome to contribute. If you find a problem just 
257         tell me about it and if you have ideas am I always interested to 
258         hear about them. 
259       </p>
260       <p>
261         If you are a programmer and have a fix for a bug, just send me a
262         patch and if you are fanatic enough and have ideas, I can also 
263         give you write access to the repository. 
264       </p>
265     </section>
266     
267     
268   </body>
269 </document>