From 7008820166add1efc61529c1e98ca183e6627fa9 Mon Sep 17 00:00:00 2001 From: Yohann Dufour Date: Fri, 20 Jun 2014 11:36:06 +0200 Subject: [PATCH] Bug 9000: the directory misc/cronjobs/rss/ has been removed Since these files are not used anymore, they can be removed. --- 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 1503 -> 0 bytes 13 files changed, 450 deletions(-) delete mode 100644 misc/cronjobs/rss/README delete mode 100644 misc/cronjobs/rss/lastAcquired-1.0.conf delete mode 100644 misc/cronjobs/rss/lastAcquired-1.0.tmpl delete mode 100644 misc/cronjobs/rss/lastAcquired-2.0.conf delete mode 100644 misc/cronjobs/rss/lastAcquired-2.0.tmpl delete mode 100644 misc/cronjobs/rss/lastAcquired.conf delete mode 100644 misc/cronjobs/rss/lastAcquired.tmpl delete mode 100644 misc/cronjobs/rss/longestUnseen.conf delete mode 100644 misc/cronjobs/rss/longestUnseen.tmpl delete mode 100644 misc/cronjobs/rss/mostReserved.conf delete mode 100644 misc/cronjobs/rss/mostReserved.tmpl delete mode 100755 misc/cronjobs/rss/rss.pl delete mode 100644 misc/cronjobs/rss/sm-koha-icon.jpg diff --git a/misc/cronjobs/rss/README b/misc/cronjobs/rss/README deleted file mode 100644 index 896a1d9..0000000 --- a/misc/cronjobs/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-community.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-community.org/images/foo.jpg -link=http://www.koha-community.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 -... is the part which can be modified to create your own -RSS content. - -Here's the lastAcquired.tmpl file: - - - - - - - - - <TMPL_VAR CHANNELTITLE> - - - - - - - <TMPL_VAR IMAGETITLE> - - - - - - - <TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR> - http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn= - - - - - - - -Credits: -Originally written by Pat Eyler (pate@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 deleted file mode 100644 index d70cf71..0000000 --- a/misc/cronjobs/rss/lastAcquired-1.0.conf +++ /dev/null @@ -1,14 +0,0 @@ -channel -title=Recent Acquisitions -link=http://www.koha-community.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-community.org/images/foo.jpg -link=http://www.koha-community.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 deleted file mode 100644 index 6bd4780..0000000 --- a/misc/cronjobs/rss/lastAcquired-1.0.tmpl +++ /dev/null @@ -1,39 +0,0 @@ - - - "> - <!-- TMPL_VAR NAME="CHANNELTITLE" --> - - - - - "> - <!-- TMPL_VAR NAME="IMAGETITLE" --> - - - - - - - "/> - - - - - - - "> - <!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR AUTHOR --><!-- /TMPL_IF --> - http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber= - by -
-
-


-">View Details | ">Reserve this Item | &resultsperpage=20&orderby=biblio.title&op=do_search">More by this Author -]]>
-
- -
diff --git a/misc/cronjobs/rss/lastAcquired-2.0.conf b/misc/cronjobs/rss/lastAcquired-2.0.conf deleted file mode 100644 index 0a03937..0000000 --- a/misc/cronjobs/rss/lastAcquired-2.0.conf +++ /dev/null @@ -1,16 +0,0 @@ -channel -title=Recent Acquisitions -link=http://www.koha-community.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-community.org/images/foo.jpg -link=http://www.koha-community.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 deleted file mode 100644 index f90942f..0000000 --- a/misc/cronjobs/rss/lastAcquired-2.0.tmpl +++ /dev/null @@ -1,34 +0,0 @@ - - - - <!-- TMPL_VAR NAME="CHANNELTITLE" --> - - - - - http://blogs.law.harvard.edu/tech/rss - Koha - - <!-- TMPL_VAR NAME="IMAGETITLE" --> - - - - - - - - - - <!-- TMPL_VAR NAME="TITLE" --><!-- TMPL_IF NAME="AUTHOR" --> by <!-- TMPL_VAR NAME="AUTHOR" --><!-- /TMPL_IF --> - http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber= - by -

- -


-">View Details | ">Reserve this Item | &resultsperpage=20&orderby=biblio.title&op=do_search">More by this Author -]]>
-
- - -
-
diff --git a/misc/cronjobs/rss/lastAcquired.conf b/misc/cronjobs/rss/lastAcquired.conf deleted file mode 100644 index 1147d94..0000000 --- a/misc/cronjobs/rss/lastAcquired.conf +++ /dev/null @@ -1,15 +0,0 @@ -channel -title=Recent Koha Acquisitions -link=http://www.koha-community.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-community.org/images/foo.jpg -link=http://www.koha-community.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 deleted file mode 100644 index b47cd18..0000000 --- a/misc/cronjobs/rss/lastAcquired.tmpl +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - <TMPL_VAR CHANNELTITLE> - - - - - - - <TMPL_VAR IMAGETITLE> - - - - - - - <TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR> - http://opac.library.org.nz/cgi-bin/koha/opac-detail.pl?biblionumber= - - - - - - diff --git a/misc/cronjobs/rss/longestUnseen.conf b/misc/cronjobs/rss/longestUnseen.conf deleted file mode 100644 index 7c0218c..0000000 --- a/misc/cronjobs/rss/longestUnseen.conf +++ /dev/null @@ -1,14 +0,0 @@ -channel -title=Longest Unseen Koha Items -link=http://www.koha-community.org -desc=The 15 least recently seen items -lang=en -image -title=Koha, the worlds best Open Source Library System -url=http://www.koha-community.org/images/foo.jpg -link=http://www.koha-community.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 deleted file mode 100644 index 99893bc..0000000 --- a/misc/cronjobs/rss/longestUnseen.tmpl +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - <TMPL_VAR CHANNELTITLE> - - - - - - - <TMPL_VAR IMAGETITLE> - - - - - - - <TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR> - http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn= - - - - - - diff --git a/misc/cronjobs/rss/mostReserved.conf b/misc/cronjobs/rss/mostReserved.conf deleted file mode 100644 index f6c44ad..0000000 --- a/misc/cronjobs/rss/mostReserved.conf +++ /dev/null @@ -1,14 +0,0 @@ -channel -title=Most Reserved Items -link=http://www.koha-community.org -desc=The 15 most reserved items -lang=en -image -title=Koha, the worlds best Open Source Library System -url=http://www.koha-community.org/images/foo.jpg -link=http://www.koha-community.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 deleted file mode 100644 index 99893bc..0000000 --- a/misc/cronjobs/rss/mostReserved.tmpl +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - <TMPL_VAR CHANNELTITLE> - - - - - - - <TMPL_VAR IMAGETITLE> - - - - - - - <TMPL_VAR TITLE>, by <TMPL_VAR AUTHOR> - http://opac.library.org.nz/cgi-bin/koha/opac-searchresults.pl?isbn= - - - - - - diff --git a/misc/cronjobs/rss/rss.pl b/misc/cronjobs/rss/rss.pl deleted file mode 100755 index 1d475d7..0000000 --- a/misc/cronjobs/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., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 () { - 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/\&/\&/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 deleted file mode 100644 index 152d6c9b54d8309cd3bddbbf89b4733872bdd6cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1503 zcmb7x_jNf_xb+$`F!8s&sRJuo&u129T*M(2!eoT)JV{tf50#Q#>+fWCG)8A!aXhNb;D0n@Zr5V|RXi6df2?617I6@w=ML}T;SqrB{ z{@)U}0w`I)3ZO$lZ2*D-p(s$?3E%(#0)a~2_*YPvlr#WBWMn0-84`ei5Gha=4uSn0 z0U=N+6d;Y(a+6WgCXsF33o$xDF=_c1>IVwiV9F{4dk=Q0WOFMBNT~n80#FH71|qTa zQ4*+>1PlA;CJ2$ZC@nOpO&X(}reqtGU;klIJPshBprk1j1y}=-2Ldpg;RlV4vr?&~ z2We9Q6=wa=)|S07@_H+oTMnTM$FKJ@qiXpGzDDd#pY#zqb%su^yfe~}F2C}rJ>#d# zHG86t>C)JZZ_HJ0N1&xQiVq0)w~S||5g6EA-9g08>Y-GzJ*eFZ>uc^)^aI| zkPV_1%e^Ldk!%v!W|!o4V*X4QwrP}ibyRS)x#h_+(_TajBRZeo$Kv{ZR6{CM?;l?E z{XAHu8feZe*F(=SDfN_s9_;q)0)d+1HKnV~EB4m~{hUnEu)o3F(ZsqWjpYQsKIcgT zBOLL>Pq*iOPF7xU=GUnl0!>)%?R&DT8X7RvA2t8gs5KrJxARkoaOvQuyb2}eOi#dL=mxT=k=zEo);iR!jj&Q_k4yG;A#L5UN_f1TvK&4r3+ zP%XN5xH<1|N`AIso>|Sz{lKA>L|u=km-P5tmy08S-&_BSoEPP#MQ%}htTT%T6A17< z_R3aw*yWrDc2uP%YYV9F@v`L!*o{Z*$4ggEw&!z5%(PR|QHsZ{-bL*GHDryeGvp;| z=`8AqmaSB4z(3=|i-KKeX?}uz9D_F>L!NsHqw61%Mz0Ar7;SH7DLzJ?cKKCo_Wj0^ zc|H}9-n~GM&rJM+4fk(PJXGU}B1!YclE)vum(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@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_82xPNK>&ccPlj05`j@XofZTYWb=adkU19!-{-;QiWDjYtEfu}PRo&SuQD U)01zx8?fbb9MWdjs