=pod =head1 NAME qdb-send - send a new event to the qdb-daemon ; talk with the qdb daemon =head1 SYNOPSIS Usage: qdb-send [-vqdh] -i [-c config] [server [port] ] qdb-send [-vqdh] [-t t ] [-c config] new|delete path option v : be verbose option q : be quiet option d : show debug info option h : show help message ; exit option t : timeout after $t seconds ; default [1] : no timer is set if $t == 0 option i : [interactive] ; talk with a qdb-server ; implies -t 0 default server : localhost default port : 22722 option c : use config-file $config ; default [/etc/qdb/conf] =head1 DESCRIPTION Program B is a simple, stand-alone script that sends one specified new event to a B-daemon. Alternative (with C<-i>) it lets you talk directly to the daemon. The main purpose of B is to provide a simple, low-impact interface to B for C and I-clients. Note that if B fails to deliver the new event to the server, the event is lost. To prevent this loss, B can be augmented to save undeliverd events to a file, to be retried later. =head1 OPTIONS =over 4 =item -q be quiet ; only errors =item -v be verbose ; show all actions =item -d show debug info ; internals =item -h show help ; exit =item -t I<$t> timeout after I<$t> seconds ; default 1 =item -i interactive ; talk to the daemon ; type 'C' to get help. For more details see below. =item -c use config I ; default : C, C =back =head1 CONFIG FILE The default locations of the config file is C. For syntax see the L manual page. =head2 config entries =over 4 =item port I Specify a number ; the default is : port 22722 =item secret I<$secret> Specify the server's I. There is no default. The secret is shared between the server and trusted clients. Program qdb-send uses $secret for authentication. =item server I<$server> New events are sent to a B-server. The default is server localhost =item db_init $bool =back Config options other then those listed above are silently ignored. =head1 INTERACTIVE MODE In interactive mode (with C<-i>), B connects with the configured server. You are prompted for commands. Remember that the server's response to a command is a json : { cmd ⇒ ..., err ⇒ ..., res ⇒ ... } The interaction is in I or I mode (default I). in I mode, B shows the results of commands, or error-messages if an error is returned. in I mode, B shows the returned json. Your commands are sent to the server, except for some I-commands. For the list of commands, see L section I. =head2 meta-commands Meta-command may be abbreviated to a unique prefix like C<.h> etc. The meta-commands are : =over 4 =item .auth authorise yourself, using the configured I<$secret> =item .help print a help message ; same as 'C' =item .pretty toggle I-mode ; you can't use B's C commands. =item .quit quit =back =head1 FILES /etc/qdb/conf : qdb-configuration =head1 SEE ALSO L, L =head1 LICENSE You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl 5.10.0 README file. =head1 AUTHOR =for html qdb-send © 2015-2017 Henk P. Penning - All rights reserved ; qdb-0.04-p12 - Thu Jan 5 12:58:15 2017 =for man Henk P. Penning, ; qdb-0.04-p12 - Thu Jan 5 12:58:15 2017 =cut