Wednesday, January 21, 2004

Example perl code to parse 'Share your OPML'

I can't believe no one has contributed example perl code to play with
Dave Winer's Share your OPML'.

href="http://www.nozell.com/marc/blog/data/example-share-your-opml.TXT">
Here is my contribution.

=====

NAME
example-share-your-opml.pl

SYNOPSIS
Example perl that obtains opml from Dave Winer's "Share your OPML" site
(http://feeds.scripting.com),
parses it and puts the info into an simple sqlite database.

VERSION
0.1

AUTHOR
Marc Nozell , http://www.nozell.com/blog

USAGE
$ ./example-share-your-opml.pl

$ sqlite opml.db

sqlite> select person, url from users where person like "%_Nozell";

person url

Marc Nozell http://cyber.law.harvard.edu/blogs/opml/users/fef39f0cebade
2b96b037dedba86ba7a.opml

sqlite> .quit

$

Setup
Prior to running the script, you need to set up a sqlite database. The
steps are as follows:

$ sqlite opml.db

sqlite> create table users (userid integer primary key, person text,
ctupdates text, type text, url
text, lastupdate text);

sqlite> .quit

SEE ALSO
SDK for 'Share Your OPML' http://feeds.scripting.com/sdk

Marc Nozell's mini-blog http://www.nozell.com/blog

BUGS
If you find some, send them to marc@nozell.com and maybe I'll look at it
. Maybe.

LICENSE
This work is hereby released into the Public Domain. To view a copy of t
he public domain dedication,
visit http://creativecommons.org/licenses/publicdomain/ or send a letter
to Creative Commons, 559 Nathan
Abbott Way, Stanford, California 94305, USA.
=====

No comments:

Post a Comment