[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] koha rss
From: |
long_sam.tw |
Subject: |
[Koha-devel] koha rss |
Date: |
Tue, 27 Feb 2007 20:32:59 +0800 (CST) |
koha rss
summary:
how to configure rss on koha.
Credit:
Originally written by Pat Eyler (address@hidden), 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.
1. environment
koha 2.2.5 & koha 2.2.7 (templete for npl)
2. cvs
mkdir cvs
cd cvs
cvs -z3 -d:pserver:address@hidden:/sources/koha co koha
cd koha
and copy -R rss/ /your-koha/intranet/modules/C4/
3. lastAcquired-2.0.conf
lastAcquire.conf books
-------------------------------
channel
title=Recent Koha Acquisitions
link=http://www.koha.org
desc=The 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
width=88
height=31
config
tmpl=/opt/koha/intranet/modules/C4/rss/lastAcquired-2.0.tmpl
output=/opt/koha/intranet/modules/C4/rss/lastAcquired-2.0.xml
query=select biblio.title as title, biblio.author as author,
biblio.biblionumber as bibid, 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.issues
desc
4. lastAcquired.tmpl
<?xml version="1.0" encoding="utf8"?>
<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>
http://blogs.law.harvard.edu/tech/rss
<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>Title:<!-- TMPL_VAR NAME="TITLE" -->
<!-- TMPL_IF NAME="AUTHOR" -->
Author:<!-- TMPL_VAR NAME="AUTHOR" -->
<!-- /TMPL_IF -->
</title>
http://www.koha.org/cgi-bin/koha/opac-detail.pl?bib=
<description><![CDATA[Title:<!-- TMPL_VAR NAME="TITLE" -->
<!-- TMPL_IF NAME="AUTHOR" --> Author:<!-- 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>
">Details | ">Reserve |
&resultsperpage=20&orderby=biblio.title&op=do_search">other works
]]></description>
</item>
<!-- /TMPL_LOOP -->
</channel>
</rss>
5. navigation.inc
# add
http://www.w3.org/People/Ishida/images/rdf_flyer-small.gif>
http://lit145.lacc.fju.edu.tw/koha/rss/lastAcquired-2.0.xml>The 15 most recent
acquisitions
6. crontab
crontab -e
0 8,17 * * * /opt/koha/intranet/modules/C4/rss/rss.pl
/opt/koha/intranet/modules/C4/rss/lastAcquired-2.0.conf
7. koha-httpd.conf
www.koha.org:80>
ServerAdmin address@hidden
DocumentRoot /opt/koha/opac/htdocs
ServerName www.koha.org
ScriptAlias /cgi-bin/koha/ /opt/koha/opac/cgi-bin/
Redirect permanent index.html
http://www.koha.org:80/cgi-bin/koha/opac-main.pl
-----------------------------------------------------------------------------------
# add Alias
Alias /koha/rss/lastAcquired-2.0.xml
"/opt/koha/intranet/modules/C4/rss/lastAcquired-2.0.xml"
</VirtualHost>
restart apache
8. use google reader
http://farm1.static.flickr.com/186/404542415_d0b27b3e67_o.png
you can use firefox 2.0
9. demo site
http://lit145.lacc.fju.edu.tw
http://koha.nkes.ntct.edu.tw
http://koha.jente.edu.tw
10. chinese information
http://koha.wikispaces.com/rss
laxendion
___________________________________________________
您的生活即時通 - 溝通、娛樂、生活、工作一次搞定!
http://messenger.yahoo.com.tw/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-devel] koha rss,
long_sam.tw <=