Grokking the Lizard

So I spent most of my morning on Friday attempting to grok the state of Mozilla/Firebird/Gecko plugin development. Actually, I’ve come to realize that plugin is the wrong term: an extension is what I really want to build. It’s another of the Creative Commons tech challenges ; building a plugin/toolbar/extension for a web browser which either shows or changes when the page contains licensing meta-data.

After several hours of cursing at XUL, RDF and JavaScript, I have a prototype. OK, less than a prototype, but something: a toolbar button and status bar text that will display licensing RDF (if any) when clicked. It only works in Mozilla Firebird right now, but it seems to work equally well on all platforms. For the life of me I can’t figure out how to catch navigation events so that I can go about changing the icon, etc. Anybody, anybody?

date:2003-10-26 13:45:11
wordpress_id:21
layout:post
slug:grokking-the-lizard
comments:
category:mozCC

Magnets are cool; or, Yet another validator update

I’ve been reading the Magnet URI Spec, and the idea behind it’s pretty cool. It’s basically a way to connect documents on the Internet with services provided locally. In the case of the examples given on the website, many of them apply to P2P services. So if I find a song I love and want to share it with a friend, I can e-mail the magnet URI to her and clicking on it will open her P2P app. Cool.

Of course, ccValidator “just happens” to support magnets; if it sees something that looks like a Magnet URN, it constructs a magnet link from it. This leads me to my second point, that I’ve once again updated ccValidator. The changes and fixes are relatively few. Magnets are now constructed to also contain an optional dn, or Display Name, parameter. The display name is extracted from the dc:identifier tag in the work metadata. Also, the validator won’t barf now if it gets an error code when retrieving the URL (404, etc).

Have fun with it, and as always, feedback is welcome.

date:2003-10-24 18:43:34
wordpress_id:20
layout:post
slug:magnets-are-cool-or-yet-another-validator-update
comments:
category:ccValidator

Thoughts on the future of ccLicense.py

With the Validator up and running, I’ve been thinking more about cclicense.py, 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
wordpress_id:19
layout:post
slug:thoughts-on-the-future-of-cclicensepy
comments:
category:ccRdf

Validator Improvments

I’ve just moved an improved license validator into place . While I had initially planned to migrate away from straight-CGI coding with this update, the gods were against me. I started prototyping in Quixote , and ran into problems with Unicode encoding. So I decided to put the conversion on hold. If I figure out how to emit Unicode from Quixote, I’ll probably do this at some point in the future.

This update does, however, have some real improvements, all of which were suggested by the excellent testers on the cc-metadata mailing list. These include:

  • Seperate forms for URL or paste-in validation; previously the URL always overrode the text area, which could be frustrating
  • The addition of some sample RDF, as well as convenience buttons on the form
  • Better error reporting. If your RDF (XML) is not well-formed, the validator will now tell you where the error occurs (if it knows); more on this in a moment
  • When parsing a web page, problems in one RDF segment won’t affect validation of other segments
  • You can now view the raw RDF from the results page by clicking the show raw RDF links
  • Things that look like links, are
  • Magnets are properly magnetized
  • rdf:about is displayed
  • If a RDF segment does not contain a license, the validator says so, and then tells you what it might contain
  • Various cosmetic changes

With such a large number of changes, the source code layout has also changed. Instead of a single file, the code is now split into a handful of modules. I’ll have a tarball up later this evening.

A note regarding validation: currently the validator only “validates” as much as RDFlib does; I’m working on that. Further, if you receive some weird traceback, or an “unknown error” message, please e-mail me.

Thanks for all the suggestions and trouble reports; try it out and let me know what you think.

date:2003-10-23 16:40:18
wordpress_id:17
layout:post
slug:validator-improvments
comments:
category:ccValidator

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

What Should I Do With My Life?

|cover|What Should I Do With My Life?, by Po Bronson, is not really about what to do with your life. It’s really about how people make that decision; how they find their “passion” and what they do once they figure it out (if they do). An amazing read that I can’t put down right now.

date:2003-10-17 23:18:15
wordpress_id:12
layout:post
slug:what-should-i-do-with-my-life
comments:
category:reading