-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathclient.html
92 lines (88 loc) · 5.74 KB
/
client.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>PyRadio Remote Control Client</title>
<style>
body {padding: 2em;}
@media screen and (max-width: 770px) {
body {padding: 10px;}
}
body {max-width: 750px; margin: auto;}
h2 {margin-top: 2.5em; border-bottom:1px solid SaddleBrown; color: SaddleBrown;}
h3 {margin-top: 2em; color: SaddleBrown; text-decoration: underline SaddleBrown}
h4 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;}
h4:before {content: "# "; font-weight: bold; vertical-align: middle;}
h5 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;;}
h5:before {content: "## "; font-weight: bold; vertical-align: middle;}
p, table, ol, ul {margin-left: .8em;}
STRONG {color: SaddleBrown;}
dl {margin: 2em;}
dd {margin: 1em;}
dt {font-weight: bold;}
TABLE {border: 1px solid SaddleBrown; border-collapse: collapse; margin-left: auto; margin-right: auto; border-radius: 5px; -moz-border-radius: 5px; border-collapse:separate; box-shadow: 5px 5px 15px #888888;}
TH {text-align: left; vertical-align: top; padding: 5px;color: SaddleBrown;border: 1px solid SaddleBrown; background-color: SaddleBrown; color: white;}
TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;}
pre { background-color: rgba(245, 245, 245, 1); color: #474747; padding: 1.5em; border: 1px solid #C7C7C7; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; overflow: auto; box-shadow: 5px 5px 15px #C7C7C7;}
.task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;}
img{display: block; margin-left: auto; margin-right: auto; max-width: 750px; width: 100%; background:transparent; padding:3px; border:1px solid #999999; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow:5px 5px 15px #888888;}
.indented {text-indent: -1.5em; padding-left: 1.5em; margin-left: 1em;}
a{ color: SaddleBrown;}
a:visited{color: SaddleBrown;}
</style>
</head>
<body>
<header id="title-block-header">
</header>
<h1 style="color: SaddleBrown" id="pyradio-remote-control-client">PyRadio Remote Control Client</h1>
<h2 id="table-of-contents">Table of Contents <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<!-- vim-markdown-toc Marked -->
<ul>
<li><a href="#remote-control-client">Remote Control Client</a>
<ul>
<li><a href="#command-line-parameters">Command line parameters</a></li>
<li><a href="#how-it-works">How it works</a></li>
</ul></li>
</ul>
<!-- vim-markdown-toc -->
<p class="indented">[ <a href="index.html#remote-control-server">Return to main doc</a> ]</p>
<h2 id="remote-control-client">Remote Control Client <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
<p><strong>PyRadio</strong> comes with a client to be used in conjunction with the <strong>Remote Control Server</strong> provided by the program, using the server’s text command set.</p>
<p>The <strong>client</strong> is created with maximum ease in mind; the user does not even have to provide the IP and PORT.</p>
<h3 id="command-line-parameters">Command line parameters</h3>
<p>The following is the output of the “<strong>pyradio -h</strong>” command:</p>
<pre>Usage: pyradio-client [-h] [--address] [-s SERVER_AND_PORT] [-r] [-t TIMEOUT]
[command]
PyRadio Remote Control Client
General options:
-h, --help Show this help message and exit
--address List available servers
Server Parameters:
-s SERVER_AND_PORT, --server_and_port SERVER_AND_PORT
Set the server IP and PORT (format: IP:PORT)
-r, --reverse-detection
Reverse server detection (when no server IP and PORT
specified); detect headless server last, instead of
headless server first
-t TIMEOUT, --timeout TIMEOUT
Set the timeout (default = 1.0)
command The command to send to the server
</pre>
<h3 id="how-it-works">How it works</h3>
<p>The client will auto-detect the <strong>PyRadio Servers</strong> running on the system, when the “<em>-s</em>” command line parameter is not used.</p>
<p>The auto-detection functionality is based on parsing the “<em>server files</em>” (residing in the STATE directory).</p>
<p>If both a <strong>headless</strong> and a <strong>normal</strong> instance of <strong>PyRadio</strong> are detected, the <strong>headless</strong> server will be used to send the requested command, unless the “<em>-r</em>” (“<em>–reverse-detection</em>”) command line parameter is used.</p>
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> A <strong>normal</strong> server is a server started by a <strong>PyRadio</strong> instance which is executed on a real terminal, without the “<em>–headless</em>” command line parameter.</p>
<p>A list of available commands will be displayed when no command has been specified.</p>
<p>A list of detected servers (and their address) can be obtained using the command:</p>
<pre>$ pyradio-client --addr
PyRadio Remote Control Server
Headless server: 127.0.0.1:11111
Server: 127.0.0.1:9998</pre>
<p>Then, the <strong>address</strong> reported can be used to contact a specific server:</p>
<pre>pyradio-client -s 127.0.0.1:9998 i</pre>
<p>The previous command will get the info page of the <strong>normal</strong> instance of a server.</p>
</body>
</html>