Command Line Tools

From Creative Commons
Revision as of 11:59, 4 January 2006 by Nathan Yergler (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CC Command Line Tools

The CC Command Line Interface Tools (CLI Tools) are a set of Python scripts which can be used to insert or read license information from the command line. The basic scripts are stored in the cli-tools module in Berlios SVN.

Getting the CLI Tools From Subversion

The primary tool scripts are stored in the cli-tools module in Berlios SVN. The scripts also rely on additional modules, which are tracked using svn:externals properties. To check out a working copy of the trunk from anonymous SVN into a directory named cli-tools, issue the following command (Linux or Mac OS X):

 svn checkout svn://svn.berlios.de/cctools/cli-tools/trunk cli-tools

That's it; you're all set.

Using the CLI Tools

This page describes how to use the current command line interface tools. This page assumes you've already checked out the tools.

cct.py

cct.py is used to embed a license claim in a file and generate the cooresponding license RDF. Currently MP3 is the only supported format. Running cct.py with the --help flag will show a simple help screen:

$ python cct.py --help
usage: cct.py [options] filenames 
options:
  -o HOLDER, --holder=HOLDER
                        The copyright holder for the files
  -y YEAR, --year=YEAR  The copyright year for the files
  -l LICENSE, --license=LICENSE
                        URL of the embedded license
  -v VALIDATION, --validation=VALIDATION
                        Validation URL for this file
  --version             show program's version number and exit
  -h, --help            show this help message and exit

ccl.py

ccl.py is used to examine a license claim embedded in a file. If a verification URL is specified, ccl.py will attempt to verify the license claim. Currently MP3 is the only supported format. Running ccl.py with the --help flag will show a simple help screen:

$ python ccl.py --help
usage: ccl.py [options] filenames
options:
  -d, --display  Display the license claim; do not verify.
  --version      show program's version number and exit
  -h, --help     show this help message and exit

claim.py

claim.py is used to embed a license claim in a file. Unlike cct.py, claim.py does not generate verification RDF, and takes a fully formed TCOP statement instead of the pieces needed to generate one. Currently MP3 is the only supported format. Running claim.py with the --help flag will show a simple help screen:

$ python claim.py --help
usage: claim.py [options] filenames
options:
  -t TCOP, --tcop=TCOP  Complete copyright statement to embed.
  --version             show program's version number and exit
  -h, --help            show this help message and exit

This page contains basic developer documentation for the CC CLI Tools.

Hacking the CLI Tools

Adding file formats

Building and Distributing

Linux

Mac OS X

Windows