<fileset dir="conf/kiss">
<include name="config.xml.example"/>
<include name="programs.xml"/>
- <include name="notification.xml"/>
+ <include name="org.wamblee.crawler.properties"/>
</fileset>
</copy>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
-<beans>
-
- <!-- Mail server configuration -->
- <bean id="org.wamblee.crawler.kiss.notification.MailServer"
- class="org.wamblee.crawler.kiss.notification.MailServer">
- <constructor-arg><value>falcon</value></constructor-arg>
- <constructor-arg><value type="int">25</value></constructor-arg>
- <constructor-arg><null/></constructor-arg> <!-- username -->
- <constructor-arg><null/></constructor-arg> <!-- password -->
- </bean>
-
- <bean id="org.wamblee.xml.ClasspathUriResolver"
- class="org.wamblee.xml.ClasspathUriResolver">
- </bean>
-
- <bean id="org.wamblee.xml.XslTransformer"
- class="org.wamblee.xml.XslTransformer">
- <constructor-arg><ref local="org.wamblee.xml.ClasspathUriResolver"/></constructor-arg>
- </bean>
-
- <bean id="org.wamblee.crawler.kiss.notification.Notifier"
- class="org.wamblee.crawler.kiss.notification.MailNotifier">
- <constructor-arg><value>kiss@brakkee.org</value></constructor-arg>
- <constructor-arg><value>erik@brakkee.org</value></constructor-arg>
- <constructor-arg><value>Recording summary for today</value></constructor-arg>
- <constructor-arg><value>reportToHtml.xsl</value></constructor-arg>
- <constructor-arg><value>reportToText.xsl</value></constructor-arg>
- <constructor-arg><ref local="org.wamblee.crawler.kiss.notification.MailServer"/></constructor-arg>
- <constructor-arg><ref local="org.wamblee.xml.XslTransformer"/></constructor-arg>
- </bean>
-</beans>
\ No newline at end of file
<programs>
- <notification>
- <from>kiss@brakkee.org</from>
- <to>erik@brakkee.org</to>
- <subject>Recording summary for today</subject>
- <smtp>
- <host>falcon</host>
- <port>25</port>
- </smtp>
- <format>
- <html>reportToHtml.xsl</html>
- <text>reportToText.xsl</text>
- </format>
- </notification>
-
<program>
<category>horror</category>
<action>notify</action>
cd $( dirname $0 )/../conf
-CP=""
+CP="."
for i in ../lib/*.jar
do
CP="$i:$CP"
<title>Configuring the crawler</title>
<p>
- The crawler comes with two configuration files, namely
- <code>crawler.xml</code> and <code>programs.xml</code>.
+ The crawler comes with three configuration files:
</p>
+ <ul>
+ <li><code>crawler.xml</code>: basic crawler configuration
+ tailored to the KiSS electronic programme guide.</li>
+ <li><code>programs.xml</code>: containing a description of which
+ programs must be recorded and which programs are interesting.</li>
+ <li><code>org.wamblee.crawler.properties</code>: Containing a configuration of
+ how to notify users of results. </li>
+ </ul>
+
<section>
<title>Crawler configuration <code>crawler.xml</code></title>
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>
</p>
</section>
-
-
+
+ <section>
+ <title>Notification configuration</title>
+ <p>
+ Edit the configuration file <code>org.wamblee.crawler.properties</code>.
+ The properties file is self-explanatory.
+ </p>
</section>
</section>
+
+
+
<section>
<title>Installing and running the crawler</title>
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
- <value>file:notification.xml</value>
+ <value>org.wamblee.crawler.properties.xml</value>
+ <value>org.wamblee.crawler.notification.xml</value>
</list>
</constructor-arg>
</bean>
<!-- Mail server configuration -->
<bean id="org.wamblee.crawler.kiss.notification.MailServer"
class="org.wamblee.crawler.kiss.notification.MailServer">
- <constructor-arg><value>falcon</value></constructor-arg>
- <constructor-arg><value type="int">25</value></constructor-arg>
- <constructor-arg><null/></constructor-arg> <!-- username -->
- <constructor-arg><null/></constructor-arg> <!-- password -->
+ <constructor-arg><value>${org.wamblee.crawler.smtp.host}</value></constructor-arg>
+ <constructor-arg><value type="int">${org.wamblee.crawler.smtp.port}</value></constructor-arg>
+ <constructor-arg><value>${org.wamblee.crawler.smtp.username}</value></constructor-arg>
+ <constructor-arg><value>${org.wamblee.crawler.smtp.password}</value></constructor-arg>
</bean>
<bean id="org.wamblee.xml.ClasspathUriResolver"
<bean id="org.wamblee.crawler.kiss.notification.Notifier"
class="org.wamblee.crawler.kiss.notification.MailNotifier">
- <constructor-arg><value>kiss@brakkee.org</value></constructor-arg>
- <constructor-arg><value>erik@brakkee.org</value></constructor-arg>
- <constructor-arg><value>Recording summary for today</value></constructor-arg>
+ <constructor-arg><value>${org.wamblee.crawler.notification.from}</value></constructor-arg>
+ <constructor-arg><value>${org.wamblee.crawler.notification.to}</value></constructor-arg>
+ <constructor-arg><value>${org.wamblee.crawler.notification.subject}</value></constructor-arg>
<constructor-arg><value>reportToHtml.xsl</value></constructor-arg>
<constructor-arg><value>reportToText.xsl</value></constructor-arg>
<constructor-arg><ref local="org.wamblee.crawler.kiss.notification.MailServer"/></constructor-arg>
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
+ <value>org.wamblee.crawler.properties.xml</value>
<value>org.wamblee.crawler.notification.xml</value>
<value>org.wamblee.crawler.kiss.xml</value>
</list>