Table of Contents
doapfiend
Doapfiend is a command-line client and library for fetching, displaying and manipulating DOAP (Description of a Project) files. It searches for DOAP using doapspace.org, PingTheSemanticWeb, RDFOhloh and other sources.
Doapfiend uses RDFAlchemy as an ORM to query and create DOAP. You can also use rdflib for the graphs queried by RDFAlchemy.
News
Jun 09, 2008 - Version 0.3.3 released.
May 21, 2008 - Version 0.3.0 released.
Apr 27, 2008 - Version 0.2.0 released.
Features
- Search for DOAP by a project's homepage
- Display metadata in DOAP in a human-readable format
- Get DOAP by a SourceForge, Freshmeat, PyPI, Ohloh etc. project name
- Search for all DOAP spidered by pingthesemanticweb.com
- Access the metadata in the DOAP file using Python dot notation
- Fetch and display DOAP mentioned in FOAF by project homepage
- Extensible with plugins using setuptools
- Written in Python (Yes, that's a feature!)
Optional Plugins
- Generate a web page with CSS from a DOAP file (using hdoap <http://purl.org/stuff/hdoap/profile>_)
- Search for DOAP using a Gentoo Linux pacakge name (Thanks GLEP 46 <http://www.gentoo.org/proj/en/glep/glep-0046.html>_)
- Create Gentoo Linux ebuilds
- Do a repository checkout or ls etc. using SVN, CVS, Mercurial etc.
See DoapfiendPlugins for plugin details and development documentation.
In Development
- Search for DOAP by names you know such as your distribution's package names (Debian, Red Hat etc.)
Installaion
You can InstallDoapfiend using distutils, easy_install or subversion. There is also a Gentoo Linux ebuild available.
Example command-line usage
Fetch DOAP for SourceForge project named 'nut':
$ doapfiend --sf nut
You have a project's homepage, display DOAP if any has been spidered:
$ doapfiend -o http://trac.doapspace.org/doapfiend
You have the URL or path to a DOAP file:
$ doapfiend -u http://librdf.org/raptor/raptor.rdf $ doapfiend -u /path/to/some.rdf
Display DOAP as RDF/XML for the SourceForge project 'nut':
$ doapfiend -x --sf nut
Display DOAP as N3 (Notation Three) for the SourceForge project 'nut':
$ doapfiend -n --sf nut
Example library usage
Use a Freshmeat project name to fetch and display DOAP:
>>> from doapfiend.doaplib import get_by_pkg_index >>> print get_by_pkg_index('fm', 'nut')
Get some DOAP and access its metadata:
>>> from doapfiend.doaplib import get_by_pkg_index, load_graph >>> doap = load_graph(get_by_pkg_index('fm', 'nut')) >>> print doap.name 'nut' >>> print doap.created '2008-04-19'
Use a project's homepage to fetch DOAP and print the RDF/XML. Note there may be more than one DOAP profile out there; we just use the first found in our example.
>>> from doapfiend.doaplib import query_by_homepage, display_doap >>> url = query_by_homepage('http://trac.doapspace.org/doapfiend')[0][1] >>> print fetch_doap(url)
Same as above but display DOAP in human readable text:
>>> display_doap(fetch_doap(url))
Epydoc generated API documentation.
Want to write a plugin? See DoapfiendPlugins
![(please configure the [header_logo] section in trac.ini)](http://doapspace.org/static/doapfiend.png)