Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Parse OPML, RDF+FOAF, and iGoogle subscription lists

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 COPYING
Octocat-spinner-32 COPYING.LESSER
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 NEWS
Octocat-spinner-32 README
Octocat-spinner-32 listparser.py
Octocat-spinner-32 lptest.py
Octocat-spinner-32 project.opml
Octocat-spinner-32 setup.py
README
listparser.py - Parse OPML, FOAF, and iGoogle subscription lists.
Copyright (C) 2009-2012 Kurt McKee <contactme@kurtmckee.org>

listparser is a Python library that parses subscription lists (also
called reading lists) and returns all of the feeds, subscription lists,
and "opportunity" URLs that it finds. It supports OPML, RDF+FOAF, and
the iGoogle exported settings format.


Usage
=====

>>> import listparser
>>> result = listparser.parse('project.opml')

A dictionary will be returned with several keys:
`meta`: a dictionary of information about the subscription list
`feeds`: a list of feeds
`lists`: a list of subscription lists
`version`: a file format identifier
`bozo`: 1 if there is a problem with the list, 0 otherwise
`bozo_exception`: (if `bozo` is 1) a description of the problem

Continuing the example:

>>> result.meta.title
u'listparser project feeds'
>>> len(result.feeds)
3
>>> result.feeds[1].url
u'http://freecode.com/projects/listparser/announcements.atom'

More extensive documentation is available in the docs/ directory,
or online at <http://packages.python.org/listparser/>.


Bugs
====

There are going to be bugs. The best way to handle them will be to
isolate the simplest possible document that susses out the bug, add
that document as a test case, and then find and fix the problem.

...you can also just report the bug and leave it to someone else
to fix the problem, but that won't be as much fun for you!

Bugs can be reported at <http://github.com/kurtmckee/listparser/issues>.
Something went wrong with that request. Please try again.