Simple Garage

From Stunts Wiki

Simple Garage, also known as sgar for its command line program file name, is a garage managing tool created by Cas. It has the particular characteristic of being command line based. Simple Garage features its own command line interpreter, but can also be called to perform individual commands, opening the door for external scripting. It can run in GNU/Linux as well as in DOS and Windows.

Configuration

Simple Garage operates by managing two directories: Stunts directory and a garage directory. When run, it looks for a configuration file called sgar.cfg, where each line contains a configuration item, followed by an equals sign and its value. The following configuration items can be found:

  • stunts - The directory where Stunts can be found
  • garage - The directory that will be used for parking cars (putting away from Stunts)
  • locked - A list of car IDs separated by commas that should not be moved
  • group - A list of car IDs preceded by a group name followed by a colon. There can be many groups

For Simple Garage to work, all you need is to specify the two directories. The rest can be set up within the program environment. Commands can be used to list cars and move them back and forth between Stunts and the garage, creating and deleting groups, assigning cars to them, etc.

Calling commands

Commands consist of a command name and often one or more parameters, separated by spaces. Where a parameter represents a car, it can also be a group of cars. Actual groups are specified with an identifier preceeded by a pound sign (#), whereas ad-hoc groups can be issued by giving a list of car IDs separated by commas. In place of any car ID, a filter can be used, that is, a part of the car name. Following is a list of the commands available in Simple Garage:

  • addto <group> <car(s)> - Adds cars to a group
  • bring <car(s)> - Brings cars out of the garage and to Stunts
  • car <car ID> - Retrieves information about a specific car
  • cars - Returns the count of cars in Stunts and the garage
  • delgroup <group> - Deletes a group
  • dirs - Outputs the currently set Stunts and garage directory paths
  • exit - Exits the command line interface
  • groups - Lists all groups
  • groupthese <group> - Creates a group out of the cars currently in Stunts
  • gs - Short for groups
  • gt <group> - Short for groupthese
  • help [filters] - Shows help
  • l <car(s)> - Short for list
  • lg <car(s)> - Lists cars in the garage
  • list <car(s)> - Lists all cars both in Stunts and the garage
  • lock <car ID> - Locks a car so that it won't move when other commands are executed
  • locked - Lists currently locked cars
  • lp <car(s)> - Stands for "list parked", same as lg
  • ls <car(s)> - Lists cars in Stunts
  • only <group> - Brings every car in the given group to Stunts and moves every other to the garage
  • park <car(s)> - Moves cars to the garage
  • quit - Same as exit
  • removefrom <group> <car(s)> - Removes cars from a group
  • retrieve <car(s)> - Same as bring
  • rf <group> <car(s)> - Short for removefrom
  • rmgroup <group> - Same as delgroup
  • unlock <car ID> - Unlocks a car so that it can be freely moved by other commands
  • version - Displays the current program version