Skip to content

Commit 9bbdb79

Browse files
committed
- Version 0.8.9.17 (0.9-beta13)
- adding titles log - changing versioning
1 parent 6d4b8db commit 9bbdb79

28 files changed

+764
-209
lines changed

Changelog

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2022-04-29 s-n-g
2+
* version 0.8.9.17 (0.9-beta13)
3+
* adding Title's Log
4+
* changing versioning
5+
* fixing user isntallation in build_install_pyradio
6+
* fixing python2 main.py crash (#153)
7+
* updating docs
8+
19
2022-03-15 s-n-g
210
* version 0.8.9.15 (0.9-beta12)
311
* fixing "0" and "$" insertion on RadioBrowser search window

README.html

+50-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;}
2525
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;}
2626
.task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;}
27-
img{display: block; margin-left: auto; margin-right: auto; max-width: 600px; 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;}
27+
img{display: block; margin-left: auto; margin-right: auto; max-width: 750; 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;}
2828
a{ color: SaddleBrown;}
2929
a:visited{color: SaddleBrown;}
3030
</style>
@@ -39,6 +39,7 @@ <h1 style="color: SaddleBrown"id="pyradio">PyRadio</h1>
3939
<p>Command line internet radio player.</p>
4040
<p>Ben Dowling - <a target="_blank" href="https://github.com/coderholic">https://github.com/coderholic</a></p>
4141
<a href="https://members.hellug.gr/sng/pyradio/pyradio.png" target="_blank"><img src="https://members.hellug.gr/sng/pyradio/pyradio.png" alt="Pyradio" /></a>
42+
4243
<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>
4344
<!-- vim-markdown-toc Marked -->
4445
<ul>
@@ -97,6 +98,10 @@ <h2 id="table-of-contents">Table of Contents <span style="padding-left: 10px;"><
9798
<li><a href="#using-transparency">Using transparency</a></li>
9899
</ul></li>
99100
<li><a href="#mouse-support">Mouse support</a></li>
101+
<li><a href="#titles-logging">Titles logging</a>
102+
<ul>
103+
<li><a href="#tagging-a-title">Tagging a title</a></li>
104+
</ul></li>
100105
<li><a href="#online-radio-directory-services">Online radio directory services</a></li>
101106
<li><a href="#session-locking">Session Locking</a>
102107
<ul>
@@ -145,6 +150,14 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
145150
<h2 id="changelog">Changelog <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
146151
<pre style="height: 200px;">
147152

153+
2022-04-29 s-n-g
154+
* version 0.8.9.17 (0.9-beta13)
155+
* adding Title's Log
156+
* changing versioning
157+
* fixing user isntallation in build_install_pyradio
158+
* fixing python2 main.py crash (#153)
159+
* updating docs
160+
148161
2022-03-15 s-n-g
149162
* version 0.8.9.15 (0.9-beta12)
150163
* fixing "0" and "$" insertion on RadioBrowser search window
@@ -826,6 +839,7 @@ <h3 id="tiling-manager-modes">Tiling manager modes</h3>
826839
</ul></li>
827840
</ol>
828841
<a href="https://members.hellug.gr/sng/pyradio/pyradio-limited-display.jpg" target="_blank"><img src="https://members.hellug.gr/sng/pyradio/pyradio-limited-display.jpg" alt="Pyradio reduced to the “Limited display”" /></a>
842+
829843
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> These two modes do not work on Windows, either 7 or 10. The “<em>Console</em>”window will shrink as desired, but will not always notify <strong>PyRadio</strong> about it, so results will vary.</p>
830844
<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>
831845
<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>
@@ -924,6 +938,7 @@ <h3 id="cjk-characters-support">CJK characters support</h3>
924938
<p>The <em>Line editor</em> supports the insertion of <a target="_blank" href="https://en.wikipedia.org/wiki/CJK_Unified_Ideographs">CJK Unified Ideographs</a>, as described on <a target="_blank" href="https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)">CJK Unified Ideographs (Unicode block)</a> also known as URO, abbreviation of Unified Repertoire and Ordering. These characters, although encoded as a single code-point (character), actually take up a 2-character space, when rendered on the terminal.</p>
925939
<p>A depiction of the editor’s behavior can be seen at this image:</p>
926940
<a href="https://members.hellug.gr/sng/pyradio/pyradio-editor.jpg" target="_blank"><img src="https://members.hellug.gr/sng/pyradio/pyradio-editor.jpg" alt="CJK Characters on Pyradio" /></a>
941+
927942
<h2 id="moving-stations-around">Moving stations around <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
928943
<p>Rearranging the order of the stations in the playlist is another feature <strong>PyRadio</strong> offers.</p>
929944
<p>All you have to do is specify the <em>source</em> station (the station to be moved) and the position it will be moved to (<em>target</em>).</p>
@@ -1021,6 +1036,7 @@ <h4 id="using-the-command-line">Using the command line</h4>
10211036
<h4 id="using-the-configuration-window">Using the Configuration Window</h4>
10221037
<p>When the user uses the configuration window (shown in the following image), he is presented with an interface which will permit him to select the player to use with <strong>PyRadio</strong> and edit its extra parameters.</p>
10231038
<a href="https://members.hellug.gr/sng/pyradio/pyradio-player-selection.jpg" target="_blank"><img src="https://members.hellug.gr/sng/pyradio/pyradio-player-selection.jpg" alt="PyRadio Player Selectio Window" /></a>
1039+
10241040
<p>Each of the supported players can have up to 11 sets of extra parameters (the first one is the default).</p>
10251041
<p>The user can add (“<strong>a</strong>”) a new parameter, edit (“<strong>e</strong>”) an existing set and delete (“<strong>x</strong>” or “<strong>DEL</strong>”) one.</p>
10261042
<h3 id="changing-parameters-set">Changing parameters set</h3>
@@ -1071,6 +1087,7 @@ <h2 id="displaying-station-info">Displaying Station Info <span style="padding-le
10711087
<p>After a connection to a station has been established (after playback has started), just press “<strong>i</strong>” to display the station’s info.</p>
10721088
<p>The window that appears includes the “<em>Playlist Name</em>” (the station name we have in the playlist) and the “<em>Reported Name</em>” (the name the station transmitted to us) among other fields; an example can bee seen here:</p>
10731089
<a href="https://members.hellug.gr/sng/pyradio/pyradio-station-info.jpg" target="_blank"><img src="https://members.hellug.gr/sng/pyradio/pyradio-station-info.jpg" alt="PyRadio Station Info Window" /></a>
1090+
10741091
<p>If these two names are not identical, the user can press “<strong>r</strong>” to rename the station in the playlist using the “<em>Reported Name</em>”. This way an unknown station (when only the URL is known) can be correctly identified (after being inserted in a playlist with a dummy station name).</p>
10751092
<h2 id="copying-and-pasting---registers">Copying and pasting - Registers <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
10761093
<p><strong>PyRadio</strong> takes the concept of <strong>registers</strong> from <a target="_blank" href="https://www.vim.org">vim</a>, and adapts their function to its own needs. So this is how it all works.</p>
@@ -1131,6 +1148,10 @@ <h2 id="mouse-support">Mouse support <span style="padding-left: 10px;"><sup styl
11311148
<p>All one has to do is enable mouse support in the “<em>Config Window</em>” (mouse support is disabled by default) and restart <strong>PyRadio</strong> for the change to take effect.</p>
11321149
<p>Then, the mouse can be used as follows:</p>
11331150
<table>
1151+
<colgroup>
1152+
<col style="width: 26%" />
1153+
<col style="width: 73%" />
1154+
</colgroup>
11341155
<thead>
11351156
<tr class="header">
11361157
<th>Action</th>
@@ -1160,6 +1181,34 @@ <h2 id="mouse-support">Mouse support <span style="padding-left: 10px;"><sup styl
11601181
</tr>
11611182
</tbody>
11621183
</table>
1184+
<h2 id="titles-logging">Titles logging <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
1185+
<p>Version <strong>0.8.9.17</strong> adds to <strong>PyRadio</strong> the ability to log the titles displayed at the bottom of its window, in a log file, for refference.</p>
1186+
<p>The logger, which works independantly from the “<em>degub</em>” function, is actually a <a target="_blank" href="https://docs.python.org/3/library/logging.handlers.html#logging.handlers.RotatingFileHandler">Rotating File Handler</a>, configured to write up to 5 files of around 50KB each (parameters <strong>maxBytes=50000</strong> and <strong>backupCount=5</strong>).</p>
1187+
<p>The way this works, according to the documenataion, is that one “can use the <strong>maxBytes</strong> and <strong>backupCount</strong> values to allow the file to rollover at a predetermined size. When the size is about to be exceeded, the file is closed and a new file is silently opened for output. Rollover occurs whenever the current log file is nearly <strong>maxBytes</strong> in length… When <strong>backupCount</strong> is non-zero, the system will save old log files by appending the extensions ‘.1’, ‘.2’ etc., to the filename. For example, with a backupCount of 5 and a base file name of <strong>app.log</strong>, you would get <em>app.log</em>, <em>app.log.1</em>, <em>app.log.2</em>, up to <em>app.log.5</em>. The file being written to is always <strong>app.log</strong>. When this file is filled, it is closed and renamed to <em>app.log.1</em>, and if files <em>app.log.1</em>, <em>app.log.2</em>, etc. exist, then they are renamed to <em>app.log.2</em>, <em>app.log.3</em> etc. respectively.</p>
1188+
<p>The function can be enabled:</p>
1189+
<ol type="1">
1190+
<li>using the -lt (--log-titles) command line parameter, or</li>
1191+
<li>by pressing “<strong>W</strong>” while in the <strong>Main</strong>, the <strong>Playlist</strong> or the <strong>Register</strong> mode.</li>
1192+
</ol>
1193+
<p>The titles are written in a file called pyradio-titles.log which is saved at <strong>PyRadio</strong> configuration directory.</p>
1194+
<p>Log file sample:</p>
1195+
<pre>Apr 18 (Mon) 13:12 | &gt;&gt;&gt; Station: Lounge (Illinois Street Lounge - SomaFM)
1196+
Apr 18 (Mon) 13:12 | Jack Costanzo - La Cumparsa, Harlem Nocturne
1197+
Apr 18 (Mon) 13:14 | Don Baker Trio - Third Man Theme
1198+
Apr 18 (Mon) 13:16 | Gillian Hills - Un Petit Baiser</pre>
1199+
<h3 id="tagging-a-title">Tagging a title</h3>
1200+
<p>An extra functionality is made possible because of “<em>titles’s logging</em>”: tagging a title (something like liking a song).</p>
1201+
<p>The idea is that the user plays a station and hears a song he likes and want to look it up later. With this functionality, he can tag the song (make a note in the log file), so he can refer to it at a later time.</p>
1202+
<p>To tag a title, one has to press the “<strong>w</strong>” key.</p>
1203+
<p>Then, if titles’s logging is already enabled, the log file will have an entry similar to the one shown below:</p>
1204+
<pre>Apr 18 (Mon) 13:39 | Tom Russell - Bus Station
1205+
Apr 18 (Mon) 13:40 | Tom Russell - Bus Station (LIKED)</pre>
1206+
<p>If title’s logging is not enabled, it will be turned on, the song will be tagged and logging will be turned off again:</p>
1207+
<pre>Apr 18 (Mon) 15:38 | === Logging started
1208+
Apr 18 (Mon) 15:38 | &gt;&gt;&gt; Station: Folk (Folk Forward - SomaFM)
1209+
Apr 18 (Mon) 15:38 | Lord Huron - Lullaby
1210+
Apr 18 (Mon) 15:38 | Lord Huron - Lullaby (LIKED)
1211+
Apr 18 (Mon) 15:38 | === Logging stopped</pre>
11631212
<h2 id="online-radio-directory-services">Online radio directory services <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
11641213
<p><strong>PyRadio</strong> supports the following <em>Online radio directory services</em>:</p>
11651214
<ul>

README.md

+48
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Ben Dowling - [https://github.com/coderholic](https://github.com/coderholic)
66

77
![Pyradio](https://members.hellug.gr/sng/pyradio/pyradio.png)
88

9+
910
## Table of Contents
1011
<!-- vim-markdown-toc Marked -->
1112

@@ -47,6 +48,8 @@ Ben Dowling - [https://github.com/coderholic](https://github.com/coderholic)
4748
* [PyRadio Themes](#pyradio-themes)
4849
* [Using transparency](#using-transparency)
4950
* [Mouse support](#mouse-support)
51+
* [Titles logging](#titles-logging)
52+
* [Tagging a title](#tagging-a-title)
5053
* [Online radio directory services](#online-radio-directory-services)
5154
* [Session Locking](#session-locking)
5255
* [Session unlocking](#session-unlocking)
@@ -744,6 +747,51 @@ Then, the mouse can be used as follows:
744747
| **Wheel** | Scroll up / down |
745748
| **Shift-Wheel** | Adjust volume<br>(does not work with all terminals) |
746749

750+
## Titles logging
751+
752+
Version **0.8.9.17** adds to **PyRadio** the ability to log the titles displayed at the bottom of its window, in a log file, for refference.
753+
754+
The logger, which works independantly from the "*degub*" function, is actually a [Rotating File Handler](https://docs.python.org/3/library/logging.handlers.html#logging.handlers.RotatingFileHandler), configured to write up to 5 files of around 50KB each (parameters **maxBytes=50000** and **backupCount=5**).
755+
756+
The way this works, according to the documenataion, is that one "can use the **maxBytes** and **backupCount** values to allow the file to rollover at a predetermined size. When the size is about to be exceeded, the file is closed and a new file is silently opened for output. Rollover occurs whenever the current log file is nearly **maxBytes** in length… When **backupCount** is non-zero, the system will save old log files by appending the extensions ‘.1’, ‘.2’ etc., to the filename. For example, with a backupCount of 5 and a base file name of **app.log**, you would get *app.log*, *app.log.1*, *app.log.2*, up to *app.log.5*. The file being written to is always **app.log**. When this file is filled, it is closed and renamed to *app.log.1*, and if files *app.log.1*, *app.log.2*, etc. exist, then they are renamed to *app.log.2*, *app.log.3* etc. respectively.
757+
758+
The function can be enabled:
759+
760+
1. using the `-lt` (`--log-titles`) command line parameter, or
761+
2. by pressing "**W**" while in the **Main**, the **Playlist** or the **Register** mode.
762+
763+
The titles are written in a file called `pyradio-titles.log` which is saved at **PyRadio** configuration directory.
764+
765+
Log file sample:
766+
767+
```
768+
Apr 18 (Mon) 13:12 | >>> Station: Lounge (Illinois Street Lounge - SomaFM)
769+
Apr 18 (Mon) 13:12 | Jack Costanzo - La Cumparsa, Harlem Nocturne
770+
Apr 18 (Mon) 13:14 | Don Baker Trio - Third Man Theme
771+
Apr 18 (Mon) 13:16 | Gillian Hills - Un Petit Baiser
772+
```
773+
774+
### Tagging a title
775+
776+
An extra functionality is made possible because of "*titles's logging*": tagging a title (something like liking a song).
777+
778+
The idea is that the user plays a station and hears a song he likes and want to look it up later. With this functionality, he can tag the song (make a note in the log file), so he can refer to it at a later time.
779+
780+
To tag a title, one has to press the "**w**" key.
781+
782+
Then, if titles's logging is already enabled, the log file will have an entry similar to the one shown below:
783+
784+
Apr 18 (Mon) 13:39 | Tom Russell - Bus Station
785+
Apr 18 (Mon) 13:40 | Tom Russell - Bus Station (LIKED)
786+
787+
If title's logging is not enabled, it will be turned on, the song will be tagged and logging will be turned off again:
788+
789+
Apr 18 (Mon) 15:38 | === Logging started
790+
Apr 18 (Mon) 15:38 | >>> Station: Folk (Folk Forward - SomaFM)
791+
Apr 18 (Mon) 15:38 | Lord Huron - Lullaby
792+
Apr 18 (Mon) 15:38 | Lord Huron - Lullaby (LIKED)
793+
Apr 18 (Mon) 15:38 | === Logging stopped
794+
747795
## Online radio directory services
748796

749797
**PyRadio** supports the following *Online radio directory services*:

0 commit comments

Comments
 (0)