From 2641f64500327974e1157b9b09cb38337560aaf4 Mon Sep 17 00:00:00 2001 From: erik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0> Date: Sun, 30 Apr 2006 21:12:28 +0000 Subject: [PATCH] --- crawler/kiss/build.xml | 2 +- crawler/kiss/conf/kiss/notification.xml | 34 ------------ crawler/kiss/conf/kiss/programs.xml | 14 ----- crawler/kiss/conf/kiss/run.sh | 2 +- crawler/kiss/docs/content/xdocs/index.xml | 52 ++++++++----------- crawler/kiss/src/crawler-standalone.xml | 3 +- .../src/org.wamblee.crawler.notification.xml | 14 ++--- crawler/kissweb/src/beanRefContext.xml | 1 + 8 files changed, 33 insertions(+), 89 deletions(-) delete mode 100644 crawler/kiss/conf/kiss/notification.xml rename crawler/{kissweb => kiss}/src/org.wamblee.crawler.notification.xml (62%) diff --git a/crawler/kiss/build.xml b/crawler/kiss/build.xml index bae9b1e1..0b32f188 100644 --- a/crawler/kiss/build.xml +++ b/crawler/kiss/build.xml @@ -48,7 +48,7 @@ <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> diff --git a/crawler/kiss/conf/kiss/notification.xml b/crawler/kiss/conf/kiss/notification.xml deleted file mode 100644 index 29148da6..00000000 --- a/crawler/kiss/conf/kiss/notification.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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 diff --git a/crawler/kiss/conf/kiss/programs.xml b/crawler/kiss/conf/kiss/programs.xml index ac87857b..6236688c 100644 --- a/crawler/kiss/conf/kiss/programs.xml +++ b/crawler/kiss/conf/kiss/programs.xml @@ -1,19 +1,5 @@ <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> diff --git a/crawler/kiss/conf/kiss/run.sh b/crawler/kiss/conf/kiss/run.sh index f04c0742..e6280b4b 100755 --- a/crawler/kiss/conf/kiss/run.sh +++ b/crawler/kiss/conf/kiss/run.sh @@ -2,7 +2,7 @@ cd $( dirname $0 )/../conf -CP="" +CP="." for i in ../lib/*.jar do CP="$i:$CP" diff --git a/crawler/kiss/docs/content/xdocs/index.xml b/crawler/kiss/docs/content/xdocs/index.xml index d2cc2149..18b1d616 100644 --- a/crawler/kiss/docs/content/xdocs/index.xml +++ b/crawler/kiss/docs/content/xdocs/index.xml @@ -74,9 +74,17 @@ <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> @@ -89,33 +97,7 @@ 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> @@ -204,11 +186,19 @@ </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> diff --git a/crawler/kiss/src/crawler-standalone.xml b/crawler/kiss/src/crawler-standalone.xml index e19c9248..860240bb 100644 --- a/crawler/kiss/src/crawler-standalone.xml +++ b/crawler/kiss/src/crawler-standalone.xml @@ -7,7 +7,8 @@ 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> diff --git a/crawler/kissweb/src/org.wamblee.crawler.notification.xml b/crawler/kiss/src/org.wamblee.crawler.notification.xml similarity index 62% rename from crawler/kissweb/src/org.wamblee.crawler.notification.xml rename to crawler/kiss/src/org.wamblee.crawler.notification.xml index 29148da6..3b8d58a3 100644 --- a/crawler/kissweb/src/org.wamblee.crawler.notification.xml +++ b/crawler/kiss/src/org.wamblee.crawler.notification.xml @@ -6,10 +6,10 @@ <!-- 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" @@ -23,9 +23,9 @@ <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> diff --git a/crawler/kissweb/src/beanRefContext.xml b/crawler/kissweb/src/beanRefContext.xml index f1a89bd4..2e139dbc 100644 --- a/crawler/kissweb/src/beanRefContext.xml +++ b/crawler/kissweb/src/beanRefContext.xml @@ -7,6 +7,7 @@ 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> -- 2.31.1