NAME
App::Dochazka::CLI - Dochazka command line client
VERSION
Version 0.150
SYNOPSIS
Dochazka command line client.
bash$ dochazka-cli
Dochazka(2014-08-08) demo>
DESCRIPTION
App::Dochazka::CLI is the Command Line Interface (CLI) component of the Dochazka Attendance & Time Tracking system.
It implements a number of commands, which can be divided into three categories:
- Commands for generating HTTP requests
-
The CLI enables the user to generate HTTP requests to an App::Dochazka::REST server and view the server's responses. Commands in this category have a direct correlation with the REST server resources, always starting with one of the four basic HTTP methods supported by the REST server:
GET
,PUT
,POST
,DELETE
. Commands in this category are useful mainly for Dochazka developers, but may also be used by administrators and normal users -- e.g., for troubleshooting and ad hoc testing. Effort has been made to ensure that the CLI supports all the resources. See "Commands for generating HTTP requests". - Commands for Dochazka administrators
-
Dochazka administrators have access to all of Dochazka's resources and can call them directly by generating appropriate HTTP requests. This can be a bit tedious, however, so "shortcut" commands have been implemented for the more commonly used administrative procedures. See "Commands for Dochazka administrators".
- Commands for Dochazka users
-
Finally there are the day-to-day commands used by Dochazka users (employees of the organization) to enter attendance data, view their profile, generate reports, etc. See "Commands for Dochazka users".
COMMANDS
Commands for generating HTTP requests
Commands in this category start with the HTTP method and continue with the resource (except it is written with spaces instead of forward slashes) and concludes with the request entity, if any.
All CLI commands must be written on a single line of input, and commands in this category are no exception.
Examples:
- DELETE INTERVAL IID 24
-
The equivalent of
DELETE interval/iid/24
- POST DOCU TEXT "employee/eid/:eid"
-
The equivalent of
POST docu/text
with the request entity shown. - POST EMPLOYEE EID { "eid" : 15, "sec_id" : 340 }
-
Update the secondary ID of the employee with EID 15.
Commands for Dochazka administrators
Dochazka administrators have a frequent need to be able to do things like change an employee's privilege level or schedule, remove locks, etc. They also need to be able to view attendance data entered by employees. For these purposes they need convenient ways to specify the employee they are interested in.
Commands for Dochazka supervisors
Supervisors have the ability to view attendance data and other records belonging to their reports (e.g. employees in their team or department). These are a subset of the administrative commands.
Commands for Dochazka administrators
These commands are a subset of the commands introduced in the previous section - the main difference is that ordinary users can only view and act on their own attendance records, whereas administrators can do so on records of any employee.
PACKAGE VARIABLES AND EXPORTS
$current_date
The current date, as determined by
bin/dochazka-cli
$current_emp
The App::Dochazka::Model::Employee object of the current employee.
$current_priv
The privlevel of the current employee.
$debug_mode
Tells parser whether to display debug messages