Skip to content

Commit 3911adb

Browse files
committed
- version 0.8.8-beta3
- changing number presentation - updating docs
1 parent 945b44f commit 3911adb

File tree

9 files changed

+135
-395
lines changed

9 files changed

+135
-395
lines changed

Changelog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2020-10-30 s-n-g
2+
* Version 0.8.8-beta3
3+
* Re-implementing status bar output function
4+
* Connection timeout counter will be visible at 70% of timeout value
5+
* Player will be aware of mid-session connection timeout changes
6+
* Changing numbers presentation (adding "G" and "J" suffixes)
7+
* Adding a program termination speed up
8+
* Changing new version detection function
9+
No update notification will be displayed due to this change
10+
* Fixing TUI breaks due to multi-threading
11+
112
2020-10-13 s-n-g
213
This is a long-overdue update!
314
This is a called a beta release in the sense that some

README.html

Lines changed: 19 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -5,138 +5,26 @@
55
<meta name="generator" content="pandoc" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
77
<title>PyRadio README</title>
8-
<style>
8+
<style type="text/css">
99
html {margin: 2em;}
1010
h2 {margin-top: 2.5em; border-bottom:1px solid #D6D6D6;}
1111
h3 {margin-top: 2em;}
1212
dl {margin: 2em;}
1313
dd {margin: 1em;}
1414
dt {font-weight: bold;}
1515
pre { background-color: #F6F6F6; padding: 1.5em; border: 1px solid #E6E6E6; overflow: auto;}
16-
html {
17-
line-height: 1.7;
18-
font-family: Georgia, serif;
19-
font-size: 20px;
20-
color: #1a1a1a;
21-
background-color: #fdfdfd;
22-
}
23-
body {
24-
margin: 0 auto;
25-
max-width: 40em;
26-
padding-left: 50px;
27-
padding-right: 50px;
28-
padding-top: 50px;
29-
padding-bottom: 50px;
30-
hyphens: auto;
31-
word-wrap: break-word;
32-
text-rendering: optimizeLegibility;
33-
font-kerning: normal;
34-
}
35-
@media (max-width: 600px) {
36-
body {
37-
font-size: 0.9em;
38-
padding: 1em;
39-
}
40-
}
41-
@media print {
42-
body {
43-
background-color: transparent;
44-
color: black;
45-
}
46-
p, h2, h3 {
47-
orphans: 3;
48-
widows: 3;
49-
}
50-
h2, h3, h4 {
51-
page-break-after: avoid;
52-
}
53-
}
54-
p {
55-
margin-top: 1.7em;
56-
}
57-
a {
58-
color: #1a1a1a;
59-
}
60-
a:visited {
61-
color: #1a1a1a;
62-
}
63-
img {
64-
max-width: 100%;
65-
}
66-
h1, h2, h3, h4, h5, h6 {
67-
margin-top: 1.7em;
68-
}
69-
ol, ul {
70-
padding-left: 1.7em;
71-
margin-top: 1.7em;
72-
}
73-
li > ol, li > ul {
74-
margin-top: 0;
75-
}
76-
blockquote {
77-
margin: 1.7em 0 1.7em 1.7em;
78-
padding-left: 1em;
79-
border-left: 2px solid #e6e6e6;
80-
font-style: italic;
81-
}
82-
code {
83-
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
84-
background-color: #f0f0f0;
85-
font-size: 85%;
86-
margin: 0;
87-
padding: .2em .4em;
88-
}
89-
pre {
90-
line-height: 1.5em;
91-
padding: 1em;
92-
background-color: #f0f0f0;
93-
overflow: auto;
94-
}
95-
pre code {
96-
padding: 0;
97-
overflow: visible;
98-
}
99-
hr {
100-
background-color: #1a1a1a;
101-
border: none;
102-
height: 1px;
103-
margin-top: 1.7em;
104-
}
105-
table {
106-
border-collapse: collapse;
107-
width: 100%;
108-
overflow-x: auto;
109-
display: block;
110-
}
111-
th, td {
112-
border-bottom: 1px solid lightgray;
113-
padding: 1em 3em 1em 0;
114-
}
115-
header {
116-
margin-bottom: 6em;
117-
text-align: center;
118-
}
119-
nav a:not(:hover) {
120-
text-decoration: none;
121-
}
122-
code{white-space: pre-wrap;}
123-
span.smallcaps{font-variant: small-caps;}
124-
span.underline{text-decoration: underline;}
125-
div.column{display: inline-block; vertical-align: top; width: 50%;}
126-
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
127-
ul.task-list{list-style: none;}
128-
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
16+
code{white-space: pre-wrap;}
17+
span.smallcaps{font-variant: small-caps;}
18+
span.underline{text-decoration: underline;}
19+
div.column{display: inline-block; vertical-align: top; width: 50%;}
12920
</style>
130-
<!--[if lt IE 9]>
131-
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
132-
<![endif]-->
13321
</head>
13422
<body>
135-
<header id="title-block-header">
23+
<header>
13624
</header>
13725
<h1 id="pyradio">PyRadio</h1>
13826
<p>Command line internet radio player.</p>
139-
<p>Ben Dowling - <a target="_blank" href="https://github.com/coderholic">https://github.com/coderholic</a></p>
27+
<p>Ben Dowling - <a target="_blank" href="https://github.com/coderholic" class="uri">https://github.com/coderholic</a></p>
14028
<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></style></h2>
14129
<ul>
14230
<li><a href="#requirements">Requirements</a></li>
@@ -168,7 +56,7 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
16856
<li>MPV, MPlayer or VLC installed and in your path.</li>
16957
</ul>
17058
<h2 id="installation">Installation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
171-
<p>The best way to install <strong>PyRadio</strong> is via a distribution package, if one exists (e.g. <em>Arch Linux</em> and derivatives can install <a target="_blank" href="https://aur.archlinux.org/packages/pyradio-git/">pyradio-git</a> from AUR).</p>
59+
<p>The best way to install <strong>PyRadio</strong> is via a distribution package, if one exists (e.g. <em>Arch Linux</em> and derivatives can install <a target="_blank" href="https://aur.archlinux.org/packages/pyradio-git/">pyradio-git</a> from AUR).</p>
17260
<p>In any other case, and since <strong>PyRadio</strong> is currently not available via pip, you will have to <a href="build.html">build it from source</a>.</p>
17361
<h2 id="command-line-options">Command line options <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
17462
<pre>$ pyradio -h
@@ -234,12 +122,16 @@ <h2 id="controls">Controls <span style="padding-left: 10px;"><sup style="font-si
234122
/ n N Search, go to next / previous result [Valid] [Valid]
235123
J Create a jump tag
236124
&lt;n&gt;^U &lt;n&gt;^D Move station up / down. - -
125+
&#39; \ y Get into Registers, Extra Commands y (yank) is not applicable -
126+
and Yank modes, respectively
237127
? Show keys help [Valid] [Valid]
238128
# Redraw window [Valid] [Valid]
239129
Esc/q Quit - -
240130
Esc/q/Left/h - Cancel / close window Cancel / close window</pre>
241131
<p>The same logic applies to all <strong>PyRadio</strong> windows.</p>
242132
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> All windows - except the <em>Search window</em> - support changing the volume and muting / unmuting the player (provided that <strong>PyRadio</strong> is actually connected to a station).</p>
133+
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> When inserting numbers (either to jump to a station or to move a station), the number will be displayed at the right bottom corner of the window, suffixed by a “<em>G</em>”, i.e. pressing <em>35</em> will display <em>[35G]</em>.</p>
134+
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> When tagging a station position for a move action (by pressing “<strong>J</strong>”), the position will be displayed at the right bottom corner of the window, suffixed by a “<em>J</em>”, i.e. pressing “<em>J</em>” on position <em>35</em> will display <em>[35J]</em>.</p>
243135
<h2 id="pyradios-modes">PyRadio’s Modes <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
244136
<p><strong>PyRadio</strong> has the following primary modes:</p>
245137
<ol type="1">
@@ -257,17 +149,17 @@ <h2 id="pyradios-modes">PyRadio’s Modes <span style="padding-left: 10px;"><sup
257149
</ol>
258150
<p>The functions available through the <em>secondary modes</em> are content dependent, so you can see what command is available by pressing “<strong>?</strong>” while within a secondary mode. Pressing any other key will exit the secondary mode.</p>
259151
<h2 id="config-file">Config file <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
260-
<p><strong>PyRadio</strong> upon its execution tries to read its configuration file (i.e. <em>~/.config/pyradio/config</em>). If this file is not found, it will be created. If an error occurs while parsing it, an error message will be displayed and <strong>PyRadio</strong> will terminate.</p>
152+
<p><strong>PyRadio</strong> upon its execution tries to read its configuration file (i.e. <em>~/.config/pyradio/config</em>). If this file is not found, it will be created. If an error occurs while parsing it, an error message will be displayed and <strong>PyRadio</strong> will terminate.</p>
261153
<p>The file contains parameters such as the player to use, the playlist to load etc. It is heavily commented (as you can see <a href="pyradio/config">here</a>), so that manual editing is really easy. The best practice to manually edit this file is executing <strong>PyRadio</strong> with the <strong>-ocd</strong> command line option, which will open the configuration directory in your file manager, and then edit it using your preferable text editor.</p>
262154
<p>The file can also be altered while <strong>PyRadio</strong> is running by pressing “<strong>c</strong>”, which will open the “<strong>Configuration window</strong>”. This window presents all <strong>PyRadio</strong> options and provide the way to change them and finally save them by pressing “<strong>s</strong>”.</p>
263155
<p>In any case, <strong>PyRadio</strong> will save the file before exiting (or in case Ctrl-C is pressed) if needed (e.g. if a config parameter has been changed during its execution).</p>
264156
<p>If saving the configuration file fails, <strong>PyRadio</strong> will create a back up file and terminate. When restarted, <strong>PyRadio</strong> will try to restore previously used settings from the said back up file.</p>
265157
<h2 id="about-playlist-files">About Playlist files <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
266158
<p><strong>PyRadio</strong> reads the stations to use from a CSV file, where each line contains two columns, the first being the station name and the second being the stream URL.</p>
267159
<p>Optionally, a third column can be inserted, stating the encoding used by the station (more on this at <a href="#specifying-stations-encoding">Specifying stations’ encoding</a>).</p>
268-
<p><strong>PyRadio</strong> will by default load the user’s stations file (e.g. <em>~/.config/pyradio/stations.csv</em>) to read the stations from. If this file is not found, it will be created and populated with a default set of stations.</p>
160+
<p><strong>PyRadio</strong> will by default load the user’s stations file (e.g. <em>~/.config/pyradio/stations.csv</em>) to read the stations from. If this file is not found, it will be created and populated with a default set of stations.</p>
269161
<p style="margin: 1.5em 4em 0 4em; text-indent: -2em;"><strong>Tip:</strong> If you already have a custom <em>stations.csv</em> file, but want to update it with <strong>PyRadio</strong>’s default one, you just rename it, run <strong>PyRadio</strong> (so that the default one get created) and then merge the two files.</p>
270-
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> Older versions used to use <strong>~/.pyradio</strong> as default stations file. If this file is found, it will be copied to use’s config directory (e.g. <strong>~/.config/pyradio</strong>) and renamed to <strong>stations.csv</strong> or if this file exists, to <strong>pyradio.csv</strong>. In this case, this file will be the default one.</p>
162+
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> Older versions used to use <strong>~/.pyradio</strong> as default stations file. If this file is found, it will be copied to use’s config directory (e.g. <strong>~/.config/pyradio</strong>) and renamed to <strong>stations.csv</strong> or if this file exists, to <strong>pyradio.csv</strong>. In this case, this file will be the default one.</p>
271163
<h3 id="specifying-a-playlist-to-load-command-line">Specifying a playlist to load (command line)</h3>
272164
<p><strong>PyRadio</strong> will normally load its default playlist file, as described above, upon its execution. A different file can be loaded when the <strong>-s</strong> command line option is used.</p>
273165
<p>The <strong>-s</strong> option will accept:</p>
@@ -371,7 +263,7 @@ <h3 id="global-encoding-declaration">Global encoding declaration</h3>
371263
<p>This would be useful in the case where most of your stations do not use <strong>utf-8</strong>. Instead of editing the playlist and add the encoding to each and every affected station, you just set it globally.</p>
372264
<h3 id="finding-the-right-encoding">Finding the right encoding</h3>
373265
<p>A valid encoding list can be found at:</p>
374-
<p><a target="_blank" href="https://docs.python.org/2.7/library/codecs.html#standard-encodings">https://docs.python.org/2.7/library/codecs.html#standard-encodings</a></p>
266+
<p><a target="_blank" href="https://docs.python.org/2.7/library/codecs.html#standard-encodings" class="uri">https://docs.python.org/2.7/library/codecs.html#standard-encodings</a></p>
375267
<p>replacing <strong>2.7</strong> with specific version: <strong>3.0</strong> up to current python version.</p>
376268
<h2 id="player-detection-selection">Player detection / selection <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
377269
<p><strong>PyRadio</strong> is basically built around the existence of a valid media player it can use. Thus, it will auto detect the existence of its supported players upon its execution.</p>
@@ -390,15 +282,15 @@ <h2 id="player-default-volume-level">Player default volume level <span style="pa
390282
<p>This is done by typing “<strong>v</strong>” right after setting a desired volume level.</p>
391283
<h3 id="mpv">MPV</h3>
392284
<p>MPV uses profiles to customize its behavior.</p>
393-
<p><strong>PyRadio</strong> defines a profile called “<strong>[pyradio]</strong>” in MPV’s configuration file (e.g. <em>~/.config/mpv/mpv.conf</em>). This profile will be used every time playback is started.</p>
285+
<p><strong>PyRadio</strong> defines a profile called “<strong>[pyradio]</strong>” in MPV’s configuration file (e.g. <em>~/.config/mpv/mpv.conf</em>). This profile will be used every time playback is started.</p>
394286
<p>Example:</p>
395287
<pre>volume=100
396288

397289
[pyradio]
398290
volume=50</pre>
399291
<h3 id="mplayer">MPlayer</h3>
400292
<p>MPlayer uses profiles to customize its behavior as well.</p>
401-
<p><strong>PyRadio</strong> defines a profile called “<strong>[pyradio]</strong>” in MPV’s configuration file (e.g. <em>~/.mplayer/config</em>). This profile will be used every time playback is started.</p>
293+
<p><strong>PyRadio</strong> defines a profile called “<strong>[pyradio]</strong>” in MPV’s configuration file (e.g. <em>~/.mplayer/config</em>). This profile will be used every time playback is started.</p>
402294
<p>Example:</p>
403295
<pre>volume=100
404296

@@ -438,7 +330,7 @@ <h2 id="copying-and-pasting---registers">Copying and pasting - Registers <span s
438330
<ul>
439331
<li><strong>p</strong>” while editing a playlist or register.</p></li>
440332
<li><strong>\p</strong>” while editing a playlist or register. This would open the “<em>Paste selection</em>” window.</p></li>
441-
<li><strong>\p</strong>” in the “<em>Playlist Selection</em> or the”<em>Registers</em>" window.</p></li>
333+
<li><strong>\p</strong>” in the “<em>Playlist Selection</em> or the”<em>Registers</em>&quot; window.</p></li>
442334
</ul>
443335
<h2 id="pyradio-themes">PyRadio Themes <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
444336
<p><strong>PyRadio</strong> comes with 6 preconfigured (hard coded) themes:</p>

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ c Open Configuration window. -
110110
/ n N Search, go to next / previous result [Valid] [Valid]
111111
J Create a jump tag
112112
<n>^U <n>^D Move station up / down. - -
113+
' \ y Get into Registers, Extra Commands y (yank) is not applicable -
114+
and Yank modes, respectively
113115
? Show keys help [Valid] [Valid]
114116
# Redraw window [Valid] [Valid]
115117
Esc/q Quit - -
@@ -120,6 +122,10 @@ The same logic applies to all **PyRadio** windows.
120122

121123
**Note:** All windows - except the *Search window* - support changing the volume and muting / unmuting the player (provided that **PyRadio** is actually connected to a station).
122124

125+
**Note:** When inserting numbers (either to jump to a station or to move a station), the number will be displayed at the right bottom corner of the window, suffixed by a "*G*", i.e. pressing *35* will display *[35G]*.
126+
127+
**Note:** When tagging a station position for a move action (by pressing "**J**"), the position will be displayed at the right bottom corner of the window, suffixed by a "*J*", i.e. pressing "*J*" on position *35* will display *[35J]*.
128+
123129

124130
## PyRadio's Modes
125131

0 commit comments

Comments
 (0)