Chapter 4. Command-Line Interface

 < Day Day Up > 

RT 2.0 included a basic command-line interface (CLI), which was simply a Perl script. It was mostly feature complete but wasn't heavily used. Because it operated independently of an RT server, it had to load all of the RT libraries before it could execute. This made it slow and tough to use interactively. It also was difficult to install, since any machine that ran it needed to have the full compliment of Perl modules, access to the database machine that was running RT, and the ability to read RT's configuration file, which includes sensitive information like the password for the database.

For RT 3.0, however, the CLI was rewritten from the ground up to be simple, lightweight, and well-suited for automated use. Instead of loading all of RT for each invocation, it does its work with an RT server over the Web. Furthermore, the API that the CLI uses to communicate with an RT server is well-documented and available for any client, written in any language. The CLI can run on any machine with Perl installed, and it doesn't require RT itself to be installed. All it requires is a network connection.

RT's CLI, generally installed as rt, can query the database, look at tickets or users, and even edit their contents. Although you can use rt from the command line in a shell session, it is also suited to being used from another program. This chapter explains how to set rt up, how to integrate it into your particular environment, and how to use it in a number of different scenarios.

     < Day Day Up > 


    RT Essentials
    RT Essentials
    ISBN: 0596006683
    EAN: 2147483647
    Year: 2005
    Pages: 166

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net