Yet another ccValidator update

It seems like all I’m writing about here lately is ccValidator and ccLicense, but I suppose that’s OK. After my announcement this morning, it was pointed out that the validator didn’t exactly handle Unicode properly. So, some more regexing (for the XML encoding) and print "foo".encode(encoding) action, and tah-dah! New ccValidator , now with a gooey Unicode center.

Thanks, “Maxime”:; keep those bug reports coming.

date:2003-10-17 18:00:49

ccValidator Fixes

Based on yesterday’s excellent feedback, I’ve updated the ccValidator code to it’s new, improved version. Things fixed include:

  • handling of large RDF blocks
  • handling of work information is largely improved (multiple works are supported, sub-segments render properly, etc)
  • tweaks to handle changes made in

So go on, validate your license, and let me know if you run into any problems. I still need to wrap the exception handling better so a CGI traceback doesn’t spew when something doesn’t validate, and would like to modify the validation script to use some sort of templating (instead of print statements). Suggestions for a good, Python-ic templating solution?

date:2003-10-17 12:17:14

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

Creative Commons License Validator

Well, what good is a weekend not spent coding? In this case, I managed to hack together a very rudimentary RDF parser/validator specialized for Creative Commons licenses. You can find the web interface here and the sourcecode for the CGI here. The Python module which does most of the heavy lifting,, will be up soon. I’d love your feedback on any or all of it.

Right now it can parse raw RDF or retrieve a URL and scan it for RDF (using a simple regular expression). In either case it parses it and spits out the licensing and work information it finds.

It still needs some work when it comes to parsing work description information, especially with sub-elements (like Agent’s). I’d also love to hear suggestions for improving the output mechanism; it currently runs as a simple CGI, so the result page’s HTML is manually emitted with print statements. Any suggestions for making this work smarter?

date:2003-10-15 09:00:00
category:ccValidator, python

New Hosting

So if you’re seeing this blog post, the DNS records have sufficiently propogated, and you’re viewing at it’s new home on Nothing to see here, move along, please.

date:2003-10-14 23:02:00

Ahhh… Now I Understand

Descriptors, like meta-classes, are a feature of Python that I didn’t really understand up until now. Raymond Hettinger has written an excellent How-To Guide for Descriptors, which clearly explains and demonstrates their use. My biggest suprise is that (unlike meta-classes) I already knew how to use Descriptors, I just didn’t have the vocabulary to adequately explain them or an understanding of the underlying machinary.

Reading explanations of advanced Python features always leaves me feeling a little overwhelmed, yet incredibly empowered: “you mean I can do that with so little code?”

date:2003-10-14 12:36:17


So this is my fourth (and hopefully final) attempt at a blog. With each preceding instance I either became too lazy, too busy or too enamoured with other blogging software to keep things up. This time will be different. I swear.

So my short term goals for

  • make the templates not suck (well, suck less)
  • get my photo albums uploaded and into a psuedo-manageable state
  • post witty commentary and review of all things related to my life

We’ll see how many of those actually happen, and how soon. Stay tuned.

date:2003-10-09 15:06:07