'\" t
.\" Title: fldigi-shell
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1
.\" Date: 10/24/2014
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "FLDIGI\-SHELL" "1" "10/24/2014" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
fldigi-shell \- program for controlling fldigi
.SH "SYNOPSIS"
.sp
\fBfldigi\-shell\fR [\fIOPTIONS\fR] [\fIFILE\fR]
.SH "DESCRIPTION"
.sp
The fldigi\-shell program controls fldigi(1) over HTTP via XML\-encoded remote procedure calls (XML\-RPC)\&. It can call any XML\-RPC method exported by fldigi, and also defines some useful commands of its own\&.
.SH "OPTIONS"
.PP
\fB\-d\fR
.RS 4
Enable debug output\&.
.RE
.PP
\fB\-u\fR \fIURL\fR
.RS 4
Use
\fIURL\fR
to access the server\&. Defaults to \(lqhttp://localhost:7362/RPC2\(rq, which corresponds to fldigi\(cqs default listen address and port\&.
.RE
.PP
\fB\-c\fR \fICOMMAND\fR
.RS 4
Execute command
\fICOMMAND\fR
and exit\&.
.RE
.SH "COMMANDS"
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.sp
The \(lqx:yz\(rq notation refers to the return type and argument type(s)\&. They are: \(lqn\(rq (nil), \(lqi\(rq (integer), and \(lqs\(rq (string)\&.
.sp .5v
.RE
.PP
debug (n:n:)
.RS 4
Toggle debug output\&.
.RE
.PP
eval (s:s)
.RS 4
Evaluate Perl code\&.
.RE
.PP
exit (n:n)
.RS 4
Exit the shell\&.
.RE
.PP
help (n:n)
.RS 4
Print help for server (fldigi) methods and shell commands\&.
.RE
.PP
history (s:n)
.RS 4
Print command history\&.
.RE
.PP
modems (s:n)
.RS 4
List all modem names\&.
.RE
.PP
poll (s:i)
.RS 4
Poll for new received text every
\fIi\fR
seconds\&. Defaults to
\fI1\fR\&.
.RE
.PP
pskrqsy (n:si)
.RS 4
QSY to
\fIi\fRth
best frequency for grid
\fIs\fR\&. The list of frequencies is retrieved from the PSK Reporter website; see
\fBRESOURCES\fR\&. The grid square string may be left empty, and the index argument defaults to
\fI0\fR
(first frequency)\&.
.RE
.PP
recvtext (s:n)
.RS 4
Get all received text\&.
.RE
.PP
reinit (n:n)
.RS 4
Fetch commands from the server and rebuild command list\&.
.RE
.PP
send (n:s)
.RS 4
Send text interactively, one line at a time\&.
.RE
.PP
sendchar (n:s)
.RS 4
Send text interactively, one character at a time\&.
.RE
.PP
sendfile (n:s)
.RS 4
Send text read from file
\fIs\fR\&.
.RE
.PP
sendstr (n:s)
.RS 4
Send string
\fIs\fR\&.
.RE
.PP
source (n:s)
.RS 4
Read commands from file
\fIs\fR\&.
.RE
.PP
time (s:s)
.RS 4
Time a command\&.
.RE
.PP
wait (n:s)
.RS 4
Wait for server TRX state to become
\fIs\fR\&.
.RE
.SH "EXTENDED DESCRIPTION"
.sp
The shell has three modes of operation:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
Interactive mode with history, tab completion and command line editing\&. This is the default mode when fldigi\-shell is run without arguments\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
Batch mode for a single command with the
\fB\-c\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
Batch mode to \(lqsource\(rq a file containing Perl code\&. Fldigi\-shell commands can be called using \(lqexecute("COMMAND [ARG \&...]")\(rq calls\&.
.RE
.SH "FILES"
.PP
$HOME/\&.fldigi/shell\-history
.RS 4
Contains the fldigi\-shell command history\&.
.RE
.SH "EXAMPLES"
.PP
while :; do fldigi\-shell \-c pskrqsy; sleep 900; done
.RS 4
Change to the \(lqbest frequency\(rq (see PSK Reporter) every fifteen minutes\&.
.RE
.SH "SEE ALSO"
.sp
fldigi(1), xmlrpc(1), readline(3), RPC::XML(3pm)
.SH "BUGS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Some additional command wrappers are needed\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Command completion should be enabled for the arguments of some commands\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The XML\-RPC handling code should probably go in a separate module\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
It should be possible to pass multiple
\fI\-c CMD\fR
arguments\&.
.RE
.SH "RESOURCES"
.sp
Fldigi web site: http://www\&.w1hkj\&.com/Fldigi\&.html
.sp
The PSK Automatic Propagation Reporter site can be found at http://www\&.pskreporter\&.info/
.sp
The GNU Readline Library: http://directory\&.fsf\&.org/project/readline/
.sp
XML\-RPC home page: http://www\&.xmlrpc\&.com/
.SH "AUTHOR"
.sp
Fldigi\-shell and this manual page were written by Stelios Bounanos, M0GLD \&.
.SH "COPYING"
.sp
License GPLv2+: GNU GPL version 2 or later\&.