From 46ff54d31ad65b2402746694517e6683f4056877 Mon Sep 17 00:00:00 2001
From: Spiros Georgaras Command line internet radio player. Ben Dowling - https://github.com/coderholic Ben Dowling - https://github.com/coderholic The best way to install PyRadio is via a distribution package, if one exists (e.g. Arch Linux and derivatives can install pyradio-git from AUR). The best way to install PyRadio is via a distribution package, if one exists (e.g. Arch Linux and derivatives can install pyradio-git from AUR). In any other case, and since PyRadio is currently not available via pip, you will have to build it from source. The functions available through the secondary modes are content dependent, so you can see what command is available by pressing “?” while within a secondary mode. Pressing any other key will exit the secondary mode. PyRadio upon its execution tries to read its configuration file (i.e. ~/.config/pyradio/config). If this file is not found, it will be created. If an error occurs while parsing it, an error message will be displayed and PyRadio will terminate. PyRadio upon its execution tries to read its configuration file (i.e. ~/.config/pyradio/config). If this file is not found, it will be created. If an error occurs while parsing it, an error message will be displayed and PyRadio will terminate. The file contains parameters such as the player to use, the playlist to load etc. It is heavily commented (as you can see here), so that manual editing is really easy. The best practice to manually edit this file is executing PyRadio with the -ocd command line option, which will open the configuration directory in your file manager, and then edit it using your preferable text editor. The file can also be altered while PyRadio is running by pressing “c”, which will open the “Configuration window”. This window presents all PyRadio options and provide the way to change them and finally save them by pressing “s”. In any case, PyRadio 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). PyRadio 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. Optionally, a third column can be inserted, stating the encoding used by the station (more on this at Specifying stations’ encoding). PyRadio will by default load the user’s stations file (e.g. ~/.config/pyradio/stations.csv) to read the stations from. If this file is not found, it will be created and populated with a default set of stations. PyRadio will by default load the user’s stations file (e.g. ~/.config/pyradio/stations.csv) to read the stations from. If this file is not found, it will be created and populated with a default set of stations. Tip: If you already have a custom stations.csv file, but want to update it with PyRadio’s default one, you just rename it, run PyRadio (so that the default one get created) and then merge the two files. Note: Older versions used to use ~/.pyradio as default stations file. If this file is found, it will be copied to use’s config directory (e.g. ~/.config/pyradio) and renamed to stations.csv or if this file exists, to pyradio.csv. In this case, this file will be the default one. Note: Older versions used to use ~/.pyradio as default stations file. If this file is found, it will be copied to use’s config directory (e.g. ~/.config/pyradio) and renamed to stations.csv or if this file exists, to pyradio.csv. In this case, this file will be the default one. PyRadio will normally load its default playlist file, as described above, upon its execution. A different file can be loaded when the -s command line option is used. The -s option will accept: This would be useful in the case where most of your stations do not use utf-8. Instead of editing the playlist and add the encoding to each and every affected station, you just set it globally. A valid encoding list can be found at: https://docs.python.org/2.7/library/codecs.html#standard-encodings https://docs.python.org/2.7/library/codecs.html#standard-encodings replacing 2.7 with specific version: 3.0 up to current python version. PyRadio 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. PyRadio provides a way for the user to add extra parameters to the player, either by a command line parameter, or the “Configuration Window” (under “Player:”). This way, 10 sets of parameters can be inserted and made available for selection. When the command line parameter (-epp or –extra_player_parameters) is used, the parameters specified must be of a specific format, and will be added to the list of parameters and made default for the player. When the command line parameter (-epp or –extra_player_parameters) is used, the parameters specified must be of a specific format, and will be added to the list of parameters and made default for the player for the current session. The format of the parameter is the following: [player_name:parameters] Where: Example: Note: When a parameter is passed to “mpv” or “mplayer”, PyRadio" will use the default player profile (called “pyradio”). Note: When a parameter is passed to “mpv” or “mplayer”, PyRadio" will use the default player profile (called “pyradio”). For “mpv” and “mplayer” a profile can be specified (“vlc” does not support profiles). In this case the format of the parameters part of the command line is: profile:profile_name. Where: Each of the supported players can have up to 11 sets of extra parameters (the first one is the default). The user can add (“a”) a new parameter, edit (“e”) an existing set and delete (“x” or “DEL”) one. When all desired parameter sets are already defined, using the -ap (–active-player-param-id) command line parameter can activate the set that corresponds to the number specified. The number to use for any given set can be retrieved using the -lp (–list-player-parameters) command line parameter. While PyRadio is running, the user can change the parameters set used by the player using the “Player Extra Parameters” window, by pressing “Z”. If playback is on, changing the player’s parameters will make the player restart the playback so that the new parameters get used. Note: Any changes made this way will not be saved but will be in effect until PyRadio terminates. MPV uses profiles to customize its behavior. PyRadio defines a profile called “[pyradio]” in MPV’s configuration file (e.g. ~/.config/mpv/mpv.conf). This profile will be used every time playback is started. PyRadio defines a profile called “[pyradio]” in MPV’s configuration file (e.g. ~/.config/mpv/mpv.conf). This profile will be used every time playback is started. Example: MPlayer uses profiles to customize its behavior as well. PyRadio defines a profile called “[pyradio]” in MPV’s configuration file (e.g. ~/.mplayer/config). This profile will be used every time playback is started. PyRadio defines a profile called “[pyradio]” in MPV’s configuration file (e.g. ~/.mplayer/config). This profile will be used every time playback is started. Example:PyRadio
Table of contents Top
Requirements MPV, MPlayer or VLC installed and in your path.
Installation Top
-Command line options Top
$ pyradio -h
@@ -175,7 +178,7 @@
PyRadio’s Modes
Config file Top
-Config file About Playlist files Top
Specifying a playlist to load (command line)
Global encoding declaration
Finding the right encoding
Player detection / selection Top
Extra Player Parameters
Using the command line
-
@@ -343,7 +346,7 @@
Using the command line
pyradio -epp "vlc:--force-dolby-surround 2"
-
@@ -358,6 +361,7 @@
Using the Configuration Window
Changing parameters set
+Player default volume level MPV
volume=100
@@ -384,7 +388,7 @@
MPV
volume=50MPlayer
volume=100
@@ -405,7 +409,7 @@
Copying and pasting - Registers There are 36 named registers (name is a-z, 0-9) and one unnamed register.
To copy a station to a register one would press “y” and:
PyRadio comes with 6 preconfigured (hard coded) themes:
@@ -541,13 +545,21 @@Finally, include the file produced in your report.
PyRadio uses code from the following projects:
diff --git a/README.md b/README.md index 2380b1d3..232037fd 100644 --- a/README.md +++ b/README.md @@ -435,7 +435,7 @@ This way, 10 sets of parameters can be inserted and made available for selection #### Using the command line -When the command line parameter (**-epp** or **--extra_player_parameters**) is used, the parameters specified must be of a specific format, and will be added to the list of parameters and made default for the player. +When the command line parameter (**-epp** or **--extra_player_parameters**) is used, the parameters specified must be of a specific format, and will be added to the list of parameters and made default for the player for the current session. The format of the parameter is the following: **[player_name:parameters]** @@ -477,6 +477,8 @@ The user can add ("**a**") a new parameter, edit ("**e**") an existing set and d ### Changing parameters set +When all desired parameter sets are already defined, using the **-ap** (**--active-player-param-id**) command line parameter can activate the set that corresponds to the number specified. The number to use for any given set can be retrieved using the **-lp** (**--list-player-parameters**) command line parameter. + While **PyRadio** is running, the user can change the parameters set used by the player using the "*Player Extra Parameters*" window, by pressing "**Z**". If playback is on, changing the player's parameters will make the player restart the playback so that the new parameters get used. @@ -740,11 +742,12 @@ Finally, include the file produced in your report. ## TODO - [ ] Any user request I find interesting :) -- [x] Basic mouse support ([#119](https://github.com/coderholic/pyradio/issues/119)) -- [x] New player selection configuration window ([#118](https://github.com/coderholic/pyradio/issues/118)) -- [ ] Use Radio Browser service ([#80](https://github.com/coderholic/pyradio/issues/80) [#93](https://github.com/coderholic/pyradio/issues/93) [#112](https://github.com/coderholic/pyradio/issues/112)) +- [x] Basic mouse support ([#119](https://github.com/coderholic/pyradio/issues/119)) - v. 0.8.8.3 +- [x] Players extra parameters ([#118](https://github.com/coderholic/pyradio/issues/118)) - v. 0.8.8.3 +- [x] New player selection configuration window ([#118](https://github.com/coderholic/pyradio/issues/118)) - v. 0.8.8.3 - [ ] Notify the user that the package's stations.csv has changed - [ ] Update / uninstall using command line parameters (-U / -R) +- [ ] Use Radio Browser service ([#80](https://github.com/coderholic/pyradio/issues/80) [#93](https://github.com/coderholic/pyradio/issues/93) [#112](https://github.com/coderholic/pyradio/issues/112)) ## Acknowledgment diff --git a/build.html b/build.html index b5f916d6..9f17a060 100644 --- a/build.html +++ b/build.html @@ -21,13 +21,16 @@ a{ color: SaddleBrown;} a:visited{color: SaddleBrown;} + -PyRadio: Command line internet radio player.
-Ben Dowling - https://github.com/coderholic
+Ben Dowling - https://github.com/coderholic
PyRadio: Command line internet radio player.
-Ben Dowling - https://github.com/coderholic
+Ben Dowling - https://github.com/coderholic
This is actually your “Home” directory.
-Please make a note that you will add "%USERPROFILE%\mplayer to PATH.
Please make a note that you will add "%USERPROFILE%\mplayer to PATH.
This is (or will be) “PyRadio’s configuration directory”.
In case the pyradio directory does not exit, you just go ahead and create it.
-(Make a note that you will add "%APPDATA%\pyradio\mplayer to PATH)
(Make a note that you will add "%APPDATA%\pyradio\mplayer to PATH)
In either case, in order to do that, open an Explorer File Manager window, and enter at its location field %USERPROFILE% or %APPDATA%.
If you are unsure on how to do that, please refer to the following image (you can ENTER %USERPROFILE% or %APPDATA% or any other Windows System Variable this way).
diff --git a/windows.html b/windows.html index e9c90ee6..6771f3b8 100644 --- a/windows.html +++ b/windows.html @@ -21,13 +21,16 @@ a{ color: SaddleBrown;} a:visited{color: SaddleBrown;} + -PyRadio: Command line internet radio player.
-Ben Dowling - https://github.com/coderholic
+Ben Dowling - https://github.com/coderholic
When the download is done, run its setup and select “Custom Installation” so that you can “Add Python to environment varaibles”. You can refer to the following image to see the relevant setting.
Either if you have just installed Python or you already have it installed, you need to verify that its executable is in the PATH (i.e. Python can be executed from a console by typing“python”).
+Either if you have just installed Python or you already have it installed, you need to verify that its executable is in the PATH (i.e. Python can be executed from a console by typing“python”).
So, go ahead and open a console (the command is cmd) and type python.
If you get something similar to the following snippet, you are good to go.
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win @@ -157,7 +160,7 @@4.1 Using Git
devel\build_install_pyradio
Go to PyRadio’s Releases page and download the latest release (either a zip or a tar.gz file).
-Extract this file to your “Home” directory (“C:\Users\[Your User Name]” or “%USERPROFILE%) - you will get a directory whose name is similar to”pyradio-0.7.9".
+Extract this file to your “Home” directory (“C:\Users\[Your User Name]” or “%USERPROFILE%) - you will get a directory whose name is similar to”pyradio-0.7.9".
I will use this name for the following examples; you will have to use the actual name of directory you got from the extraction.
Finally, open a console (press the Win key, type cmd and press ENTER or if you are on Windows 10, use Run it as Administrator as you can see in the following image).