You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2id="table-of-contents">Table of Contents <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
<h2id="changelog">Changelog <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
146
151
<prestyle="height: 200px;">
147
152
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
+
148
161
2022-03-15 s-n-g
149
162
* version 0.8.9.15 (0.9-beta12)
150
163
* fixing "0" and "$" insertion on RadioBrowser search window
<ahref="https://members.hellug.gr/sng/pyradio/pyradio-limited-display.jpg" target="_blank"><imgsrc="https://members.hellug.gr/sng/pyradio/pyradio-limited-display.jpg" alt="Pyradio reduced to the “Limited display”" /></a>
842
+
829
843
<pstyle="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>
830
844
<h2id="config-file">Config file <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
831
845
<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>
<p>The <em>Line editor</em> supports the insertion of <atarget="_blank" href="https://en.wikipedia.org/wiki/CJK_Unified_Ideographs">CJK Unified Ideographs</a>, as described on <atarget="_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>
925
939
<p>A depiction of the editor’s behavior can be seen at this image:</p>
926
940
<ahref="https://members.hellug.gr/sng/pyradio/pyradio-editor.jpg" target="_blank"><imgsrc="https://members.hellug.gr/sng/pyradio/pyradio-editor.jpg" alt="CJK Characters on Pyradio" /></a>
941
+
927
942
<h2id="moving-stations-around">Moving stations around <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
928
943
<p>Rearranging the order of the stations in the playlist is another feature <strong>PyRadio</strong> offers.</p>
929
944
<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>
1021
1036
<h4id="using-the-configuration-window">Using the Configuration Window</h4>
1022
1037
<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>
1023
1038
<ahref="https://members.hellug.gr/sng/pyradio/pyradio-player-selection.jpg" target="_blank"><imgsrc="https://members.hellug.gr/sng/pyradio/pyradio-player-selection.jpg" alt="PyRadio Player Selectio Window" /></a>
1039
+
1024
1040
<p>Each of the supported players can have up to 11 sets of extra parameters (the first one is the default).</p>
1025
1041
<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>
@@ -1071,6 +1087,7 @@ <h2 id="displaying-station-info">Displaying Station Info <span style="padding-le
1071
1087
<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>
1072
1088
<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>
1073
1089
<ahref="https://members.hellug.gr/sng/pyradio/pyradio-station-info.jpg" target="_blank"><imgsrc="https://members.hellug.gr/sng/pyradio/pyradio-station-info.jpg" alt="PyRadio Station Info Window" /></a>
1090
+
1074
1091
<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>
1075
1092
<h2id="copying-and-pasting---registers">Copying and pasting - Registers <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
1076
1093
<p><strong>PyRadio</strong> takes the concept of <strong>registers</strong> from <atarget="_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
1131
1148
<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>
1132
1149
<p>Then, the mouse can be used as follows:</p>
1133
1150
<table>
1151
+
<colgroup>
1152
+
<colstyle="width: 26%" />
1153
+
<colstyle="width: 73%" />
1154
+
</colgroup>
1134
1155
<thead>
1135
1156
<trclass="header">
1136
1157
<th>Action</th>
@@ -1160,6 +1181,34 @@ <h2 id="mouse-support">Mouse support <span style="padding-left: 10px;"><sup styl
1160
1181
</tr>
1161
1182
</tbody>
1162
1183
</table>
1184
+
<h2id="titles-logging">Titles logging <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" 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 <atarget="_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
+
<oltype="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>
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
+
<h3id="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>
<h2id="online-radio-directory-services">Online radio directory services <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
1164
1213
<p><strong>PyRadio</strong> supports the following <em>Online radio directory services</em>:</p>
@@ -47,6 +48,8 @@ Ben Dowling - [https://github.com/coderholic](https://github.com/coderholic)
47
48
*[PyRadio Themes](#pyradio-themes)
48
49
*[Using transparency](#using-transparency)
49
50
*[Mouse support](#mouse-support)
51
+
*[Titles logging](#titles-logging)
52
+
*[Tagging a title](#tagging-a-title)
50
53
*[Online radio directory services](#online-radio-directory-services)
51
54
*[Session Locking](#session-locking)
52
55
*[Session unlocking](#session-unlocking)
@@ -744,6 +747,51 @@ Then, the mouse can be used as follows:
744
747
|**Wheel**| Scroll up / down |
745
748
|**Shift-Wheel**| Adjust volume<br>(does not work with all terminals) |
746
749
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.
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:
0 commit comments