Gitlab CI - Debugging
[tpg/opendispense2.git] / docs / dispense.1
1 .TH dispense 1 "June 17, 2011" "OpenDispense2" "USER COMMANDS"
2 .SH NAME
3 dispense \- OpenDispense2 command line client
4 .SH SYNOPSIS
5 .B dispense
6 [\-hG]
7 .RI "[\-u " "user" "]"
8 .PP
9 .B dispense
10 .RI "[\-u " "user" "]"
11 .I item
12 .PP
13 .B dispense
14 .RI "[\-u " "user" "]"
15 .I command
16 .I args...
17
18 .SH DESCRIPTION
19 The
20 .B dispense
21 command provides access to the UCC's coke machine and other systems. It can be used to drop a drink, open the door, or pay for other items.
22
23 If called with no arguments,
24 .B dispense
25 displays an interactive list of avaliable items. This list can be navigated using the arrow keys, enter/return (for select) and q/ESC to quit.
26
27 If the first argument is not a recognised command (see below) then
28 .B dispense
29 attempts to interpret the argument as an item name, and if it matches, dispenses the item.
30
31 .SH OPTIONS
32 .TP
33 \-h, \--help
34 Display a list of commands and options
35 .TP
36 \-G
37 Use a non-interactive list instead of the ncurses interface.
38
39 .SH SUB-COMMANDS
40 .SS "All users"
41 .TP
42 .RI "give " "user amount reason"
43 Give some money to another user (e.g. for pizza).
44
45 .TP
46 .RI "acct [" "user" "]"
47 List users (including balances and flags).
48
49 .TP
50 .RI "donate " "amount reason"
51 Give money to the club (for whatever reason)
52
53 .SS "Door Members"
54 .TP
55 .RI "door"
56 Open the UCC door.
57
58 .SS "Coke Controllers"
59
60 .TP
61 .RI "acct " "user" " [+-]" "amount" " '" "reason" "'"
62 Alter a user's balance by
63 .I amount
64 cents, leaving a reason for the coke logs. Implemented as a transfer of
65 .I amount
66 cents from '>additions' to the user.
67
68 .TP
69 .RI "refund " "user item_id" " [" "price" "]"
70 Refund a bad dispense for a user (the item_id can be found in the coke log usually).
71 It is is of the form <type>:<slot>, for example coke:6 or snack:33.
72
73 .TP
74 .RI "slot " "item_id price name"
75 Update a slot's contents (name and price).
76
77 .SS "Administrators"
78
79 .TP
80 .RI "acct " "user" " =" "amount" " '" reason "'"
81 Set a user's balance to a number of cents.
82
83 This function will use the '>countersum' account as the source/sink for money to make the users
84 balance as requested
85
86 .TP
87 .RI "user add " "username"
88 Create a new account with the specified username.
89
90 .TP
91 .RI "user type " "username flags"
92 Alter the flags on a user. Valid flags are user, coke, admin, internal and disabled.
93 Flags can be removed by prepending the flag with a '-'.
94
95 .SH EXIT STATUS
96
97 .TP
98 0
99 Success
100
101 .TP
102 1
103 Invalid item selected
104
105 .TP
106 2
107 Bad username for 
108 .B acct
109 or
110 .B -u
111
112 .TP
113 3
114 You are not permitted to perform that action
115
116 .TP
117 4
118 Invalid arguments passed
119
120 .TP
121 5
122 Insufficient balance avaliable
123
124 .TP
125 -1
126 Unknown error
127
128 .TP
129 -2
130 Socket/connection error of some form
131
132 .TP
133 -3
134 Unknown response from the server
135
136 .SH AUTHOR
137 John Hodge ([email protected])

UCC git Repository :: git.ucc.asn.au