piano |
[-cdvgm ] [-r ]
[-s ] [-h
host] [-p
port] [-U
username] [-P
password] [command
[Arguments ...]] |
piano
issues commands to and retreives
data from
pianod(1),
allowing shell scripts or interactive access without having to go through
telnet(1)
or nc(1).
Options allow formatting data in various ways, either convenient for reading
(interactive use) or in more raw forms (for further processing).
If no command is given, retrieves the playback status (playing,
paused, stopped, etc.) instead of issuing a command; status is indicated
only by exit status unless -v
is given.
-c
- In output, include numeric status codes.
-d
- Data only; in output, strip the field names.
-v
- Verbose. Output status text instead of just returning a status code.
Applies to checking status or playlist.
-g
- Report diagnostic information (3xx messages).
-m
- Multiple record format. Includes
pianod's
end-of-data message at the end of the output, which is extraneous for
single records but useful when processing multiple records.
-r
- Report remaining time in current track. Returned as a number of seconds,
suitable for passing to
sleep(1).
-s
- Use a secure connection.
-h
host
- The host on which
pianod
is running. Defaults to localhost, or $PIANOD_HOST if set.
-p
port
- The port at which to connect to
pianod.
By default, connections are attempted at 4445.
piano
can connect to either the line or HTTP
port.
-U
user
- The user to authenticate on the server. Not all commands require
authentication; if neither this option or the corresponding environment
variable are indicated, then authentication is not performed.
-P
password
- The password to authenticate with.
The exit statuses are:
- 0
- Success, or the server is playing (including between tracks or
stalled).
- 1
- Command or query error, or the server is paused or stopped.
- 254
- A transport mechanism cannot be found.
- 255
- Server cannot be reached, did not respond, or otherwise did something
unexpected
Perette Barella <perette@deviousfish.com>.
Copyright Perette Barella. piano
is
available under the MIT license.