With the RSS Advisory Board recommending the Feed Validator, and highlighting that it’s an open source project (Python licence), here’s a simple starter for hacking on it, either to make fixes, or simply to use it for non-public feeds.
(This is for Linux – tips for Windows or other environments are welcome!)
The Feed Validator doesn’t make official releases,
but it’s regularly updated and a current snapshot is almost always stable.
Choose a local directory to store the validator in – say,
Nightly snapshots are available from http://feedvalidator.org/download/.
CVS is slightly more complicated to get working, but then you can keep current.
cvs -d :pserver:email@example.com:/cvsroot/feedvalidator login (No password; hit return.) cvs -z3 -d :pserver:firstname.lastname@example.org:/cvsroot/feedvalidator checkout feedvalidator
Later, to get the latest code, call
cvs up from inside the
There's a command-line interface:
python ./src/demo.py <feed url>
(Or, hack that script to work how you want.)
First install a web server, Python and additional character encoding support. Under Debian:
apt-get install apache2-mpm-worker python2.3 python2.3-iconvcodec
For simplicity, it’s easiest to run the validator out of a regular user account. That means you don't need to be root.
FVDIR=<location of the feedvalidator directory> cd ~/public_html ln -s "$FVDIR/css" fv-css ln -s "$FVDIR/docs" fv-docs mkdir -p cgi-bin/fv cp "$FVDIR/check.cgi" "$FVDIR/config.py" cgi-bin/fv/
config.py to point to the other directories:
WEBDIR = HOMEDIR + r'/public_html/feedvalidator' DOCSURL='docs' CSSURL='css'
Now open a browser to
http://localhost/~<your usercode>/cgi-bin/fv/check.cgi and we’re, hopefully, done.
I don’t think it’s any disrespect to say that that test cases are the Validator’s most valuable asset – currently over fourteen hundred separate cases of valid, and invalid, feeds, along with the precise errors. When you find a bug, or any other misfeature, a simple test case is the best way to get your point across.
To check the existing cases, run
This will check everything below the ‘testcases’ directory (you can also
specify a single test by filename).
There’s no point in having access to source code if you can’t deploy it and, even if the steps are straightforward, open source software should be as approachable as possible.