Command-line tool and library for DOAP (Description of a Project) RDF.
Project description
Doapfiend is a command-line client and library for fetching, displaying, creating, and manipulating DOAP (Description of a Project) files.
Doapfiend uses RDFAlchemy/rdflib as an ORM to query and create DOAP.
See docs/api for Epydoc generated API documentation.
Features
Display metadata in DOAP in a human-readable format
Get DOAP by a !SourceForge, Freshmeat, PyPI, Ohloh etc. project name
Search all DOAP spidered on the web (pingthesemanticweb.com)
Access the metadata in the DOAP file using Python dot notation
Fetch DOAP by using the short name of a DOAP PURL doapurl.org
Fetch and display DOAP mentioned in FOAF by project homepage
Written in Python (Yes, that’s a feature.)
Extensible with plugins using setuptools
Optional Plugins available
Plugins in development
Search for DOAP by names you know, such as your distribution’s package names
Create a Gentoo ebuild from a DOAP file
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://librdf.org/raptor/
You have the URL or local path to a DOAP file:
$ doapfiend -d http://librdf.org/raptor/raptor.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, print_doap >>> url = query_by_homepage('http://news.tiker.net/software/tagpy')[0][1] >>> print fetch_doap(url)
Same as above but display DOAP in human readable text:
>>> print_doap(fetch_doap(url))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file doapfiend-0.3.0.tar.gz
.
File metadata
- Download URL: doapfiend-0.3.0.tar.gz
- Upload date:
- Size: 176.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fc081bbb9c9405cb22c9ff7146cf5dae50f469d140eb68c1f731ceeac01813d |
|
MD5 | 9579fa8ef2b15cf0e779e76289758b40 |
|
BLAKE2b-256 | c59a2b4bbb40fedccaf6d18a465bdc987390f9e9eb8711222fe84c76a3d0356f |
File details
Details for the file doapfiend-0.3.0-py2.5.egg
.
File metadata
- Download URL: doapfiend-0.3.0-py2.5.egg
- Upload date:
- Size: 59.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d42af3ce26b1c5ece6462478f3269cfb2079568c12e288acc2e53764a8167800 |
|
MD5 | c28d7939c6a5162248f4eb9a5b42726c |
|
BLAKE2b-256 | c0efe12ffe2eb7f3a5c6fe8db2e685847806797abd8bc522813f26c25027a50a |