cs445 - Spring 2013Project - Command Line InterfaceThe general format of a command is: $ lfss command [ command_options [ arguments ] ] where lfs is short for Lion Fish Scuba Software, command is one the several things the software can do, command_options are options for the various commands available, and arguments are the various values that go with the command options. Examples $ lfss tour view will show all the tours in the system, past and present. $ lfss tour view --start_date 20130701 --end_date 20130731 will show only the tours in the system between 7/1/2013 and 7/31/2013. In this latest example tour is the command, view is the command option, and start_date and end_date are arguments for view, introduced by double dashes (the long form of arguments) Commands
tour commandsadd$ lfss tour add --date --start_time --duration --price --seats --name --description The command will return the tour detail, including the tour_id. Example
$ lfss tour add --date 20130702 --start_time 10:00 --duration 90 --price 25.50 --seats 8 \ delete$ lfss tour delete --tour_id The command will delete the tour with the specified tour_id provided that no seat on this tour has been booked. Example
$ lfss tour delete --tour_id 123
cancel$ lfss tour cancel --tour_id The command will cancel the tour with the specified tour_id: money will be refunded to all customer who have booked this tour and each of them will be notified of the cancellation. Example
$ lfss tour cancel --tour_id 123
view$ lfss tour [ view ] [ --tour_id ] [ --start_date ] [ --end_date ] This is the default command option for tour. Without any tour_id and with no dates all the tours in the system will be displayed, active or cancelled. If a date is provided only tours after or before the date will be displayed. If a tour_id is provided, then only information about that tour will be displayed. Example
$ lfss tour
load$ lfss tour load --file This will load tour information from a file. The file can be XML or JSON. The command will print information about all the tours created. Example
$ lfss tour load --file new_tours_20130409.xml
user commandsadd$ lfss user add --first_name --last_name --email [ --cc_number --expiration_date --security_code --phone ] The command will create a new user and return the user detail, including the user_id. If a user with the same email address exists, then the command will return an error and detail about the existing user. Example
$ lfss user add --first_name Bob --last_name Retter --email bob.retter@example.com Additional detail coming soon.
$Id: command-line.html,v 1.1 2013/04/09 18:43:10 virgil Exp virgil $ |