Greg Heartsfield home

Introducing cabal2doap

Hackage is a fantastic resource for developers, but one disadvantage is that non-Haskellers rarely get exposed to the great software that is being developed in Haskell. Hackage lists nearly 1,000 projects currently, but checking on, there are only 73 Haskell projects. As a developer, I don’t want to have to submit and maintain project pages at Hackage, Freshmeat, Sourceforge, etc., but of course, I still want the largest audience possible.

One way to spread knowledge about software projects is to publish description-of-a-project (DOAP) files. These are formal descriptions of project stuff: homepage, maintainers, contributors, language, versions, and much more. There is a large overlap between the DOAP vocabulary and Cabal, the packaging system used for all Hackage projects. So, for the past few days I’ve been toying around with making a Cabal to DOAP converter, which is now ready for others to use.

Running the program in the root of a cabalized project will output XML-RDF. If the project is a Darcs repository, the commit history will be scanned, and developers will be noted in the output as well.

I hope that this will lead in the near future to Hackage generating DOAP data every time a new project is uploaded. There is lots of important data that is best gleaned directly from Hackage, such as the past releases, and download locations. I plan on making future improvements to aid in Hackage-cabal2doap integration, especially in the area of processing multiple Cabal files to build up release history. Before that though, I’d like to see if/how my projects become more accessible by virtue of having DOAP data published. For example, how well aggregation services like Doapspace and doap:store function.

A neat way to understand some of the power of representing data formally in RDF is to view it in graph form, such as that provided by the W3C RDF Validation Service. For example, the following is a representation of the DOAP data published for cabal2doap itself.

Graph of Cabal2DOAP project information

You can start with the official project homepage, or its home on Hackage. If you have Firefox and Tabulator or Semantic Radar, you can browse to a couple projects I host, which have linked DOAP data generated from cabal2doap.

Validate XHTML Validate CSS