|
| 1 | +<!DOCTYPE html> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <meta name="generator" content="pandoc" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> |
| 7 | + <title>PyRadio Remote Control Client</title> |
| 8 | + <style> |
| 9 | + body {padding: 2em;} |
| 10 | + @media screen and (max-width: 770px) { |
| 11 | + body {padding: 10px;} |
| 12 | + } |
| 13 | + body {max-width: 750px; margin: auto;} |
| 14 | + h2 {margin-top: 2.5em; border-bottom:1px solid SaddleBrown; color: SaddleBrown;} |
| 15 | + h3 {margin-top: 2em; color: SaddleBrown; text-decoration: underline SaddleBrown} |
| 16 | + h4 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;} |
| 17 | + h4:before {content: "# "; font-weight: bold; vertical-align: middle;} |
| 18 | + h5 {margin: 2em 0 1em 0; color: SaddleBrown; font-size: 1em;;} |
| 19 | + h5:before {content: "## "; font-weight: bold; vertical-align: middle;} |
| 20 | + p, table, ol, ul {margin-left: .8em;} |
| 21 | + STRONG {color: SaddleBrown;} |
| 22 | + dl {margin: 2em;} |
| 23 | + dd {margin: 1em;} |
| 24 | + dt {font-weight: bold;} |
| 25 | + 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;} |
| 26 | + TH {text-align: left; vertical-align: top; padding: 5px;color: SaddleBrown;border: 1px solid SaddleBrown; background-color: SaddleBrown; color: white;} |
| 27 | + TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;} |
| 28 | + 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;} |
| 29 | + .task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;} |
| 30 | + 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;} |
| 31 | + .indented {text-indent: -1.5em; padding-left: 1.5em; margin-left: 1em;} |
| 32 | + a{ color: SaddleBrown;} |
| 33 | +a:visited{color: SaddleBrown;} |
| 34 | +</style> |
| 35 | + <!--[if lt IE 9]> |
| 36 | + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> |
| 37 | + <![endif]--> |
| 38 | +</head> |
| 39 | +<body> |
| 40 | +<header id="title-block-header"> |
| 41 | +</header> |
| 42 | +<h1 style="color: SaddleBrown" id="pyradio-remote-control-client">PyRadio Remote Control Client</h1> |
| 43 | +<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> |
| 44 | +<!-- vim-markdown-toc Marked --> |
| 45 | +<ul> |
| 46 | +<li><a href="#remote-control-client">Remote Control Client</a> |
| 47 | +<ul> |
| 48 | +<li><a href="#command-line-parameters">Command line parameters</a></li> |
| 49 | +<li><a href="#how-it-works">How it works</a></li> |
| 50 | +</ul></li> |
| 51 | +</ul> |
| 52 | +<!-- vim-markdown-toc --> |
| 53 | +<p class="indented">[ <a href="index.html#remote-control-server">Return to main doc</a> ]</p> |
| 54 | +<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> |
| 55 | +<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> |
| 56 | +<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> |
| 57 | +<h3 id="command-line-parameters">Command line parameters</h3> |
| 58 | +<p>The following is the output of the “<strong>pyradio -h</strong>” command:</p> |
| 59 | +<pre>Usage: pyradio-client [-h] [--address] [-s SERVER_AND_PORT] [-r] [-t TIMEOUT] |
| 60 | + [command] |
| 61 | + |
| 62 | +PyRadio Remote Control Client |
| 63 | + |
| 64 | +General options: |
| 65 | + -h, --help Show this help message and exit |
| 66 | + --address List available servers |
| 67 | + |
| 68 | +Server Parameters: |
| 69 | + -s SERVER_AND_PORT, --server_and_port SERVER_AND_PORT |
| 70 | + Set the servers's IP and PORT (format: IP:PORT) |
| 71 | + -r, --reverse-detection |
| 72 | + Reverse server detection (when no server IP and PORT |
| 73 | + specified); detect headless server last, instead of |
| 74 | + headless server first |
| 75 | + -t TIMEOUT, --timeout TIMEOUT |
| 76 | + Set the timeout (default = 1.0) |
| 77 | + command The command to send to the server |
| 78 | +</pre> |
| 79 | +<h3 id="how-it-works">How it works</h3> |
| 80 | +<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> |
| 81 | +<p>The auto-detection functionality is based on parsing the “<em>server files</em>” (residing in the STATE directory).</p> |
| 82 | +<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> |
| 83 | +<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> |
| 84 | +<p>A list of available commands will be displayed when no command has been specified.</p> |
| 85 | +<p>A list of detected servers (and their address) can be obtained using the command:</p> |
| 86 | +<pre>$ pyradio-client --addr |
| 87 | + |
| 88 | +PyRadio Remote Control Server |
| 89 | + Headless server: 127.0.0.1:11111 |
| 90 | + Server: 127.0.0.1:9998</pre> |
| 91 | +<p>Then, the <strong>address</strong> reported can be used to contact a specific server:</p> |
| 92 | +<pre>pyradio-client -s 127.0.0.1:9998 i</pre> |
| 93 | +<p>The previous command will get the info page of the <strong>normal</strong> instance of a server.</p> |
| 94 | +</body> |
| 95 | +</html> |
0 commit comments