Skip to content

Commit ea95c19

Browse files
committed
- version 0.9.2.17
- adding -lr command line parameter - renaming recording.png to cover.png - -updating docs
1 parent 2b491ab commit ea95c19

23 files changed

+1069
-131
lines changed

Changelog

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2023-11-03 s-n-g
2+
* version 0.9.2.17
3+
* Recorded MKV files will have a cover image by default
4+
(when MKVToolNix is installed)
5+
* Adding -mkv, -scv, -srt, -ach and -lr command line parameters
6+
(applicable when MKVToolNix is installed)
7+
* Rearranging and grouping options in the program's help screen
8+
* Working on scheduler (not applicable yet)
9+
* Updating docs
10+
111
2023-10-15 s-n-g
212
* version 0.9.2.16
313
* install.py: will terminate if python not in PATH
@@ -8,7 +18,7 @@
818
recording folder
919
* buffering can now be disabled (in 0.9.2.15, once buffering was
1020
enabled, it could not be disabled until program termination)
11-
* fixing a couple of race confitions (threading lock files not being
21+
* fixing a couple of race conditions (threading lock files not being
1222
released) that would lead to a freeze
1323
* fixing players crash detection routines
1424
* fixing config players parsing

README.html

+73-30
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,22 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
208208
<li>netifaces (optional)</li>
209209
</ul></li>
210210
<li>MPV, MPlayer or VLC installed and in your path</li>
211-
<li>MKVToolNix (cli files) to insert tags and chapters to recordings (optional)</li>
211+
<li>MKVToolNix (cli files) to insert tags, chapters and cover to recordings (optional)</li>
212212
</ul>
213213
<!-- Changelog -->
214214
<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></span></h2>
215215
<pre style="height: 200px;">
216216

217+
2023-11-03 s-n-g
218+
* version 0.9.2.17
219+
* Recorded MKV files will have a cover image by default
220+
(when MKVToolNix is installed)
221+
* Adding -mkv, -scv, -srt, -ach and -lr command line parameters
222+
(applicable when MKVToolNix is installed)
223+
* Rearranging and grouping options in the program's help screen
224+
* Working on scheduler (not applicable yet)
225+
* Updating docs
226+
217227
2023-10-15 s-n-g
218228
* version 0.9.2.16
219229
* install.py: will terminate if python not in PATH
@@ -224,7 +234,7 @@ <h2 id="changelog">Changelog <span style="padding-left: 10px;"><sup style="font-
224234
recording folder
225235
* buffering can now be disabled (in 0.9.2.15, once buffering was
226236
enabled, it could not be disabled until program termination)
227-
* fixing a couple of race confitions (threading lock files not being
237+
* fixing a couple of race conditions (threading lock files not being
228238
released) that would lead to a freeze
229239
* fixing players crash detection routines
230240
* fixing config players parsing
@@ -1110,40 +1120,62 @@ <h2 id="installation">Installation <span style="padding-left: 10px;"><sup style=
11101120
<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></span></h2>
11111121
<pre>$ pyradio -h
11121122

1113-
Usage: pyradio [-h] [-c CONFIG_DIR] [-s STATIONS] [-p [PLAY]] [-u USE_PLAYER]
1114-
[-a] [-ls] [-l] [-t THEME] [--show-themes] [--no-themes]
1123+
Usage: pyradio [-h] [-c CONFIG_DIR] [-p [STATION_NUMBER]] [-u PLAYER] [-a]
1124+
[-l] [-lt] [-sd] [-od] [-d] [-ul] [-us] [-U] [-R] [-V] [-ls]
1125+
[-s PLAYLIST] [-tlp] [-t THEME] [--show-themes] [--no-themes]
11151126
[--write-theme IN_THEME OUT_THEME,] [--terminal TERMINAL]
1116-
[--terminal-param TERMINAL_PARAM] [-tlp] [-sd] [-od] [-or]
1117-
[-oc] [-sc] [-cc] [-gc] [-us] [-lt] [-r] [-d] [-ul] [-U] [-R]
1118-
[-V]
1127+
[--terminal-param TERMINAL_PARAM] [-oc] [-sc] [-cc] [-gc] [-r]
1128+
[-or] [-lr] [-mkv MKV_FILE] [-scv PNG_FILE] [-srt] [-ach]
11191129

11201130
Curses based Internet radio player
11211131

1122-
Options:
1132+
General options:
11231133
-h, --help Show this help message and exit
11241134
-c CONFIG_DIR, --config-dir CONFIG_DIR
11251135
Use specified configuration directory instead of the
11261136
default one. PyRadio will try to create it, if it does
11271137
not exist. Not available on Windows.
1128-
-s STATIONS, --stations STATIONS
1129-
Use specified station CSV file.
1130-
-p [PLAY], --play [PLAY]
1138+
-p [STATION_NUMBER], --play [STATION_NUMBER]
11311139
Start and play.The value is num station or empty for
11321140
random.
1133-
-u USE_PLAYER, --use-player USE_PLAYER
1141+
-u PLAYER, --use-player PLAYER
11341142
Use specified player. A comma-separated list can be
11351143
used to specify detection order. Supported players:
11361144
mpv, mplayer, vlc.
11371145
-a, --add Add station to list.
1146+
-l, --list List of available stations in a playlist.
1147+
-lt, --log-titles Log titles to file.
1148+
-sd, --show-config-dir
1149+
Print config directory [CONFIG DIR] location and exit.
1150+
-od, --open-config-dir
1151+
Open config directory [CONFIG DIR] with default file
1152+
manager.
1153+
-d, --debug Start PyRadio in debug mode.
1154+
-ul, --unlock Remove sessions&#39; lock file.
1155+
-us, --update-stations
1156+
Update &quot;stations.csv&quot; (if needed).
1157+
-U, --update Update PyRadio.
1158+
-R, --uninstall Uninstall PyRadio.
1159+
-V, --version Display version information.
1160+
1161+
Playlist selection:
11381162
-ls, --list-playlists
11391163
List of available playlists in config dir.
1140-
-l, --list List of available stations in a playlist.
1164+
-s PLAYLIST, --stations PLAYLIST
1165+
Load the specified playlist instead of the default
1166+
one.
1167+
-tlp, --toggle-load-last-playlist
1168+
Toggle autoload last opened playlist.
1169+
1170+
Themes:
11411171
-t THEME, --theme THEME
11421172
Use specified theme.
11431173
--show-themes Show Internal and System Themes names.
11441174
--no-themes Disable themes (use default theme).
11451175
--write-theme IN_THEME OUT_THEME,
11461176
Write an Internal or System Theme to themes directory.
1177+
1178+
Terminal selection:
11471179
--terminal TERMINAL Use this terminal for Desktop file instead of the
11481180
auto-detected one. Use &quot;none&quot; to reset to the default
11491181
terminal or &quot;auto&quot; to reset to the auto-detected one.
@@ -1152,29 +1184,40 @@ <h2 id="command-line-options">Command line options <span style="padding-left: 10
11521184
Please replace hyphens with underscores when passing
11531185
the parameter, for example: --terminal-param &quot;_p 3 _t
11541186
light&quot; (which will result to &quot;pyradio -p 3 -t light&quot;).
1155-
-tlp, --toggle-load-last-playlist
1156-
Toggle autoload last opened playlist.
1157-
-sd, --show-config-dir
1158-
Print config directory [CONFIG DIR] location and exit.
1159-
-od, --open-config-dir
1160-
Open config directory [CONFIG DIR] with default file
1161-
manager.
1162-
-or, --open-recordings
1163-
Open the Recordings folder.
1187+
1188+
Cache:
11641189
-oc, --open-cache Open the Cache folder.
11651190
-sc, --show-cache Show Cache contents.
11661191
-cc, --clear-cache Clear Cache contents.
11671192
-gc, --get-cache Download source code, keep it in the cache and exit.
1168-
-us, --update-stations
1169-
Update &quot;stations.csv&quot; (if needed).
1170-
-lt, --log-titles Log titles to file.
1193+
1194+
Recording stations:
11711195
-r, --record Turn recording on (not available for VLC player on
11721196
Windows).
1173-
-d, --debug Start PyRadio in debug mode.
1174-
-ul, --unlock Remove sessions&#39; lock file.
1175-
-U, --update Update PyRadio.
1176-
-R, --uninstall Uninstall PyRadio.
1177-
-V, --version Display version information.</pre>
1197+
-or, --open-recordings
1198+
Open the Recordings folder.
1199+
-lr, --list-recordings
1200+
List recorded files.
1201+
-mkv MKV_FILE, --mkv-file MKV_FILE
1202+
Specify a previously recorded MKV file to be used with
1203+
one of the following options. The MKV_FILE can either
1204+
be an absolute or a relative path, or a number
1205+
provided by the -lr command line paremater. If it is a
1206+
relative path, it should be found in the current or in
1207+
the Recordings directory.
1208+
-scv PNG_FILE, --set-mkv-cover PNG_FILE
1209+
Add or change the cover image of a previously recorded
1210+
MKV file. PNG_FILE can either be an absolute or a
1211+
relative path. If relative, it should be found in the
1212+
current or in the Recordings directory.
1213+
-srt, --export-srt Export a previously recorded MKV file chapters to an
1214+
SRT file. The file produced will have the name of the
1215+
input file with the &quot;mkv&quot; extension replaced by &quot;srt&quot;.
1216+
-ach, --add-chapters Add (or replace) chapter markers to a previously
1217+
recorded MKV file. The chapters file will be a SRT
1218+
file, much like the one produced by the previous
1219+
command line parameter.
1220+
</pre>
11781221
<h2 id="controls">Controls <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
11791222
<pre> Main window Playlists window Themes window
11801223
-------------------------------------------------------------------------------------------------------------------------------------

README.md

+62-29
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ and much more...
128128
- python-dateutil
129129
- netifaces (optional)
130130
* MPV, MPlayer or VLC installed and in your path
131-
* MKVToolNix (cli files) to insert tags and chapters to recordings (optional)
131+
* MKVToolNix (cli files) to insert tags, chapters and cover to recordings (optional)
132132

133133
<!-- Changelog -->
134134

@@ -143,40 +143,62 @@ In any other case, and since **PyRadio** is currently not available via pip, you
143143
```
144144
$ pyradio -h
145145
146-
Usage: pyradio [-h] [-c CONFIG_DIR] [-s STATIONS] [-p [PLAY]] [-u USE_PLAYER]
147-
[-a] [-ls] [-l] [-t THEME] [--show-themes] [--no-themes]
146+
Usage: pyradio [-h] [-c CONFIG_DIR] [-p [STATION_NUMBER]] [-u PLAYER] [-a]
147+
[-l] [-lt] [-sd] [-od] [-d] [-ul] [-us] [-U] [-R] [-V] [-ls]
148+
[-s PLAYLIST] [-tlp] [-t THEME] [--show-themes] [--no-themes]
148149
[--write-theme IN_THEME OUT_THEME,] [--terminal TERMINAL]
149-
[--terminal-param TERMINAL_PARAM] [-tlp] [-sd] [-od] [-or]
150-
[-oc] [-sc] [-cc] [-gc] [-us] [-lt] [-r] [-d] [-ul] [-U] [-R]
151-
[-V]
150+
[--terminal-param TERMINAL_PARAM] [-oc] [-sc] [-cc] [-gc] [-r]
151+
[-or] [-lr] [-mkv MKV_FILE] [-scv PNG_FILE] [-srt] [-ach]
152152
153153
Curses based Internet radio player
154154
155-
Options:
155+
General options:
156156
-h, --help Show this help message and exit
157157
-c CONFIG_DIR, --config-dir CONFIG_DIR
158158
Use specified configuration directory instead of the
159159
default one. PyRadio will try to create it, if it does
160160
not exist. Not available on Windows.
161-
-s STATIONS, --stations STATIONS
162-
Use specified station CSV file.
163-
-p [PLAY], --play [PLAY]
161+
-p [STATION_NUMBER], --play [STATION_NUMBER]
164162
Start and play.The value is num station or empty for
165163
random.
166-
-u USE_PLAYER, --use-player USE_PLAYER
164+
-u PLAYER, --use-player PLAYER
167165
Use specified player. A comma-separated list can be
168166
used to specify detection order. Supported players:
169167
mpv, mplayer, vlc.
170168
-a, --add Add station to list.
169+
-l, --list List of available stations in a playlist.
170+
-lt, --log-titles Log titles to file.
171+
-sd, --show-config-dir
172+
Print config directory [CONFIG DIR] location and exit.
173+
-od, --open-config-dir
174+
Open config directory [CONFIG DIR] with default file
175+
manager.
176+
-d, --debug Start PyRadio in debug mode.
177+
-ul, --unlock Remove sessions' lock file.
178+
-us, --update-stations
179+
Update "stations.csv" (if needed).
180+
-U, --update Update PyRadio.
181+
-R, --uninstall Uninstall PyRadio.
182+
-V, --version Display version information.
183+
184+
Playlist selection:
171185
-ls, --list-playlists
172186
List of available playlists in config dir.
173-
-l, --list List of available stations in a playlist.
187+
-s PLAYLIST, --stations PLAYLIST
188+
Load the specified playlist instead of the default
189+
one.
190+
-tlp, --toggle-load-last-playlist
191+
Toggle autoload last opened playlist.
192+
193+
Themes:
174194
-t THEME, --theme THEME
175195
Use specified theme.
176196
--show-themes Show Internal and System Themes names.
177197
--no-themes Disable themes (use default theme).
178198
--write-theme IN_THEME OUT_THEME,
179199
Write an Internal or System Theme to themes directory.
200+
201+
Terminal selection:
180202
--terminal TERMINAL Use this terminal for Desktop file instead of the
181203
auto-detected one. Use "none" to reset to the default
182204
terminal or "auto" to reset to the auto-detected one.
@@ -185,29 +207,40 @@ Options:
185207
Please replace hyphens with underscores when passing
186208
the parameter, for example: --terminal-param "_p 3 _t
187209
light" (which will result to "pyradio -p 3 -t light").
188-
-tlp, --toggle-load-last-playlist
189-
Toggle autoload last opened playlist.
190-
-sd, --show-config-dir
191-
Print config directory [CONFIG DIR] location and exit.
192-
-od, --open-config-dir
193-
Open config directory [CONFIG DIR] with default file
194-
manager.
195-
-or, --open-recordings
196-
Open the Recordings folder.
210+
211+
Cache:
197212
-oc, --open-cache Open the Cache folder.
198213
-sc, --show-cache Show Cache contents.
199214
-cc, --clear-cache Clear Cache contents.
200215
-gc, --get-cache Download source code, keep it in the cache and exit.
201-
-us, --update-stations
202-
Update "stations.csv" (if needed).
203-
-lt, --log-titles Log titles to file.
216+
217+
Recording stations:
204218
-r, --record Turn recording on (not available for VLC player on
205219
Windows).
206-
-d, --debug Start PyRadio in debug mode.
207-
-ul, --unlock Remove sessions' lock file.
208-
-U, --update Update PyRadio.
209-
-R, --uninstall Uninstall PyRadio.
210-
-V, --version Display version information.
220+
-or, --open-recordings
221+
Open the Recordings folder.
222+
-lr, --list-recordings
223+
List recorded files.
224+
-mkv MKV_FILE, --mkv-file MKV_FILE
225+
Specify a previously recorded MKV file to be used with
226+
one of the following options. The MKV_FILE can either
227+
be an absolute or a relative path, or a number
228+
provided by the -lr command line paremater. If it is a
229+
relative path, it should be found in the current or in
230+
the Recordings directory.
231+
-scv PNG_FILE, --set-mkv-cover PNG_FILE
232+
Add or change the cover image of a previously recorded
233+
MKV file. PNG_FILE can either be an absolute or a
234+
relative path. If relative, it should be found in the
235+
current or in the Recordings directory.
236+
-srt, --export-srt Export a previously recorded MKV file chapters to an
237+
SRT file. The file produced will have the name of the
238+
input file with the "mkv" extension replaced by "srt".
239+
-ach, --add-chapters Add (or replace) chapter markers to a previously
240+
recorded MKV file. The chapters file will be a SRT
241+
file, much like the one produced by the previous
242+
command line parameter.
243+
211244
```
212245

213246
## Controls

devel/build_install_pyradio

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ then
521521
fi
522522
mkdir -p ~/.config/pyradio/data
523523
cp devel/pyradio.png ~/.config/pyradio/data
524-
cp devel/recording.png ~/.config/pyradio/data
524+
cp devel/cover.png ~/.config/pyradio/data
525525
[ -z $PIPX ] || create_installation_type_file
526526
else
527527
do_exit
File renamed without changes.

devel/pre-commit

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ do
165165
sed -i -e '/server-on.jpg/s/src=/style="width: 574px" src=/' "$out"
166166
fi
167167
if [ "$out" = "recording.html" ];then
168-
sed -i -e '/pyradio-recording.\.jpg/s/src=/style="width: 698px" src=/' "$out"
168+
sed -i -e '/pyradio-recording.\.jpg/s/src=/style="width: 698px" src=/' \
169+
-e '/mkv-srt-to-chapters\.png/s/src=/style="width: 350px" src=/' \
170+
"$out"
169171
fi
170172

171173
sed -i '/^<[Aa]/s|.*|<p>&</p>|' "$out"

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyradio"
3-
version = "0.9.2.16"
3+
version = "0.9.2.17"
44
authors = [
55
{ name="Ben Dowling", email="[email protected]" },
66
{ name="Spiros Georgaras", email="[email protected]" },

pyradio.1

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright (C) 2018-2023 Spiros Georgaras <[email protected]>
33
.\" This manual is freely distributable under the terms of the GPL.
44
.\"
5-
.TH pyradio 1 "October 2023" pyradio
5+
.TH pyradio 1 "November 2023" pyradio
66

77
.SH Name
88
.PP
@@ -69,6 +69,14 @@ Update "\fIstations.csv\fR" (if needed).
6969
Log titles to file.
7070
.IP \fB-r\fR,\ \fB--record\fR
7171
Turn recording on (not available for VLC player on Windows).
72+
.IP \fB-mkv\ \fIMKV_FILE\fR,\ \fB--mkv-file\ \fIMKV_FILE
73+
Specify a previously recorded MKV file to be used with one of the following options. The \fIMKV_FILE\fR can either be an absolute or a relative path, or a number provided by the \fB-lr\fR command line paremater. If it is a relative path, it should be found in the current or in the Recordings directory.
74+
.IP \fB-scv\fR\ \fIPNG_FILE\fR,\ \fB--set-mkv-cover\ \fIPNG_FILE
75+
Add or change the cover image of a previously recorded \fBMKV\fR file. \fIPNG_FILE\fR can either be an absolute or a relative path. If relative, it should be found in the current or in the Recordings directory.
76+
.IP \fB-srt\fR,\ \fB--export-srt
77+
Export a previously recorded \fBMKV\fR file chapters to an \fISRT\fR file. The file produced will have the name of the input file with the "\fImkv\fR" extension replaced by "\fIsrt\fR".
78+
.IP \fB-ach\fR,\ \fB--add-chapters
79+
Add (or replace) chapter markers to a previously recorded \fBMKV\fR file. The chapters file will be a \fISRT\fR file, much like the one produced by the previous command line parameter.
7280
.IP \fB-d\fR,\fB\ \--debug
7381
Enable \fBDEBUG MODE\fR.
7482
.IP \fB-ul\fR,\ \fB--unlock\fR

pyradio/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
" pyradio -- Console radio player. "
33

4-
version_info = (0, 9, 2, 16)
4+
version_info = (0, 9, 2, 17)
55

66
# Set it to True if new stations have been
77
# added to the package's stations.csv

0 commit comments

Comments
 (0)