documentation is now in its first acceptable form. Ready for
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 18 Apr 2006 21:47:33 +0000 (21:47 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 18 Apr 2006 21:47:33 +0000 (21:47 +0000)
publication.

crawler/kiss/build.xml
crawler/kiss/conf/kiss/config.xml.example
crawler/kiss/conf/kiss/programs.xml
crawler/kiss/docs/content/xdocs/index.xml
crawler/kiss/docs/sitemap.xmap

index 234ed57067e4e5db0117b672af7b29d6dddcfacf..59ba0ab0d45bb09077f5c61e83538640c8c861bb 100644 (file)
@@ -53,7 +53,7 @@
                <fileset dir="${module.build.dir}" includes="**/*.jar"/>
          </copy>
          
                <fileset dir="${module.build.dir}" includes="**/*.jar"/>
          </copy>
          
-         <zip destfile="${module.build.dir}/kiss-crawler.zip"
+         <zip destfile="${module.dist.dir}/kiss-crawler-bin.zip"
               basedir="${module.install.dir}"/>
        </target>
                        
               basedir="${module.install.dir}"/>
        </target>
                        
index e3d2d9232bb8f5654c8a5b8c2160c783d8d775e1..4aeb5af82ad8ef3a18b4b45e30c8a3b1fc4ee780 100644 (file)
@@ -1,9 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <crawler>
 
 <?xml version="1.0" encoding="UTF-8"?>
 <crawler>
 
+    <url>
+        <pattern>http://epg.kml.kiss-technology.com/login_core.php</pattern>
+        <method>post</method>
+        <xslt>login.xsl</xslt>
+        <param name="user" value="erik@bladibla"/>
+        <param name="passwd" value="dkdkdk"/>
+        <param name="GMode" value="TextMode"/>
+        <param name="submit" value="Login"/>
+    </url>
+    
     <type> 
         <pattern>channels-favorites</pattern>
     <type> 
         <pattern>channels-favorites</pattern>
-           <xslt>channels-favorites.xsl</xslt>
+           <xslt>channels-fav orites.xsl</xslt>
     </type>
     
     <type>
     </type>
     
     <type>
        </type>
     
     
        </type>
     
     
-    <url>
-        <pattern>http://epg.kml.kiss-technology.com/login_core.php</pattern>
-        <method>post</method>
-        <xslt>login.xsl</xslt>
-        <param name="user" value="erik@bladibla"/>
-        <param name="passwd" value="dkdkdk"/>
-        <param name="GMode" value="TextMode"/>
-        <param name="submit" value="Login"/>
-    </url>
-    
     <url>
         <pattern>.*</pattern>
         <method>get</method>
     <url>
         <pattern>.*</pattern>
         <method>get</method>
index 8c8850d78d69ab3679136bae7dae7e50e0930d08..267a675142f9de6bbd094af70b92de928dc1a968 100644 (file)
@@ -7,6 +7,8 @@
     <smtp>
       <host>falcon</host>
       <port>25</port>
     <smtp>
       <host>falcon</host>
       <port>25</port>
+         <!-- username>blah</username -->
+         <!-- password>pwd</password -->
     </smtp>
     <format>
       <html>reportToHtml.xsl</html>
     </smtp>
     <format>
       <html>reportToHtml.xsl</html>
index 4afa8fd584e4ab2f76ed26385d5cf4ec8f04f371..3dc5b2572b9e54718f429ee63765dc5dd68b6fb4 100644 (file)
@@ -18,7 +18,7 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
 <document> 
   <header> 
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
 <document> 
   <header> 
-    <title>Automatic recording for KiSS hard disk recorders</title> 
+    <title>Automatic Recording for KiSS Hard Disk Recorders</title> 
   </header> 
   <body> 
     <section id="overview">
   </header> 
   <body> 
     <section id="overview">
@@ -38,7 +38,7 @@
         patterns. Often you are looking for the same programs and for certain
         types of programs. So, wouldn't it be nice to have a program 
         do this work for you and automatically record programs and notify you
         patterns. Often you are looking for the same programs and for certain
         types of programs. So, wouldn't it be nice to have a program 
         do this work for you and automatically record programs and notify you
-        of possibly interesting ones
+        of possibly interesting ones?
       </p>
       <p>
         This is where the KiSS crawler comes in. This is a simple crawler which 
       </p>
       <p>
         This is where the KiSS crawler comes in. This is a simple crawler which 
         programme information from there. Then based on that it automatically
         records programs for you or sends notifications about interesting ones.
       </p>
         programme information from there. Then based on that it automatically
         records programs for you or sends notifications about interesting ones.
       </p>
+      <p>
+        In its current version, the crawler can be used a standalone program
+        only and the preferred way to run it is as a scheduled task. 
+      </p>
     </section>
     
     <section>
       <title>Downloading</title>
     </section>
     
     <section>
       <title>Downloading</title>
+      
+      <p>
+        At this moment, no formal releases have been made and only the latest
+        version can be downloaded. 
+      </p>
+      <p>
+        The easy way to start is the 
+        <a href="installs/crawler/kiss/kiss-crawler-bin.zip">binary version</a>.
+      </p>
+      <p>
+        The latest source can be obtained from subversion with the 
+        URL <code>https://wamblee.org/svn/public/utils</code>. The subversion 
+        repository allows read-only access to anyone. 
+      </p>
     </section>
     
     <section>
       <title>Configuring the crawler</title>
     </section>
     
     <section>
       <title>Configuring the crawler</title>
+      
+      <p>
+        The crawler comes with two configuration files, namely 
+        <code>crawler.xml</code> and <code>programs.xml</code>. 
+      </p>
+      
+      <section>
+        <title>Crawler configuration <code>crawler.xml</code></title>
+        
+        <p>
+          First of all, copy the <code>config.xml.example</code> file 
+          to <code>config.xml</code>. After that, edit the first entry of 
+          that file and replace <code>user</code> and <code>passwd</code>
+          with your personal user id and password for the KiSS Electronic
+          Programme Guide. 
+        </p>
+      </section>
+      
+      <section>
+        <title>Program configuration: <code>programs.xml</code></title>
+        
+        <p>
+          The <code>programs.xml</code> file contains the following 
+          configuration items: 
+        </p>
+        <ul>
+          <li>Notification configuration: Describing how to 
+            do notification of the results of crawling the site. </li>
+          <li>Zero or more configurations of interesting programs.  </li>
+        </ul>
+        <section>
+          <title>Notification configuration</title>
+          <p>
+            Notification is configured in the (surprise, surprise!) 
+            <code>notification</code> element. This notification element 
+            is used to configure respectively sender mail address (= reply 
+            address), recipient address, subject of the email, smtp server
+            host and port and optional username and password. 
+            In addition it contains the names of the stylesheets to 
+            generate the HTML and Text reports. These stylesheets 
+            should not be changed. 
+          </p>
+        </section>
+        
+        <section>
+          <title>Program configuration</title>
+          <p>
+            Interesting TV shows are described using <code>program</code>
+            elements. Each <code>program</code> element contains 
+            one or more <code>match</code> elements that describe 
+            a condition that the interesting program must match. 
+          </p>
+          <p>
+            Matching can be done on the following properties of a program:
+          </p>
+          <table>
+            <tr><th>Field name</th>
+            <th>Description</th></tr>
+            <tr>
+              <td>name</td>
+              <td>Program name</td>
+            </tr>
+            <tr>
+              <td>description</td>
+              <td>Program description</td>
+            </tr>
+            <tr>
+              <td>channel</td>
+              <td>Channel name</td>
+            </tr>
+            <tr>
+              <td>keywords</td>
+              <td>Keywords/classification of the program.</td>
+            </tr>
+          </table>
+          <p>
+            The field to match is specified using the <code>field</code>
+            attribute of the <code>match</code> element. If no field name 
+            is specified then the program name is matched. Matching is done
+            by converting the field value to lowercase and then doing a 
+            perl-like regular expression match of the provided value. As a
+            result, the content of the match element should be specified in 
+            lower case otherwise the pattern will never match.
+            If multiple <code>match</code> elements are specified for a 
+            given <code>program</code> element, then all matches must 
+            apply for a program to be interesting. 
+          </p>
+          <p>
+            Example patterns:
+          </p>
+          <table>
+            <tr>
+              <th>Pattern</th>
+              <th>Example of matching field values</th>
+            </tr>
+            <tr>
+              <td>the.*x.*files</td>
+              <td>"The X files", "The X-Files: the making of"</td>
+            </tr>
+            <tr>
+              <td>star trek</td>
+              <td>"Star Trek Voyager", "Star Trek: The next generation"</td>
+            </tr>
+          </table>
+          
+          <p>
+            It is possible that different programs cannot be recorded at
+            since they overlap. To deal with such conflicts, it is possible
+            to specify a priority using the <code>priority</code> element. 
+            Higher values of the priority value mean a higher priority. 
+            If two programs have the same priority, then it is (more or less)
+            unspecified which of the two will be recorded, but it will at least
+            record one program. If no priority is specified, then the
+            priority is 1 (one).
+          </p>
+          
+          <p>
+            Since it is not always desirable to try to record every
+            program that matches the criteria, it is also possible to 
+            generate notifications for interesting programs only without
+            recording them. This is done by specifying the 
+            <code>action</code> alement with the content <code>notify</code>.
+            By default, the <code>action</code> is <code>record</code>. 
+            To make the mail reports more readable it is possible to 
+            also assign a category to a program for grouping interesting
+            programs. This can be done using the <code>category</code>
+            element. Note that if the <code>action</code> is 
+            <code>notify</code>. then the <code>priority</code> element
+            is not used. 
+          </p>
+          
+        </section>
+        
+        
+      </section>
     </section>
     
     <section>
       <title>Installing and running the crawler</title>
     </section>
     
     <section>
       <title>Installing and running the crawler</title>
+      
+      <section>
+        <title>Binary distribution</title>
+        <p>
+          In the binary distribution, execute the 
+          <code>run</code> script for your operating system
+          (<code>run.bat</code> for windows, and 
+          <code>run.sh</code> for unix). 
+        </p>
+      </section>
+      
+      <section>
+        <title>Source distribution</title>
+        <p>
+          With the source code, build everything with 
+          <code>ant dist-lite</code>, then locate the binary
+          distribution in <code>lib/wamblee/crawler/kiss/kiss-crawler-bin.zip</code>.
+          Then proceed as for the binary distribution. 
+        </p>
+      </section>
+      
+      <section>
+        <title>General usage</title>
+        <p>
+          The crawler, as it is now, is s standalone program which is 
+          intended to be run from a command-line. When it runs, it 
+          retrieves the programs for today. As a result, it is advisable 
+          to run the program at an early point of the day as a scheduled
+          task (e.g. cron on unix). 
+        </p>
+        <p>
+          Modifying the program to allow it to investigate tomorrow's
+          programs instead is easy as well but not yet implemented. 
+        </p>
+      </section>
+      
+      
     </section>
 
     <section id="examples">
       <title>Examples</title>
     
     </section>
 
     <section id="examples">
       <title>Examples</title>
     
+      <p>
+        The best example is in the distribution itself. It is my personal
+        <code>programs.xml</code> file. 
+      </p>
     </section>
     
     <section>
       <title>Contributing</title>
     </section>
     
     <section>
       <title>Contributing</title>
+      
+      <p>
+        You are always welcome to contribute. If you find a problem just 
+        tell me about it and if you have ideas am I always interested to 
+        hear about them. 
+      </p>
+      <p>
+        If you are a programmer and have a fix for a bug, just send me a
+        patch and if you are fanatic enough and have ideas, I can also 
+        give you write access to the repository. 
+      </p>
     </section>
     
     
     </section>
     
     
index f32221a4be4421ea4338cb9f9df79309f77ce5a1..262f781be07e4d39e41f8dcb5a48b160c6cefa4b 100644 (file)
       </map:when>
      </map:select>
    </map:match>
       </map:when>
      </map:select>
    </map:match>
+   
+   
+   <map:match pattern="installs/**">
+     <map:read src="../../../lib/wamblee/{1}"/>
+   </map:match>     
   
    <map:match pattern="**.xml">
       <map:call resource="transform-to-document">
   
    <map:match pattern="**.xml">
       <map:call resource="transform-to-document">