October 29, 2007

Live license-friendly with liblicense

Author: Nathan Willis

Creative Commons (CC) cares about licensing. It has drafted and shared its own suite of licenses for artistic works catering to a wide range of needs, advocated license awareness, and contributed to projects that make both finding and publishing CC-licensed works simpler. Now it is seeking to make licensing enlightenment an everyday part of desktop computer usage with liblicense.

Liblicense is cross-platform, portable C library that allows developers to make applications "license-aware" with respect to data files. An app can check to see if a file has a license attached or embedded, and can enable the user to choose and attach a license in friendly, readable form. A CC project, liblicense is naturally focused on the CC licenses for creative works, but the idea has value for all sorts of data, and perhaps even source code.

The latest release of liblicense is 0.4, from August 2007. It works by implementing an application programming interface (API) consisting of about two dozen functions, with which apps can query files for license specifics -- including details such as version number and jurisdiction -- and write license information out to files. Considerable work has gone into ensuring that the library can properly handle licenses embedded in files, in human-readable language, and in machine-readable, verifiable form.

Individual modules allow liblicense to support a wide variety of filetypes and the different forms licensing info takes in each of them. MP3 and Ogg Vorbis audio files may specify a license in their respective formats' native tag systems, for example, while JPEG images are more likely to use XMP. Still other formats, such as Flash, have no standard metadata format; in these cases liblicense can use RDF to associate external licensing information with the file.

Lawyer up

CC provides liblicense releases as source code, i386 RPMs, and DEB packages for both Debian and Ubuntu. In addition to the library itself, a command-line utility called license is available, as are an extension for GNOME's Nautilus file manager and a tool with which to select a default content license on a per-user basis.

The Nautilus extension adds a "License" tab to the Properties dialog box; with it you can see the associated license for a file, or assign a new license -- when you are the copyright holder, of course.

Running the command-line utility as license foo.jpg will return the license of foo.jpg. Without arguments, license simply returns the user's default content license, or reports that there isn't one. You can set your own default content license by running default-content-license &. The GUI license selector thus invoked presents you with a checklist of CC license attributes, allowing you to choose the license you want by its features, rather than forcing you to try to remember the names of the CC license menagerie.

Other utilities are linked to from the project pages, such as the MozCC plugin for Firefox. But small utilities, useful though they may be, are unlikely to engender a revolution in license awareness. The time to apply a license to content on desktop systems is when it is created, and to make that commonplace requires real application support.

The CC wiki lists applications that already support reading and writing license info. That list is short, but the list below it is more encouraging: quite a few apps have enhancement requests filed for the feature in their bug tracking systems. It includes content-creation apps such as the GIMP and OpenOffice.org, and general usage apps like music players and Web browsers.

Past, present, and future adoption

CC Community Developer Jon Phillips and liblicense maintainer Asheesh Laroia describe the goal of the project as adding license assignment to the "pre-flight check" users perform when creating any sort of document. As sharing photos, music, and written words becomes easier, it becomes more important to think about deciding on a license at the point of creation, so that that decision can be passed along with the file itself, rather than be repeated for every copy of the file made.

At liblicense's desktop integration wiki pages, you can find mockups of ways to integrate the library into existing apps. Adding a drop-down license field to the Save File dialog box is the smoothest -- it is unobtrusive and fits in well with other file-saving decision factors such as formatting and compression settings.

The germ of the idea for liblicense first came to Phillips several years ago while he was working on the Open Clip Art Library. A self-confessed "metadata nut," he saw that the need to search for content based on its license would be just as important as the need to search for content based on keywords, timestamp, or any other factor.

CC has been successful in bringing license awareness to public Web services like Flickr and the Internet Archive, but desktop software remained an important missing link. But the movement picked up with the Inkscape vector editor's incorporation of license info into its supported metadata. Inkscape developers expressed an interest in a more general-purpose solution, and so liblicense was born.

2007 has so far seen four releases of liblicense, and CC mentored a Google Summer of Code project to incorporate it into the Tracker desktop search tool. Like Nautilus, Tracker is a GNOME project, but Phillips and Laroia assure KDE fans that they will soon see license support in their desktop environment too. Liblicense is tentatively slated for inclusion with KDE 4.1 as part of the Dolphin file manager.

CC has also worked hard to include a licensing "activity" in the One Laptop Per ChildXO, integrated into the Journal package. The exact nature of the system -- in particular with relation to setting a default content license -- is trickier on the XO, due to the disparate jurisdictions in which the devices will be deployed and their use by minors, but it is on track to make the 1.0 release.

There is not yet a mailing list dedicated to liblicense, but if you want to follow its progress, CC does actively update its wiki pages, including a point-release-by-point-release roadmap. Integration with more desktop apps, such as Miro and Eye of GNOME, is already on the map.

Meanwhile, developers of all sorts of applications -- desktop Linux or otherwise -- should look into liblicense. It is lightweight and highly portable; Laroia says it should compile and run on Mac OS X and Windows just as easily as on Linux. CC has written an in-depth tutorial about all aspects of the project, from the API to the command-line utilities to the GUI tools.

Users today understand what licensing is and how it applies to the documents and creative works they apply. But, as Laroia and Phillips point out, without the ability to work with that knowledge on a per-file basis, that knowledge goes to waste.


  • Legal
Click Here!