MILLER Eva <evam <at> multcolib.org> writes:

So far, I've written the following python script to accomplish what I'm trying
to do:

# Finds ISBNs in a link and creates a new link to search a library catalog

import re,string, urllib,urllib2

def librarylookup ():

        href = open("booktest.txt")
        
        line = href.read()

        isbn = re.search ('(is[bs]n=)([0-9]*)',line)

        lookup="<a
href=\"http://ipac.multcolib.org/ipac20/ipac.jsp?index=ISBN&term=%s>Check the
catalog</a>" % (isbn)

        print lookup

librarylookup()
-------------------------------

My problem is the booktest.txt part. I'm just doing that to test the rest of the
script, which seems to work. What I actually need the script to do is read the
input from an RSS feed on pages like this one:
http://demo.plinkit.org/interestsideas/goodreads/sinList?synmap=HardcoverFiction

I want the script to insert a link to a public library catalog that searches for
this item. So, it has to read the RSS feed and leave behind the link. It would
have to be invoked for every ISBN, I guess. I'm using CMFSin to get the feeds.

I know I have to create this as an external method then call it. Kinda unsure
how to do that part, too.

Someone out there surely knows more than I do. Actually, almost everyone out
there knows more than I do. Help the poor librarian!

Eva

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to