Proposed Changes to the Validator

Thanks to the feedback I’ve received about the Creative Commons license validator, I now have a list of improvements and changes to implement. I’ve also decided that now is the time to move away from emitting plain-jane HTML with print statements, and move to a framework that actually helps me out. To that end, I’ve initially decided to use Quixote. I’ve used Quixote casually a few times, and think it fits for a few reasons:

  • it’s lightweight
  • it’s very code oriented: a function or module is a page
  • it’s templating language is about as simple as you get

New things that will be implemented include better error messages, sample RDF in the form for instant gratification, and more useful summary of your RDF input. If you have any other suggestions, please let me know.

date:2003-10-22 09:10:35
wordpress_id:16
layout:post
slug:proposed-changes-to-the-validator
comments:
category:ccValidator

O’Reilly Emerging Technology Conference

Registration just opened for the Emerging Technology Conference, happening February 9-12, 2004 in San Diego. I’ve never been, but three things are motivating me to go. First, I’ve been to OSCON and loved it. Second, I’ve been to San Diego and loved it. Finally, the sessions look killer. Not only are sessions discussing the social aspects of software, but Python will be represented by the ever impressive Twisted folks.

date:2003-10-22 09:05:05
wordpress_id:15
layout:post
slug:oreilly-emerging-technology-conference
comments:
category:geek

XML generation made easy

Stoa is a project I work on for my day job; a Zope-based Student Information System we use at the school for everthing from scheduling and attendance to posting online content for courses. Stoa uses XML for a few internal tasks, and right now it uses a module I wrote to do the handling. The module is ugly. And expensive. Really ugly, really expensive.

So I’ve been struggling with ideas on how to consume and emit XML is a “Python-ic”, Zope-friendly way. JAXML seems to be a good choice for emitting Python. It has an amazingly simple API, and doesn’t get caught up in the SAXiness that seems to plague other XML tools (I know, I know, SAX is supposed to make our lives better, but it just gets in my way). Now to find an equally simple way to consume XML.

date:2003-10-20 09:07:40
wordpress_id:13
layout:post
slug:xml-generation-made-easy
comments:
category:python

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”:http://www.organigramme.net/; keep those bug reports coming.

date:2003-10-17 18:00:49
wordpress_id:11
layout:post
slug:yet-another-ccvalidator-update
comments:
category:ccValidator

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 ccLicense.py

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
wordpress_id:10
layout:post
slug:ccvalidator-fixes
comments:
category:ccValidator

Updated ccLicense.py Available

I’ve just posted an updated version of ccLicense.py, 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
wordpress_id:9
layout:post
slug:updated-cclicensepy-available
comments:
category:ccRdf

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 ccLicense.py. 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)
  • ccLicense.py 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
wordpress_id:8
layout:post
slug:why-didnt-i-think-of-that-sooner
comments:
category:ccRdf, ccValidator

ccLicense.py 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 cclicense.py. 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
wordpress_id:7
layout:post
slug:cclicensepy-01
comments:
category:ccRdf