ccRdf 0.4.5 Available

ccRdf 0.4.5 is now available. Improvements include:

  • updated to support RDFlib 2.0.3 and it’s new API
  • added unit tests
  • added new module, a nascent pluggable RDF extraction module under development for use in the new version of ccValidator.

ccRdf is a set of Python classes which allow developers to easily parse and manipulate Creative Commons licensing metadata. ccRdf supports parsing, manipulating and emitting license metadata in RDF format. ccRdf performs the core validation and parsing for the Creative Commons RDF Validator.

date:2004-06-24 13:44:07

CC RDF in JavaScript

It’s taking much longer than I’d like, but I’m slowly making progress on a new release of mozCC. The update, when it’s finally available, will hopefully play better with more browsers and have fewer “quirks” (read: bugs).

As part of the development process, I decided that Jim Ley’s excellent all-JavaScript RDF parser just wasn’t a good fit. There were an increasing number of things I wanted to do that were CC specific and uncomfortable to accomodate with the code base. What I needed was a library designed to manipulate licenses. Like ccRdf does for Python. So taking what I learned from QuickFile, I put together ccRdf.js.

ccRdf.js is a limited port of ccRdf to JavaScript. Instead of attempting to provide facilities for both creation and consumption of RDF, it focuses solely on consuming RDF licenses. The API is similar, and it seems to work fairly well thus far. You can find the source here. There currently isn’t any other documentation, so e-mail me if you run into problems or have questions.

date:2004-01-20 11:43:42
category:ccRdf, mozCC

ccRdf 0.4.0

ccRdf is now available for download. This release fixes several bugs related to the getAll and getFirst methods of the rdfDict class. There have also been minor internal implementation changes made.

In addition to bug fixes, I want to note a change in functionality. In previous versions, casting a rdfDict to a string returned it’s RDF subject. This is no longer the case. str now returns a contrived string representation of the current instance, based (very) loosely on the Dublin Core Dumb-down Algorithm. If someone has a suggestion or better implementation, I welcome it. You can still access the RDF subject using the subject attribute or the new about method.

date:2003-12-22 21:45:07

ccRdf 0.3.0 Available

After some great debate and discussion with Mike and Ben, ccRdf 0.3.0 is now available. Improvments include smarter handling of predicate-object pairs in the RDF and clarification of the API. You can find more information here. Enjoy.

date:2003-12-05 07:14:10

ccLicense is now ccRdf

I’m very happy to announce that is now ccRdf. And this is more than a name change. Previously existed only to serve the needs of ccValidator. While it was initially intended to stand on it’s own, I destroyed that objective in my haste to get the validator working. After some friendly prodding from Mike and Ben, and some good discussions about what the API should look like, I’ve rewritten the code as it’s own Python module. And because it handles more than just licenses (works, for one), it’s now ccRdf.

First, where to find it. I’ve put up a very simple page for it here. You can find download and documentation links there, along with a brief description.

Second, expectations. I hacked the code together this afternoon, so there may be omissions or bugs. I’ve done some simple testing, but it hasn’t undergone any extensive testing. At all. I’m planning to port ccValidator over to it in the very near future, which I believe will help expose flaws in the design and bugs in the code.

So download, code, enjoy, and as always, feedback, criticism, and bug reports are welcome. You can e-mail them to if they’re ccRdf specific.

date:2003-12-02 15:14:03

Thoughts on the future of

With the Validator up and running, I’ve been thinking more about, and how it could be used on it’s own. My conclusion is that in an effort to make it handle all the RDF requirements of the Validator, I’ve pretty much screwed it up for use on it’s own. Not that it couldn’t be used on its own, but the APIs are inconsistent, poorly documented and incomplete. I’d like to remedy that so it feels like I’ve completed something else. To that end, I think these are the goals for a good Python API for Creative Commons licenses:

  • the ability to consume and emit existing licenses in RDF
  • the flexibility to discover new licensing terms through introspecting the incoming RDF
  • the ability to get and set basic license permissions
  • intelligent handling of Work, Agent and other “sub-objects”
  • clarity of API so that simple solutions are obvious and complex solutions are clearly possible

I think the biggest problem I have with the current API is that it is very biased towards consuming and reading licenses; a successful API should probably have a balance between reading and writing licenses.

date:2003-10-24 10:28:26

Updated Available

I’ve just posted an updated version of, which I’ve dubbed 0.2. You can find it here . Changes are largely related to the way it extracts work and agent information from the license RDF. The interfaces have been more generalized to accomodate nested RDF structures. However, 0.2 is a step back in terms of license creation; generalizing the extraction interfaces means the interfaces for creation need to be reworked as well. Since the improvments were driven by ccValidator , the creation stuff was left behind. I hope to have a more complete version ready in the near future. As always, comments and feedback are welcome.

date:2003-10-17 12:13:01

Why didn’t I think of that sooner?

Shortly after announcing the validator to the cc-metadata list this morning, I had my first bug report. In my defense, it’s not even a bug in my code, per say, but some invalid metadata. However, there were several discoveries I made that I’m working to roll into both ccValidator and In no particular order:

  • Python 2.2 seems to have a broken re module which barfs on really long matches. 2.2.3 and all the 2.3 series seem to have this fixed (note: this is just my observation, if anyone can confirm/correct this, feel free)
  • returns incorrect results if the RDF block defines more than one work and…
  • …I was trying way to hard to parse the work meta-data; some simple TripleStore action will do fine, thank-you
  • And finally, the way I extracted the licenses was also a little embarassing.

So I’ve fixed the last three and my webhost is graciously upgrading Python as we speak (I hope), so a new, improved, working better than ever version of the Validator should be ready real soon now. And I’m just kicking myself that I didn’t think of the last 3 issues sooner.

date:2003-10-16 15:42:36
category:ccRdf, ccValidator 0.1

As part of my effort to complete the Creative Commons web validation service, I inadvertently addressed another of their challenges: creating a language (in this case Python, of course) API for manipulating licenses. So with muted fanfare, here’s version 0.1 of It currently supports parsing a license and extracting of permissions, restrictions, etc. It also will emit RDF, although that’s not exactly perfect yet.

Future plans:

  • complete the methods that allow creation of new licenses
  • fix the emitRdf method to use namespaces in a cleaner way
  • either replace or just accept the way it handles work information (which I’m not currently a huge fan of)

In order to use it you’ll need RDFlib and Aaron Swartz’s TRAMP. I’ll make a distutils package once I get the rest of the methods fleshed out. As always, suggestions, comments and feedback welcome.

date:2003-10-16 10:37:40