Difference between revisions of "Command Line Tools"
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category:opensource]] | |
+ | [[Category:Technology]] | ||
+ | [[Category:Developer]] | ||
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 <code>cli-tools</code> module in Berlios SVN. | 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 <code>cli-tools</code> module in Berlios SVN. | ||
+ | |||
+ | '''These tools currently lag behind [[CcLookup]] in functionality. They will be updated when the libraries for [[CcLookup]] stabilize.''' | ||
== Getting the CLI Tools From Subversion == | == Getting the CLI Tools From Subversion == | ||
− | The primary tool scripts are stored in the <code>cli-tools</code> module in Berlios SVN | + | The primary tool scripts are stored in the <code>cli-tools</code> module in Berlios SVN. 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 | + | $ svn checkout svn://svn.berlios.de/cctools/cli-tools/trunk cli-tools |
That's it; you're all set. | That's it; you're all set. | ||
+ | |||
+ | == Building the Tools == | ||
+ | |||
+ | The CC CLI Tools are written in Python, and utilize [http://python.org/pypi/zc.buildout zc.buildout] for the build process. Starting with the Python interpreter, the Subversion checkout can download and build the necessary dependencies. To start the buildout process, you need to bootstrap your installation: | ||
+ | |||
+ | $ cd cli-tools | ||
+ | $ python bootstrap/bootstrap.py | ||
+ | |||
+ | The bootstrap script will download zc.buildout and [http://peak.telecommunity.com/DevCenter/setuptools setuptools], which are required to complete the build process. After you have bootstrapped your checkout, you can build the software: | ||
+ | |||
+ | $ ./bin/buildout | ||
+ | |||
+ | The buildout process will grab Python Eggs for the software dependencies. The scripts will be placed in the <code>./bin</code> subdirectory. Note that these scripts will contain '''absolute paths''' to the dependency eggs. | ||
== Using the CLI Tools == | == Using the CLI Tools == | ||
− | This page describes how to use the current command line interface tools. This page assumes you've already | + | This page describes how to use the current command line interface tools. This page assumes you've already checked out and built the tools as described above. |
− | === cct | + | === cct === |
− | <code>cct | + | <code>cct</code> is used to embed a license claim in a file and generate the cooresponding license RDF. Currently MP3 is the only supported format. Running <code>cct</code> with the <code>--help</code> flag will show a simple help screen: |
− | $ | + | $ ./bin/cct --help |
− | usage: cct | + | usage: cct [options] filenames |
options: | options: | ||
-o HOLDER, --holder=HOLDER | -o HOLDER, --holder=HOLDER | ||
Line 32: | Line 49: | ||
-h, --help show this help message and exit | -h, --help show this help message and exit | ||
− | === ccl | + | === ccl === |
− | <code>ccl | + | <code>ccl</code> 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 <code>ccl</code> with the <code>--help</code> flag will show a simple help screen: |
− | $ | + | $ ./bin/ccl --help |
− | usage: ccl | + | usage: ccl [options] filenames |
options: | options: | ||
-d, --display Display the license claim; do not verify. | -d, --display Display the license claim; do not verify. | ||
Line 43: | Line 60: | ||
-h, --help show this help message and exit | -h, --help show this help message and exit | ||
− | === claim | + | === claim === |
− | <code>claim | + | <code>claim</code> is used to embed a license claim in a file. Unlike cct, claim 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 <code>claim</code> with the <code>--help</code> flag will show a simple help screen: |
− | $ python claim | + | $ python claim --help |
− | usage: claim | + | usage: claim [options] filenames |
options: | options: | ||
-t TCOP, --tcop=TCOP Complete copyright statement to embed. | -t TCOP, --tcop=TCOP Complete copyright statement to embed. | ||
--version show program's version number and exit | --version show program's version number and exit | ||
-h, --help show this help message and exit | -h, --help show this help message and exit | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 17:17, 20 February 2007
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.
These tools currently lag behind CcLookup in functionality. They will be updated when the libraries for CcLookup stabilize.
Contents
Getting the CLI Tools From Subversion
The primary tool scripts are stored in the cli-tools
module in Berlios SVN. 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.
Building the Tools
The CC CLI Tools are written in Python, and utilize zc.buildout for the build process. Starting with the Python interpreter, the Subversion checkout can download and build the necessary dependencies. To start the buildout process, you need to bootstrap your installation:
$ cd cli-tools $ python bootstrap/bootstrap.py
The bootstrap script will download zc.buildout and setuptools, which are required to complete the build process. After you have bootstrapped your checkout, you can build the software:
$ ./bin/buildout
The buildout process will grab Python Eggs for the software dependencies. The scripts will be placed in the ./bin
subdirectory. Note that these scripts will contain absolute paths to the dependency eggs.
Using the CLI Tools
This page describes how to use the current command line interface tools. This page assumes you've already checked out and built the tools as described above.
cct
cct
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
with the --help
flag will show a simple help screen:
$ ./bin/cct --help usage: cct [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
ccl
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
with the --help
flag will show a simple help screen:
$ ./bin/ccl --help usage: ccl [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
claim
is used to embed a license claim in a file. Unlike cct, claim 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
with the --help
flag will show a simple help screen:
$ python claim --help usage: claim [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