[Koha-patches] [PATCH] bug 2864 [2/2]: move rss/* to misc/cronjobs/rss/*

Galen Charlton galen.charlton at liblime.com
Mon Dec 15 16:58:47 CET 2008


As rss.pl is not a CGI script, moved it to join the
other cronjobs.  Full documentation of the script
is in misc/cronjobs/rss/rss.pl, but to summarize:

[1] rss.pl is run on the command line to produce
    an RSS XML document.  The output should be
    placed in a directory accessible to the OPAC
    (or staff) web interface so that users can download
    the RSS feed.  An example of usage:

    misc/cronjobs/rss.pl lastAcquired.conf

    Normally rss.pl should be run periodically (e.g., daily)
    to keep the feed up-to-date.

[2] The configuration file (e.g., lastAcquired.conf) lists

    * name of the template file to use
    * path of output file
    * SQL query

    rss.pl runs the SQL query, then feeds the output of the
    query through the template to produce the output file.

[3] The template file (e.g., lastAcquired.tmpl) uses
    HTML::Template syntax like any of the HTML
    templates for the web interface.
---
 Makefile.PL                             |    1 -
 misc/cronjobs/rss/README                |  102 ++++++++++++++++++++++++++++
 misc/cronjobs/rss/lastAcquired-1.0.conf |   14 ++++
 misc/cronjobs/rss/lastAcquired-1.0.tmpl |   39 +++++++++++
 misc/cronjobs/rss/lastAcquired-2.0.conf |   16 +++++
 misc/cronjobs/rss/lastAcquired-2.0.tmpl |   34 +++++++++
 misc/cronjobs/rss/lastAcquired.conf     |   15 ++++
 misc/cronjobs/rss/lastAcquired.tmpl     |   30 ++++++++
 misc/cronjobs/rss/longestUnseen.conf    |   14 ++++
 misc/cronjobs/rss/longestUnseen.tmpl    |   30 ++++++++
 misc/cronjobs/rss/mostReserved.conf     |   14 ++++
 misc/cronjobs/rss/mostReserved.tmpl     |   30 ++++++++
 misc/cronjobs/rss/rss.pl                |  112 +++++++++++++++++++++++++++++++
 misc/cronjobs/rss/sm-koha-icon.jpg      |  Bin 0 -> 1503 bytes
 rss/README                              |  102 ----------------------------
 rss/lastAcquired-1.0.conf               |   14 ----
 rss/lastAcquired-1.0.tmpl               |   39 -----------
 rss/lastAcquired-2.0.conf               |   16 -----
 rss/lastAcquired-2.0.tmpl               |   34 ---------
 rss/lastAcquired.conf                   |   15 ----
 rss/lastAcquired.tmpl                   |   30 --------
 rss/longestUnseen.conf                  |   14 ----
 rss/longestUnseen.tmpl                  |   30 --------
 rss/mostReserved.conf                   |   14 ----
 rss/mostReserved.tmpl                   |   30 --------
 rss/rss.pl                              |  112 -------------------------------
 rss/sm-koha-icon.jpg                    |  Bin 1503 -> 0 bytes
 27 files changed, 450 insertions(+), 451 deletions(-)
 create mode 100644 misc/cronjobs/rss/README
 create mode 100644 misc/cronjobs/rss/lastAcquired-1.0.conf
 create mode 100644 misc/cronjobs/rss/lastAcquired-1.0.tmpl
 create mode 100644 misc/cronjobs/rss/lastAcquired-2.0.conf
 create mode 100644 misc/cronjobs/rss/lastAcquired-2.0.tmpl
 create mode 100644 misc/cronjobs/rss/lastAcquired.conf
 create mode 100644 misc/cronjobs/rss/lastAcquired.tmpl
 create mode 100644 misc/cronjobs/rss/longestUnseen.conf
 create mode 100644 misc/cronjobs/rss/longestUnseen.tmpl
 create mode 100644 misc/cronjobs/rss/mostReserved.conf
 create mode 100644 misc/cronjobs/rss/mostReserved.tmpl
 create mode 100755 misc/cronjobs/rss/rss.pl
 create mode 100644 misc/cronjobs/rss/sm-koha-icon.jpg
 delete mode 100644 rss/README
 delete mode 100644 rss/lastAcquired-1.0.conf
 delete mode 100644 rss/lastAcquired-1.0.tmpl
 delete mode 100644 rss/lastAcquired-2.0.conf
 delete mode 100644 rss/lastAcquired-2.0.tmpl
 delete mode 100644 rss/lastAcquired.conf
 delete mode 100644 rss/lastAcquired.tmpl
 delete mode 100644 rss/longestUnseen.conf
 delete mode 100644 rss/longestUnseen.tmpl
 delete mode 100644 rss/mostReserved.conf
 delete mode 100644 rss/mostReserved.tmpl
 delete mode 100755 rss/rss.pl
 delete mode 100644 rss/sm-koha-icon.jpg

diff --git a/Makefile.PL b/Makefile.PL
index 2a13a33..8b26eb3 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -279,7 +279,6 @@ my $target_map = {
   './reviews'                   => 'INTRANET_CGI_DIR',
   './rewrite-config.PL'         => 'NONE',
   './reviews'                   => 'INTRANET_CGI_DIR',
-  './rss'                       => 'MISC_DIR', 
   './serials'                   => 'INTRANET_CGI_DIR',
   './skel'                      => 'NONE',
   './skel/var/log/koha'         => { target => 'LOG_DIR', trimdir => -1 },
diff --git a/misc/cronjobs/rss/README b/misc/cronjobs/rss/README
new file mode 100644
index 0000000..adeeda3
--- /dev/null
+++ b/misc/cronjobs/rss/README
@@ -0,0 +1,102 @@
+About:
+rss.pl is meant to provide an extensible tool for creating RSS 0.91
+formatted files suitable for syndication.  The script relies on two
+external files for configuration information.  Rather than trying to
+explain how this occurs, I'll show you using the provided lastAcquired
+files.  There are currently three rss feeds bundled in this tarball
+(lastAcquired, longestUnseen, and mostReserved), the config files for 
+each of these should be modified to suit your local site.  A smallish 
+Koha image (sm-koha-icon.jpg) is included as well.
+
+Dependencies:
+rss.pl depends on an installed Koha system, and uses the C4::Context
+module it provides.
+
+Details:
+rss.pl is meant to be run from cron (probably once a day or so -- more
+often at larger libraries depending on the report being generated).  It 
+is invoked like this (in the case of lastAcquired):
+
+ rss.pl /path/to/rssKoha/lastAcquired.conf 
+
+The basic process is that rss reads the config file
+(lastAcquired.conf) to determine RSS header information, the SQL query
+used to generate the results, and the HTML::Template style used to
+format the output.  Since you'll likely to want to create your own RSS
+content, or at least modify the ones present here, let's review the
+config file and the template file.
+
+A config file is divided into three sections; channel, image, and
+config.  A section begins with the name of the section occuring alone
+on a line, and ends with the beginning of the next section (or the end
+of the file).  Each of these sections contains series of configuration
+options in the form:
+
+name=content
+
+The content section can contain spaces, but not newlines, special
+characters, or html mark-up.  It's also important that there are no
+blank lines within the config file.
+
+Here's the lastAquired.conf by way of example: 
+
+channel
+title=Recent Koha Acquisitions
+link=http://www.koha.org
+desc=The 15 most recent acquisitions
+lang=en
+lastBuild=Fri, 09 May 2003 08:00:00
+image
+title=Koha, the worlds best Open Source Library System
+url=http://www.koha.org/images/foo.jpg
+link=http://www.koha.org
+config
+tmpl=lastAcquired.tmpl
+output=lastAcquired.xml
+query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
+
+
+This data (and the data acquired from the query) are then used to fill
+in the template.  Most of the template is boilerplate and should not
+be edited.  The section within the <TMPL_LOOP NAME=ITEMS>
+... </TMPL_LOOP> is the part which can be modified to create your own
+RSS content.  
+
+Here's the lastAcquired.tmpl file:
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
+	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
+
+<rss version="0.91">
+
+<channel>
+ <title><TMPL_VAR CHANNELTITLE></title>
+ <link><TMPL_VAR CHANNELLINK></link>
+ <description><TMPL_VAR CHANNELDESC></description>
+ <language><TMPL_VAR CHANNELLANG></language>
+ <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
+
+ <image>
+  <title><TMPL_VAR IMAGETITLE></title>
+  <url><TMPL_VAR IMAGEURL></url>
+  <link><TMPL_VAR IMAGELINK></link>
+ </image>
+
+<TMPL_LOOP NAME=ITEMS>
+ <item>
+  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
+  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
+
+ </item>
+</TMPL_LOOP>
+
+</channel>
+</rss>
+
+Credits:
+Originally written by Pat Eyler (pate at eylerfamily.org), suggestions,
+advice, and help came from 'Content Syndication with RSS', Chris
+Cormack, Mike Hansen, Steve Tonnesen and a variety of folks on #koha at 
+irc.katipo.co.nz.
diff --git a/misc/cronjobs/rss/lastAcquired-1.0.conf b/misc/cronjobs/rss/lastAcquired-1.0.conf
new file mode 100644
index 0000000..44036d8
--- /dev/null
+++ b/misc/cronjobs/rss/lastAcquired-1.0.conf
@@ -0,0 +1,14 @@
+channel
+title=Recent Acquisitions
+link=http://www.koha.org
+desc=The library's 15 most recent acquisitions
+lang=en
+image
+title=Koha, the worlds best Open Source Library System
+url=http://www.koha.org/images/foo.jpg
+link=http://www.koha.org
+description=Koha, the worlds best Open Source Library System
+config
+tmpl=lastAcquired-1.0.tmpl
+output=lastAcquired-1.0.xml
+query=select biblio.title as title, biblio.author as author, biblio.biblionumber, biblio.notes as notes, biblioitems.place as place, biblioitems.publishercode as publishercode, biblioitems.publicationyear as publicationyear, biblioitems.pages as pages, biblioitems.illus as illus, biblioitems.size as size from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
diff --git a/misc/cronjobs/rss/lastAcquired-1.0.tmpl b/misc/cronjobs/rss/lastAcquired-1.0.tmpl
new file mode 100644
index 0000000..6bd4780
--- /dev/null
+++ b/misc/cronjobs/rss/lastAcquired-1.0.tmpl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<rdf:RDF 
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns="http://purl.org/rss/1.0/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+>
+  <channel rdf:about="<!-- TMPL_VAR NAME="CHANNELLINK" -->">
+	<title><!-- TMPL_VAR NAME="CHANNELTITLE" --></title>
+	<link><!-- TMPL_VAR NAME="CHANNELLINK" --></link>
+	<description><!-- TMPL_VAR NAME="CHANNELDESC" --></description>
+	<language><!-- TMPL_VAR NAME="CHANNELLANG" --></language>
+	<lastBuildDate><!-- TMPL_VAR NAME="CHANNELLASTBUILD" --></lastBuildDate>
+	 <image rdf:about="<!-- TMPL_VAR NAME="IMAGEURL" -->">
+	  <title><!-- TMPL_VAR NAME="IMAGETITLE" --></title>
+	  <url><!-- TMPL_VAR NAME="IMAGEURL" --></url>
+	  <link><!-- TMPL_VAR NAME="IMAGELINK" --></link>
+	 </image>
+    <items>
+      <rdf:Seq>
+	  <!-- TMPL_LOOP NAME="ITEMS" -->
+        <rdf:li resource="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"/>
+	 <!-- /TMPL_LOOP -->
+      </rdf:Seq>
+    </items>
+</channel>
+
+  <!-- TMPL_LOOP NAME="ITEMS" -->
+  <item rdf:about="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
+  <title><!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR AUTHOR --><!-- /TMPL_IF --></title>
+  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" --></link>
+<description><![CDATA[<!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF -->
+<br><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" -->
+<br><!-- TMPL_VAR NAME="pages" --><!-- TMPL_VAR NAME="illus" --><!-- TMPL_VAR NAME="size" -->
+<!-- TMPL_IF NAME="notes" --><br><br><!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><br>
+<a href="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">View Details</a> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserve this Item</a><!-- TMPL_IF NAME="author" --> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-search.pl?marclist=biblio.author&amp;and_or=and&amp;excluding=&amp;operator=contains&amp;value=<!-- TMPL_VAR NAME="author" -->&amp;resultsperpage=20&amp;orderby=biblio.title&amp;op=do_search">More by this Author</a><!-- /TMPL_IF -->
+]]></description>
+ </item>
+<!-- /TMPL_LOOP -->
+</rdf:RDF>
diff --git a/misc/cronjobs/rss/lastAcquired-2.0.conf b/misc/cronjobs/rss/lastAcquired-2.0.conf
new file mode 100644
index 0000000..5e6a1b5
--- /dev/null
+++ b/misc/cronjobs/rss/lastAcquired-2.0.conf
@@ -0,0 +1,16 @@
+channel
+title=Recent Acquisitions
+link=http://www.koha.org
+desc=The library's 15 most recent acquisitions
+lang=en
+image
+title=Koha, the worlds best Open Source Library System
+url=http://www.koha.org/images/foo.jpg
+link=http://www.koha.org
+description=Koha, the worlds best Open Source Library System
+width=88
+height=31
+config
+tmpl=lastAcquired-2.0.tmpl
+output=lastAcquired-2.0.xml
+query=select biblio.title as title, biblio.author as author, biblio.biblionumber, biblio.notes as notes, biblioitems.place as place, biblioitems.publishercode as publishercode, biblioitems.publicationyear as publicationyear, biblioitems.pages as pages, biblioitems.illus as illus, biblioitems.size as size from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
diff --git a/misc/cronjobs/rss/lastAcquired-2.0.tmpl b/misc/cronjobs/rss/lastAcquired-2.0.tmpl
new file mode 100644
index 0000000..f90942f
--- /dev/null
+++ b/misc/cronjobs/rss/lastAcquired-2.0.tmpl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+	<channel>
+		<title><!-- TMPL_VAR NAME="CHANNELTITLE" --></title>
+		<link><!-- TMPL_VAR NAME="CHANNELLINK" --></link>
+		<description><!-- TMPL_VAR NAME="CHANNELDESC" --></description>
+		<language><!-- TMPL_VAR NAME="CHANNELLANG" --></language>
+		<lastBuildDate><!-- TMPL_VAR NAME="CHANNELLASTBUILD" --></lastBuildDate>
+		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
+		<generator>Koha</generator>
+		<image>
+			<title><!-- TMPL_VAR NAME="IMAGETITLE" --></title>
+			<url><!-- TMPL_VAR NAME="IMAGEURL" --></url>
+			<link><!-- TMPL_VAR NAME="IMAGELINK" --></link>
+			<width><!-- TMPL_VAR NAME="IMAGEWIDTH" --></width>
+			<height><!-- TMPL_VAR NAME="IMAGEHEIGHT" --></height>
+			<description><!-- TMPL_VAR NAME="IMAGEDESCRIPTION" --></description>
+		</image>
+
+<!-- TMPL_LOOP NAME="ITEMS" -->
+ <item>
+  <title><!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF --></title>
+  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" --></link>
+<description><![CDATA[<!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF -->
+<br><!-- TMPL_IF NAME="publishercode" --><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" --><br><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="pages" --><!-- TMPL_VAR NAME="pages" --><!-- TMPL_VAR NAME="illus" --><!-- TMPL_VAR NAME="size" --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF --><br>
+<a href="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">View Details</a> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserve this Item</a><!-- TMPL_IF NAME="author" --> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-search.pl?marclist=biblio.author&amp;and_or=and&amp;excluding=&amp;operator=contains&amp;value=<!-- TMPL_VAR NAME="author" -->&amp;resultsperpage=20&amp;orderby=biblio.title&amp;op=do_search">More by this Author</a><!-- /TMPL_IF -->
+]]></description>
+ </item>
+<!-- /TMPL_LOOP -->
+
+</channel>
+</rss>
diff --git a/misc/cronjobs/rss/lastAcquired.conf b/misc/cronjobs/rss/lastAcquired.conf
new file mode 100644
index 0000000..4ae696a
--- /dev/null
+++ b/misc/cronjobs/rss/lastAcquired.conf
@@ -0,0 +1,15 @@
+channel
+title=Recent Koha Acquisitions
+link=http://www.koha.org
+desc=The 15 most recent acquisitions
+lang=en
+lastBuild=Fri, 09 May 2003 08:00:00
+image
+title=Koha, the world's best Open Source Library System
+url=http://www.koha.org/images/foo.jpg
+link=http://www.koha.org
+config
+tmpl=lastAcquired.tmpl
+output=lastAcquired.xml
+query=select biblio.title as title, biblio.author as author, biblio.biblionumber from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
+
diff --git a/misc/cronjobs/rss/lastAcquired.tmpl b/misc/cronjobs/rss/lastAcquired.tmpl
new file mode 100644
index 0000000..b47cd18
--- /dev/null
+++ b/misc/cronjobs/rss/lastAcquired.tmpl
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
+	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
+
+<rss version="0.91">
+
+<channel>
+ <title><TMPL_VAR CHANNELTITLE></title>
+ <link><TMPL_VAR CHANNELLINK></link>
+ <description><TMPL_VAR CHANNELDESC></description>
+ <language><TMPL_VAR CHANNELLANG></language>
+ <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
+
+ <image>
+  <title><TMPL_VAR IMAGETITLE></title>
+  <url><TMPL_VAR IMAGEURL></url>
+  <link><TMPL_VAR IMAGELINK></link>
+ </image>
+
+<TMPL_LOOP NAME=ITEMS>
+ <item>
+  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
+  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<TMPL_VAR NAME="biblionumber"></link>
+
+ </item>
+</TMPL_LOOP>
+
+</channel>
+</rss>
diff --git a/misc/cronjobs/rss/longestUnseen.conf b/misc/cronjobs/rss/longestUnseen.conf
new file mode 100644
index 0000000..91d7186
--- /dev/null
+++ b/misc/cronjobs/rss/longestUnseen.conf
@@ -0,0 +1,14 @@
+channel
+title=Longest Unseen Koha Items
+link=http://www.koha.org
+desc=The 15 least recently seen items
+lang=en
+image
+title=Koha, the worlds best Open Source Library System
+url=http://www.koha.org/images/foo.jpg
+link=http://www.koha.org
+config
+tmpl=longestUnseen.tmpl
+output=longestUnseen.xml
+query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.datelastseen is not NULL and items.datelastseen != items.datelastborrowed order by items.datelastseen
+
diff --git a/misc/cronjobs/rss/longestUnseen.tmpl b/misc/cronjobs/rss/longestUnseen.tmpl
new file mode 100644
index 0000000..99893bc
--- /dev/null
+++ b/misc/cronjobs/rss/longestUnseen.tmpl
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
+	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
+
+<rss version="0.91">
+
+<channel>
+ <title><TMPL_VAR CHANNELTITLE></title>
+ <link><TMPL_VAR CHANNELLINK></link>
+ <description><TMPL_VAR CHANNELDESC></description>
+ <language><TMPL_VAR CHANNELLANG></language>
+ <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
+
+ <image>
+  <title><TMPL_VAR IMAGETITLE></title>
+  <url><TMPL_VAR IMAGEURL></url>
+  <link><TMPL_VAR IMAGELINK></link>
+ </image>
+
+<TMPL_LOOP NAME=ITEMS>
+ <item>
+  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
+  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
+
+ </item>
+</TMPL_LOOP>
+
+</channel>
+</rss>
diff --git a/misc/cronjobs/rss/mostReserved.conf b/misc/cronjobs/rss/mostReserved.conf
new file mode 100644
index 0000000..437b660
--- /dev/null
+++ b/misc/cronjobs/rss/mostReserved.conf
@@ -0,0 +1,14 @@
+channel
+title=Most Reserved Items
+link=http://www.koha.org
+desc=The 15 most reserved items
+lang=en
+image
+title=Koha, the worlds best Open Source Library System
+url=http://www.koha.org/images/foo.jpg
+link=http://www.koha.org
+config
+tmpl=mostReserved.tmpl
+output=mostReserved.xml
+query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.reserves is not NULL order by items.reserves desc
+
diff --git a/misc/cronjobs/rss/mostReserved.tmpl b/misc/cronjobs/rss/mostReserved.tmpl
new file mode 100644
index 0000000..99893bc
--- /dev/null
+++ b/misc/cronjobs/rss/mostReserved.tmpl
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
+	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
+
+<rss version="0.91">
+
+<channel>
+ <title><TMPL_VAR CHANNELTITLE></title>
+ <link><TMPL_VAR CHANNELLINK></link>
+ <description><TMPL_VAR CHANNELDESC></description>
+ <language><TMPL_VAR CHANNELLANG></language>
+ <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
+
+ <image>
+  <title><TMPL_VAR IMAGETITLE></title>
+  <url><TMPL_VAR IMAGEURL></url>
+  <link><TMPL_VAR IMAGELINK></link>
+ </image>
+
+<TMPL_LOOP NAME=ITEMS>
+ <item>
+  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
+  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
+
+ </item>
+</TMPL_LOOP>
+
+</channel>
+</rss>
diff --git a/misc/cronjobs/rss/rss.pl b/misc/cronjobs/rss/rss.pl
new file mode 100755
index 0000000..4cea230
--- /dev/null
+++ b/misc/cronjobs/rss/rss.pl
@@ -0,0 +1,112 @@
+#!/usr/bin/perl
+
+# This script can be used to generate rss 0.91 files for syndication.
+
+# it should be run from cron like:
+#
+#    rss.pl config.conf
+#
+
+# Copyright 2003 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use warnings;
+
+use HTML::Template::Pro;
+use C4::Context;
+use Time::Local;
+use POSIX;
+
+my $dbh     = C4::Context->dbh;
+my $file    = $ARGV[0];
+my %config  = getConf("config");
+my $outFile = $config{"output"};
+my $feed    = HTML::Template::Pro->new( filename => $config{"tmpl"} );
+
+my %channel = getConf("channel");
+$feed->param( CHANNELTITLE     => $channel{'title'} );
+$feed->param( CHANNELLINK      => $channel{'link'} );
+$feed->param( CHANNELDESC      => $channel{'desc'} );
+$feed->param( CHANNELLANG      => $channel{'lang'} );
+$feed->param( CHANNELLASTBUILD => getDate() );
+
+my %image = getConf("image");
+$feed->param( IMAGETITLE       => $image{'title'} );
+$feed->param( IMAGEURL         => $image{'url'} );
+$feed->param( IMAGELINK        => $image{'link'} );
+$feed->param( IMAGEDESCRIPTION => $image{'description'} );
+$feed->param( IMAGEWIDTH       => $image{'width'} );
+$feed->param( IMAGEHEIGHT      => $image{'height'} );
+
+#
+# handle the items
+#
+$feed->param( ITEMS => getItems( $config{'query'} ) );
+
+open( FILE, ">$outFile" ) or die "can't open $outFile";
+print FILE $feed->output();
+close FILE;
+
+sub getDate {
+
+    #    my $date = localtime(timelocal(localtime));
+    my $date = strftime( "%a, %d %b %Y %T %Z", localtime );
+    return $date;
+}
+
+sub getConf {
+    my $section = shift;
+    my %return;
+    my $inSection = 0;
+
+    open( FILE, $file ) or die "can't open $file";
+    while (<FILE>) {
+        if ($inSection) {
+            my @line = split( /=/, $_, 2 );
+            unless ( $line[1] ) {
+                $inSection = 0;
+            } else {
+                my ( $key, $value ) = @line;
+                chomp $value;
+                $return{$key} = $value;
+            }
+        } else {
+            if ( $_ eq "$section\n" ) { $inSection = 1 }
+        }
+    }
+    close FILE;
+    return %return;
+}
+
+sub getItems {
+    my $query = shift;
+    $query .= " limit 15";
+    my $sth = $dbh->prepare($query);
+    $sth->execute;
+    my @return;
+    while ( my $data = $sth->fetchrow_hashref ) {
+        foreach my $key ( keys %$data ) {
+            my $value = $data->{$key};
+            $value = '' unless defined $value;
+            $value =~ s/\&/\&amp;/g and $data->{$key} = $value;
+        }
+        push @return, $data;
+    }
+    $sth->finish;
+    return \@return;
+}
diff --git a/misc/cronjobs/rss/sm-koha-icon.jpg b/misc/cronjobs/rss/sm-koha-icon.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..152d6c9b54d8309cd3bddbbf89b4733872bdd6cf
GIT binary patch
literal 1503
zcmb7<eLT|%9LImZ4KwC!Gt`WEm{5$(RyNNRR+Fc3o-VA&Qx2gbq&mbQRHvlEY?Ox_
zt+=~9mxolAXDd#YRFa31!fto>x_jNf_xb+$`F!8s&sRJuo&u129T*M(2!eo<WB~Cd
zplTl*926IPNb^`&T&N~1G+5J-;p{4&0PF!-85x+2v at 8q;gTrOz5Euo7ygXtnT1gS3
zj>T)JV{tf50#Q#>+fWCG)8A!aXhN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iq?k+mE&5nRC8E@%v-4cpHlT@=ld
z1B0p;l2)gc37$yJvaB##nGI%M;3{O5j7-H0Q5`tok<9ssJR%tFWI8S|q&7xddY{nM
z|E9IXi)|e-?T<;PU&v<%RwdJ`;ZpJHt8Y7f>En@&RK)w<4|6tg1%5}qWGH20eR#D+
zjtpBj-LJiK6VFF-vGcw)A#wiD`UR!s$k?0X^v-+TM-lDmRR;Q1Wue@{<36>DXv3Wo
zsp*!BImATLnxpbomHkbu5H5#TK_4}yMMXxhE_R)(RJA00`O(x#*#=*|{H%Jsp+mmc
zJ>+Rc<7>a-AeY`0zu{MQ;kt at wh-WsEk6(fb*NxH#S+yDUE+0JBIumo5B5K`Z&)_)s
zyWfp{qwh21>qu-`{ejcVGc>hI$-#Pg|L%}K5xiSfZ!G&=N5Msk>ob;sP{2I3_4K4`
zDmun(=q`e;-A#V2%4AVqn-OnVecQ<^%W_hIak(VpV7W+3A<2%Hxuo-~GNDPdG-%^4
zx?CG!VpEuwa$yL2nulh54I1m|-PuQuPE)r>vO-k_82xP<uSPykhl^MP-Rfb1!`!L!
z&Uu|LW7~8-R>NK>&ccPlj05`j at XofZTYWb=adkU19!-{-;QiWDjYtEfu}PRo&SuQD
U)01zx8?fbb9MWdjs<n9R4~;u<a{vGU

literal 0
HcmV?d00001

diff --git a/rss/README b/rss/README
deleted file mode 100644
index adeeda3..0000000
--- a/rss/README
+++ /dev/null
@@ -1,102 +0,0 @@
-About:
-rss.pl is meant to provide an extensible tool for creating RSS 0.91
-formatted files suitable for syndication.  The script relies on two
-external files for configuration information.  Rather than trying to
-explain how this occurs, I'll show you using the provided lastAcquired
-files.  There are currently three rss feeds bundled in this tarball
-(lastAcquired, longestUnseen, and mostReserved), the config files for 
-each of these should be modified to suit your local site.  A smallish 
-Koha image (sm-koha-icon.jpg) is included as well.
-
-Dependencies:
-rss.pl depends on an installed Koha system, and uses the C4::Context
-module it provides.
-
-Details:
-rss.pl is meant to be run from cron (probably once a day or so -- more
-often at larger libraries depending on the report being generated).  It 
-is invoked like this (in the case of lastAcquired):
-
- rss.pl /path/to/rssKoha/lastAcquired.conf 
-
-The basic process is that rss reads the config file
-(lastAcquired.conf) to determine RSS header information, the SQL query
-used to generate the results, and the HTML::Template style used to
-format the output.  Since you'll likely to want to create your own RSS
-content, or at least modify the ones present here, let's review the
-config file and the template file.
-
-A config file is divided into three sections; channel, image, and
-config.  A section begins with the name of the section occuring alone
-on a line, and ends with the beginning of the next section (or the end
-of the file).  Each of these sections contains series of configuration
-options in the form:
-
-name=content
-
-The content section can contain spaces, but not newlines, special
-characters, or html mark-up.  It's also important that there are no
-blank lines within the config file.
-
-Here's the lastAquired.conf by way of example: 
-
-channel
-title=Recent Koha Acquisitions
-link=http://www.koha.org
-desc=The 15 most recent acquisitions
-lang=en
-lastBuild=Fri, 09 May 2003 08:00:00
-image
-title=Koha, the worlds best Open Source Library System
-url=http://www.koha.org/images/foo.jpg
-link=http://www.koha.org
-config
-tmpl=lastAcquired.tmpl
-output=lastAcquired.xml
-query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
-
-
-This data (and the data acquired from the query) are then used to fill
-in the template.  Most of the template is boilerplate and should not
-be edited.  The section within the <TMPL_LOOP NAME=ITEMS>
-... </TMPL_LOOP> is the part which can be modified to create your own
-RSS content.  
-
-Here's the lastAcquired.tmpl file:
-
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
-	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-
-<rss version="0.91">
-
-<channel>
- <title><TMPL_VAR CHANNELTITLE></title>
- <link><TMPL_VAR CHANNELLINK></link>
- <description><TMPL_VAR CHANNELDESC></description>
- <language><TMPL_VAR CHANNELLANG></language>
- <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
-
- <image>
-  <title><TMPL_VAR IMAGETITLE></title>
-  <url><TMPL_VAR IMAGEURL></url>
-  <link><TMPL_VAR IMAGELINK></link>
- </image>
-
-<TMPL_LOOP NAME=ITEMS>
- <item>
-  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
-  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
-
- </item>
-</TMPL_LOOP>
-
-</channel>
-</rss>
-
-Credits:
-Originally written by Pat Eyler (pate at eylerfamily.org), suggestions,
-advice, and help came from 'Content Syndication with RSS', Chris
-Cormack, Mike Hansen, Steve Tonnesen and a variety of folks on #koha at 
-irc.katipo.co.nz.
diff --git a/rss/lastAcquired-1.0.conf b/rss/lastAcquired-1.0.conf
deleted file mode 100644
index 44036d8..0000000
--- a/rss/lastAcquired-1.0.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-channel
-title=Recent Acquisitions
-link=http://www.koha.org
-desc=The library's 15 most recent acquisitions
-lang=en
-image
-title=Koha, the worlds best Open Source Library System
-url=http://www.koha.org/images/foo.jpg
-link=http://www.koha.org
-description=Koha, the worlds best Open Source Library System
-config
-tmpl=lastAcquired-1.0.tmpl
-output=lastAcquired-1.0.xml
-query=select biblio.title as title, biblio.author as author, biblio.biblionumber, biblio.notes as notes, biblioitems.place as place, biblioitems.publishercode as publishercode, biblioitems.publicationyear as publicationyear, biblioitems.pages as pages, biblioitems.illus as illus, biblioitems.size as size from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
diff --git a/rss/lastAcquired-1.0.tmpl b/rss/lastAcquired-1.0.tmpl
deleted file mode 100644
index 6bd4780..0000000
--- a/rss/lastAcquired-1.0.tmpl
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<rdf:RDF 
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-  <channel rdf:about="<!-- TMPL_VAR NAME="CHANNELLINK" -->">
-	<title><!-- TMPL_VAR NAME="CHANNELTITLE" --></title>
-	<link><!-- TMPL_VAR NAME="CHANNELLINK" --></link>
-	<description><!-- TMPL_VAR NAME="CHANNELDESC" --></description>
-	<language><!-- TMPL_VAR NAME="CHANNELLANG" --></language>
-	<lastBuildDate><!-- TMPL_VAR NAME="CHANNELLASTBUILD" --></lastBuildDate>
-	 <image rdf:about="<!-- TMPL_VAR NAME="IMAGEURL" -->">
-	  <title><!-- TMPL_VAR NAME="IMAGETITLE" --></title>
-	  <url><!-- TMPL_VAR NAME="IMAGEURL" --></url>
-	  <link><!-- TMPL_VAR NAME="IMAGELINK" --></link>
-	 </image>
-    <items>
-      <rdf:Seq>
-	  <!-- TMPL_LOOP NAME="ITEMS" -->
-        <rdf:li resource="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"/>
-	 <!-- /TMPL_LOOP -->
-      </rdf:Seq>
-    </items>
-</channel>
-
-  <!-- TMPL_LOOP NAME="ITEMS" -->
-  <item rdf:about="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
-  <title><!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR AUTHOR --><!-- /TMPL_IF --></title>
-  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" --></link>
-<description><![CDATA[<!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF -->
-<br><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" -->
-<br><!-- TMPL_VAR NAME="pages" --><!-- TMPL_VAR NAME="illus" --><!-- TMPL_VAR NAME="size" -->
-<!-- TMPL_IF NAME="notes" --><br><br><!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><br>
-<a href="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">View Details</a> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserve this Item</a><!-- TMPL_IF NAME="author" --> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-search.pl?marclist=biblio.author&amp;and_or=and&amp;excluding=&amp;operator=contains&amp;value=<!-- TMPL_VAR NAME="author" -->&amp;resultsperpage=20&amp;orderby=biblio.title&amp;op=do_search">More by this Author</a><!-- /TMPL_IF -->
-]]></description>
- </item>
-<!-- /TMPL_LOOP -->
-</rdf:RDF>
diff --git a/rss/lastAcquired-2.0.conf b/rss/lastAcquired-2.0.conf
deleted file mode 100644
index 5e6a1b5..0000000
--- a/rss/lastAcquired-2.0.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-channel
-title=Recent Acquisitions
-link=http://www.koha.org
-desc=The library's 15 most recent acquisitions
-lang=en
-image
-title=Koha, the worlds best Open Source Library System
-url=http://www.koha.org/images/foo.jpg
-link=http://www.koha.org
-description=Koha, the worlds best Open Source Library System
-width=88
-height=31
-config
-tmpl=lastAcquired-2.0.tmpl
-output=lastAcquired-2.0.xml
-query=select biblio.title as title, biblio.author as author, biblio.biblionumber, biblio.notes as notes, biblioitems.place as place, biblioitems.publishercode as publishercode, biblioitems.publicationyear as publicationyear, biblioitems.pages as pages, biblioitems.illus as illus, biblioitems.size as size from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
diff --git a/rss/lastAcquired-2.0.tmpl b/rss/lastAcquired-2.0.tmpl
deleted file mode 100644
index f90942f..0000000
--- a/rss/lastAcquired-2.0.tmpl
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-<rss version="2.0">
-	<channel>
-		<title><!-- TMPL_VAR NAME="CHANNELTITLE" --></title>
-		<link><!-- TMPL_VAR NAME="CHANNELLINK" --></link>
-		<description><!-- TMPL_VAR NAME="CHANNELDESC" --></description>
-		<language><!-- TMPL_VAR NAME="CHANNELLANG" --></language>
-		<lastBuildDate><!-- TMPL_VAR NAME="CHANNELLASTBUILD" --></lastBuildDate>
-		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
-		<generator>Koha</generator>
-		<image>
-			<title><!-- TMPL_VAR NAME="IMAGETITLE" --></title>
-			<url><!-- TMPL_VAR NAME="IMAGEURL" --></url>
-			<link><!-- TMPL_VAR NAME="IMAGELINK" --></link>
-			<width><!-- TMPL_VAR NAME="IMAGEWIDTH" --></width>
-			<height><!-- TMPL_VAR NAME="IMAGEHEIGHT" --></height>
-			<description><!-- TMPL_VAR NAME="IMAGEDESCRIPTION" --></description>
-		</image>
-
-<!-- TMPL_LOOP NAME="ITEMS" -->
- <item>
-  <title><!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF --></title>
-  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" --></link>
-<description><![CDATA[<!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF -->
-<br><!-- TMPL_IF NAME="publishercode" --><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" --><br><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="pages" --><!-- TMPL_VAR NAME="pages" --><!-- TMPL_VAR NAME="illus" --><!-- TMPL_VAR NAME="size" --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF --><br>
-<a href="http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">View Details</a> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-reserve.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserve this Item</a><!-- TMPL_IF NAME="author" --> | <a href="http://opac.library.org.nz/cgi-bin/koha/opac-search.pl?marclist=biblio.author&amp;and_or=and&amp;excluding=&amp;operator=contains&amp;value=<!-- TMPL_VAR NAME="author" -->&amp;resultsperpage=20&amp;orderby=biblio.title&amp;op=do_search">More by this Author</a><!-- /TMPL_IF -->
-]]></description>
- </item>
-<!-- /TMPL_LOOP -->
-
-</channel>
-</rss>
diff --git a/rss/lastAcquired.conf b/rss/lastAcquired.conf
deleted file mode 100644
index 4ae696a..0000000
--- a/rss/lastAcquired.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-channel
-title=Recent Koha Acquisitions
-link=http://www.koha.org
-desc=The 15 most recent acquisitions
-lang=en
-lastBuild=Fri, 09 May 2003 08:00:00
-image
-title=Koha, the world's best Open Source Library System
-url=http://www.koha.org/images/foo.jpg
-link=http://www.koha.org
-config
-tmpl=lastAcquired.tmpl
-output=lastAcquired.xml
-query=select biblio.title as title, biblio.author as author, biblio.biblionumber from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.dateaccessioned is not NULL order by items.dateaccessioned desc
-
diff --git a/rss/lastAcquired.tmpl b/rss/lastAcquired.tmpl
deleted file mode 100644
index b47cd18..0000000
--- a/rss/lastAcquired.tmpl
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
-	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-
-<rss version="0.91">
-
-<channel>
- <title><TMPL_VAR CHANNELTITLE></title>
- <link><TMPL_VAR CHANNELLINK></link>
- <description><TMPL_VAR CHANNELDESC></description>
- <language><TMPL_VAR CHANNELLANG></language>
- <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
-
- <image>
-  <title><TMPL_VAR IMAGETITLE></title>
-  <url><TMPL_VAR IMAGEURL></url>
-  <link><TMPL_VAR IMAGELINK></link>
- </image>
-
-<TMPL_LOOP NAME=ITEMS>
- <item>
-  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
-  <link>http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber=<TMPL_VAR NAME="biblionumber"></link>
-
- </item>
-</TMPL_LOOP>
-
-</channel>
-</rss>
diff --git a/rss/longestUnseen.conf b/rss/longestUnseen.conf
deleted file mode 100644
index 91d7186..0000000
--- a/rss/longestUnseen.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-channel
-title=Longest Unseen Koha Items
-link=http://www.koha.org
-desc=The 15 least recently seen items
-lang=en
-image
-title=Koha, the worlds best Open Source Library System
-url=http://www.koha.org/images/foo.jpg
-link=http://www.koha.org
-config
-tmpl=longestUnseen.tmpl
-output=longestUnseen.xml
-query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.datelastseen is not NULL and items.datelastseen != items.datelastborrowed order by items.datelastseen
-
diff --git a/rss/longestUnseen.tmpl b/rss/longestUnseen.tmpl
deleted file mode 100644
index 99893bc..0000000
--- a/rss/longestUnseen.tmpl
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
-	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-
-<rss version="0.91">
-
-<channel>
- <title><TMPL_VAR CHANNELTITLE></title>
- <link><TMPL_VAR CHANNELLINK></link>
- <description><TMPL_VAR CHANNELDESC></description>
- <language><TMPL_VAR CHANNELLANG></language>
- <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
-
- <image>
-  <title><TMPL_VAR IMAGETITLE></title>
-  <url><TMPL_VAR IMAGEURL></url>
-  <link><TMPL_VAR IMAGELINK></link>
- </image>
-
-<TMPL_LOOP NAME=ITEMS>
- <item>
-  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
-  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
-
- </item>
-</TMPL_LOOP>
-
-</channel>
-</rss>
diff --git a/rss/mostReserved.conf b/rss/mostReserved.conf
deleted file mode 100644
index 437b660..0000000
--- a/rss/mostReserved.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-channel
-title=Most Reserved Items
-link=http://www.koha.org
-desc=The 15 most reserved items
-lang=en
-image
-title=Koha, the worlds best Open Source Library System
-url=http://www.koha.org/images/foo.jpg
-link=http://www.koha.org
-config
-tmpl=mostReserved.tmpl
-output=mostReserved.xml
-query=select biblioitems.isbn as isbn, biblio.title as title, biblio.author as author from biblio, biblioitems, items where biblioitems.biblionumber = items.biblionumber and biblio.biblionumber = items.biblionumber and items.reserves is not NULL order by items.reserves desc
-
diff --git a/rss/mostReserved.tmpl b/rss/mostReserved.tmpl
deleted file mode 100644
index 99893bc..0000000
--- a/rss/mostReserved.tmpl
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE rss PUBLIC "-//Netscape Communications/DTD RSS 0.91/EN"
-	  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-
-<rss version="0.91">
-
-<channel>
- <title><TMPL_VAR CHANNELTITLE></title>
- <link><TMPL_VAR CHANNELLINK></link>
- <description><TMPL_VAR CHANNELDESC></description>
- <language><TMPL_VAR CHANNELLANG></language>
- <lastBuildDate><TMPL_VAR CHANNELLASTBUILD></lastBuildDate>
-
- <image>
-  <title><TMPL_VAR IMAGETITLE></title>
-  <url><TMPL_VAR IMAGEURL></url>
-  <link><TMPL_VAR IMAGELINK></link>
- </image>
-
-<TMPL_LOOP NAME=ITEMS>
- <item>
-  <title><TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR></title>
-  <link>http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn=<TMPL_VAR ISBN></link>
-
- </item>
-</TMPL_LOOP>
-
-</channel>
-</rss>
diff --git a/rss/rss.pl b/rss/rss.pl
deleted file mode 100755
index 4cea230..0000000
--- a/rss/rss.pl
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/usr/bin/perl
-
-# This script can be used to generate rss 0.91 files for syndication.
-
-# it should be run from cron like:
-#
-#    rss.pl config.conf
-#
-
-# Copyright 2003 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-use warnings;
-
-use HTML::Template::Pro;
-use C4::Context;
-use Time::Local;
-use POSIX;
-
-my $dbh     = C4::Context->dbh;
-my $file    = $ARGV[0];
-my %config  = getConf("config");
-my $outFile = $config{"output"};
-my $feed    = HTML::Template::Pro->new( filename => $config{"tmpl"} );
-
-my %channel = getConf("channel");
-$feed->param( CHANNELTITLE     => $channel{'title'} );
-$feed->param( CHANNELLINK      => $channel{'link'} );
-$feed->param( CHANNELDESC      => $channel{'desc'} );
-$feed->param( CHANNELLANG      => $channel{'lang'} );
-$feed->param( CHANNELLASTBUILD => getDate() );
-
-my %image = getConf("image");
-$feed->param( IMAGETITLE       => $image{'title'} );
-$feed->param( IMAGEURL         => $image{'url'} );
-$feed->param( IMAGELINK        => $image{'link'} );
-$feed->param( IMAGEDESCRIPTION => $image{'description'} );
-$feed->param( IMAGEWIDTH       => $image{'width'} );
-$feed->param( IMAGEHEIGHT      => $image{'height'} );
-
-#
-# handle the items
-#
-$feed->param( ITEMS => getItems( $config{'query'} ) );
-
-open( FILE, ">$outFile" ) or die "can't open $outFile";
-print FILE $feed->output();
-close FILE;
-
-sub getDate {
-
-    #    my $date = localtime(timelocal(localtime));
-    my $date = strftime( "%a, %d %b %Y %T %Z", localtime );
-    return $date;
-}
-
-sub getConf {
-    my $section = shift;
-    my %return;
-    my $inSection = 0;
-
-    open( FILE, $file ) or die "can't open $file";
-    while (<FILE>) {
-        if ($inSection) {
-            my @line = split( /=/, $_, 2 );
-            unless ( $line[1] ) {
-                $inSection = 0;
-            } else {
-                my ( $key, $value ) = @line;
-                chomp $value;
-                $return{$key} = $value;
-            }
-        } else {
-            if ( $_ eq "$section\n" ) { $inSection = 1 }
-        }
-    }
-    close FILE;
-    return %return;
-}
-
-sub getItems {
-    my $query = shift;
-    $query .= " limit 15";
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    my @return;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        foreach my $key ( keys %$data ) {
-            my $value = $data->{$key};
-            $value = '' unless defined $value;
-            $value =~ s/\&/\&amp;/g and $data->{$key} = $value;
-        }
-        push @return, $data;
-    }
-    $sth->finish;
-    return \@return;
-}
diff --git a/rss/sm-koha-icon.jpg b/rss/sm-koha-icon.jpg
deleted file mode 100644
index 152d6c9b54d8309cd3bddbbf89b4733872bdd6cf..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 1503
zcmb7<eLT|%9LImZ4KwC!Gt`WEm{5$(RyNNRR+Fc3o-VA&Qx2gbq&mbQRHvlEY?Ox_
zt+=~9mxolAXD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