15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/jabber-tee/cli.rb', line 15
def command
Choosy::Command.new :'jabber-tee' do
printer :standard
executor Executor.new
section 'Description:' do
para 'This is a simple tool for reading from STDIN and writing to both STDOUT and a remote jabber server. It does not handle reading from STDERR, so you will need to re-direct 2>&1 before piping it to this tool.'
para 'The configuration file should live under ~/.jabber-tee.yml. Please see http://github.com/gabemc/jabber-tee for more information.'
end
section 'Connections:' do
string :username, "The [email protected] name used to connect to the jabber server."
string :password, "The password for the user to connect with to the jabber server. If not given, it must be defined in your configuration file."
string :nick, "The nickname to use when connecting to the server."
string :Profile, "The name of the profile defined in the ~/.jabber-tee.yml or /etc/jabber-tee.yml configuration file to connect with."
end
section 'Ouput: (One required)' do
string :to, "Who to send the message to."
string :room, "The room to send the messages to."
end
section 'Informative:' do
help
version Choosy::Version.load_from_parent
end
arguments do |builder|
metaname '[-- COMMAND]'
count :at_least => 0
end
end
end
|