Skip to main content

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, !RubyForge 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

  • Written in Python (Yes, that’s a feature.)

  • Extensible with plugins using setuptools

Plugins available

  • Generate a web page with CSS from a DOAP file (using hdoap)

Plugins in development

  • Search for DOAP by names you know such as your distribution’s package names, Source Forge name, etc.

  • Create a Gentoo ebuild from a DOAP file

  • Find DOAP by a Gentoo package name (Thanks GLEP 46)

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 -s nut

You have a project’s homepage, display DOAP if any has been spidered:

$ doapfiend -o http://librdf.org/raptor/

You have the URL to a DOAP file:

$ doapfiend -d http://librdf.org/raptor/raptor.rdf

Display DOAP as RDF/XML for the SourceForge project ‘nut’:

$ doapfiend -xs nut

Display DOAP as N3 (Notation Three) for the SourceForge project ‘nut’:

$ doapfiend -ns 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

doapfiend-0.2.0.tar.gz (163.6 kB view details)

Uploaded Source

Built Distribution

doapfiend-0.2.0-py2.5.egg (55.4 kB view details)

Uploaded Source

File details

Details for the file doapfiend-0.2.0.tar.gz.

File metadata

  • Download URL: doapfiend-0.2.0.tar.gz
  • Upload date:
  • Size: 163.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for doapfiend-0.2.0.tar.gz
Algorithm Hash digest
SHA256 38a930e3cd8f0f6e4a40b48234df897a028e498b39cf0ac12a6f0a42556ee5ae
MD5 a1d7b6a3ee24f8b53fa5ad82a98993db
BLAKE2b-256 d7429ce6e4957d43a42de8cf27e6aef6013d2d6f3f24fa464e26c5605383710c

See more details on using hashes here.

File details

Details for the file doapfiend-0.2.0-py2.5.egg.

File metadata

File hashes

Hashes for doapfiend-0.2.0-py2.5.egg
Algorithm Hash digest
SHA256 e5cb247afe3293ba381f4dfc7cf9c597e5dabd38767f9d846d97babe05310598
MD5 180765d7707ef1b401aa18781e56b6dc
BLAKE2b-256 60de4dfd43761998db438fc0191c54127459284838b156dd041ea39a4abe7c2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page