Skip to content

Commit 271c26e

Browse files
committed
- update will check currently installed version
- "Configuration Window" will display Distribution name - updating docs
1 parent 21b6f6c commit 271c26e

15 files changed

+410
-461
lines changed

README.html

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@
3232
<h1 style="color: SaddleBrown"id="pyradio">PyRadio</h1>
3333
<p>Command line internet radio player.</p>
3434
<p>Ben Dowling - <a target="_blank" href="https://github.com/coderholic">https://github.com/coderholic</a></p>
35-
<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>
35+
<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>
36+
<!-- vim-markdown-toc Marked -->
3637
<ul>
37-
<li><a href="#table-of-contents">Table of contents</a></li>
3838
<li><a href="#requirements">Requirements</a></li>
3939
<li><a href="#installation">Installation</a></li>
4040
<li><a href="#command-line-options">Command line options</a></li>
4141
<li><a href="#controls">Controls</a></li>
42-
<li><a href="#pyradios-modes">PyRadio’s Modes</a></li>
42+
<li><a href="#pyradio&#39;s-modes">PyRadio’s Modes</a></li>
4343
<li><a href="#config-file">Config file</a></li>
4444
<li><a href="#about-playlist-files">About Playlist files</a>
4545
<ul>
46-
<li><a href="#specifying-a-playlist-to-load-command-line">Specifying a playlist to load (command line)</a></li>
47-
<li><a href="#managing-playlists-within-pyradio">Managing playlists (within PyRadio)</a></li>
48-
<li><a href="#managing-foreign-playlists">Managing “foreign” playlists</a></li>
46+
<li><a href="#specifying-a-playlist-to-load-(command-line)">Specifying a playlist to load (command line)</a></li>
47+
<li><a href="#managing-playlists-(within-pyradio)">Managing playlists (within PyRadio)</a></li>
48+
<li><a href="#managing-%22foreign%22-playlists">Managing “foreign” playlists</a></li>
4949
<li><a href="#playlist-history">Playlist history</a></li>
5050
</ul></li>
5151
<li><a href="#search-function">Search function</a></li>
@@ -54,13 +54,13 @@ <h2 id="table-of-contents">Table of contents <span style="padding-left: 10px;"><
5454
<li><a href="#cjk-characters-support">CJK characters support</a></li>
5555
</ul></li>
5656
<li><a href="#moving-stations-around">Moving stations around</a></li>
57-
<li><a href="#specifying-stations-encoding">Specifying stations’ encoding</a>
57+
<li><a href="#specifying-stations&#39;-encoding">Specifying stations’ encoding</a>
5858
<ul>
5959
<li><a href="#station-by-station-encoding-declaration">Station by station encoding declaration</a></li>
6060
<li><a href="#global-encoding-declaration">Global encoding declaration</a></li>
6161
<li><a href="#finding-the-right-encoding">Finding the right encoding</a></li>
6262
</ul></li>
63-
<li><a href="#player-detection--selection">Player detection / selection</a>
63+
<li><a href="#player-detection-/-selection">Player detection / selection</a>
6464
<ul>
6565
<li><a href="#extra-player-parameters">Extra Player Parameters</a>
6666
<ul>
@@ -87,16 +87,14 @@ <h2 id="table-of-contents">Table of contents <span style="padding-left: 10px;"><
8787
<li><a href="#session-unlocking">Session unlocking</a></li>
8888
</ul></li>
8989
<li><a href="#update-notification">Update notification</a></li>
90-
<li><a href="#cleaning-up">Cleaning up</a>
91-
<ul>
92-
<li><a href="#previous-cleaning-up-procedure">Previous cleaning up procedure</a></li>
93-
</ul></li>
90+
<li><a href="#cleaning-up">Cleaning up</a></li>
9491
<li><a href="#debug-mode">Debug mode</a></li>
9592
<li><a href="#reporting-bugs">Reporting bugs</a></li>
9693
<li><a href="#packaging-pyradio">Packaging Pyradio</a></li>
9794
<li><a href="#todo">TODO</a></li>
9895
<li><a href="#acknowledgment">Acknowledgment</a></li>
9996
</ul>
97+
<!-- vim-markdown-toc -->
10098
<h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
10199
<ul>
102100
<li>python 2.7+/3.5+
@@ -155,6 +153,7 @@ <h2 id="command-line-options">Command line options <span style="padding-left: 10
155153
-lp, --list-player-parameters
156154
List extra players parameters.
157155
-U, --update Update PyRadio.
156+
--user Install only for current user (linux only).
158157
-R, --uninstall Uninstall PyRadio.
159158
--unlock Remove sessions&#39; lock file.
160159
-d, --debug Start pyradio in debug mode.
@@ -544,37 +543,7 @@ <h2 id="update-notification">Update notification <span style="padding-left: 10px
544543
<p><strong>PyRadio</strong> will periodically (once every 10 days) check whether a new version has been released.</p>
545544
<p>If so, a notification message will be displayed, informing the user about it.</p>
546545
<h2 id="cleaning-up">Cleaning up <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
547-
<p>Since version 0.8.7.3 (0.8.8-beta2), it is not necessary to follow the previous procedure any more; <strong>PyRadio</strong> will search and remove any previously installed files when the “<strong>-u</strong>” (uninstall) parameter is used.</p>
548-
<p>This procedure will remove any <strong>Pyradio</strong> files installed in your system, but will leave instact <strong>PyRadio</strong> configuration files.</p>
549-
<p>Windows users notice: This procedure <strong>will not</strong> uninstall python, mplayer, or git from your system.</p>
550-
<p>Example:</p>
551-
<pre>$ devel/build_install_pyradio -u
552-
Uninstalling PyRadio
553-
** Removing executable ... done
554-
** Removing help files ... done
555-
Looking for python installed files
556-
** Removing &quot;pyradio-0.8.8-py3.8.egg&quot; ... done
557-
** Removing &quot;pyradio-0.8.6-py2.7.egg&quot; ... done
558-
** Removing &quot;pyradio-0.8.8-py3.8.egg&quot; ... done
559-
PyRadio successfully uninstalled</pre>
560-
<p>In this example, running <em>devel/build_install_pyradio -u</em> has removed <strong>PyRadio</strong> python 3.8 system wide installation files, <strong>PyRadio</strong> python 2.7 system wide installation files, and <strong>PyRadio</strong> python 3.8 user installation files, found in the system.</p>
561-
<p>I would recommend to execute <em>devel/build_install_pyradio -u</em> from time to time, and reinstall <strong>Pyradio</strong> right after its completion.</p>
562-
<h3 id="previous-cleaning-up-procedure">Previous cleaning up procedure</h3>
563-
<p>As <strong>PyRadio</strong> versions accumulate, when building from source, one may have to <em>clean up</em> old installation files.</p>
564-
<p>To do that, one has to observe the installation process in order to find out where the package is installed. The installation would complete printing the following messages (on <em>python 3.7</em>):</p>
565-
<pre>Installed /usr/lib/python3.7/site-packages/pyradio-0.7.8-py3.7.egg
566-
Processing dependencies for pyradio==0.7.8
567-
Finished processing dependencies for pyradio==0.7.8</pre>
568-
<p>From this we get that the installation directory is <strong>/usr/lib/python3.7/site-packages</strong>. This may be different though, depending on the distribution and python version used.</p>
569-
<p>Let’s see what <strong>PyRadio</strong> files exist there:</p>
570-
<pre>$ ls -d /usr/lib/python3.7/site-packages/pyradio*
571-
572-
/usr/lib/python3.7/site-packages/pyradio-0.7.6.2-py3.7.egg
573-
/usr/lib/python3.7/site-packages/pyradio-0.7.7-py3.7.egg
574-
/usr/lib/python3.7/site-packages/pyradio-0.7.8-py3.7.egg</pre>
575-
<p>As we see, previous versions still exist in this system: <strong>0.7.6.2</strong> and <strong>0.7.7</strong>. These files (actually directories) can safely be removed:</p>
576-
<pre>$ sudo rm -rf /usr/lib/python3.7/site-packages/pyradio-.7.6.2-py3.7.egg
577-
$ sudo rm -rf /usr/lib/python3.7/site-packages/pyradio-0.7.7-py3.7.egg</pre>
546+
<p><strong>PyRadio</strong> will uninstall all previously installed versions when updated (using the <strong>-U</strong> command line parameter), so no extra steps are needed any more to house keep your system.</p>
578547
<h2 id="debug-mode">Debug mode <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
579548
<p>Adding the “<strong>-d</strong>” option to the command line will instruct <strong>PyRadio</strong> to enter <em>Debug mode</em>, which means that it will print debug messages to a file. This file will always reside in the user’s home directory and will be named <em>pyradio.log</em>.</p>
580549
<p>In case of a bug or a glitch, please include this file to the issue you will <a target="_blank" href="https://github.com/coderholic/pyradio/issues">open at github</a>.</p>
@@ -589,17 +558,15 @@ <h2 id="reporting-bugs">Reporting bugs <span style="padding-left: 10px;"><sup st
589558
<p>Finally, include the file produced in your report.</p>
590559
<h2 id="packaging-pyradio">Packaging Pyradio <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
591560
<p>If you are a packager and would like to produce a package for your distribution please do follow this mini guide.</p>
592-
<p><strong>PyRadio</strong> is able to update and uninstall itself, when installed from sources.</p>
593-
<p>This is something you do not want to be available when your package is used; <strong>PyRadio</strong> should be updated and uninstalled using the distro package manager.</p>
594-
<p>In order to accomplice that, you just have to change the <strong>distro</strong> configuration parameter in the <strong>config</strong> file.</p>
595-
<p><strong>PyRadio</strong> will read this parameter and will disable updating and uninstalling, when set to anything other than “<strong>None</strong>”.</p>
596-
<p>So, here’s how you do that:</p>
561+
<p><strong>PyRadio</strong> is able to update and uninstall itself, when installed from source. This is something you do not want to be happening when your package is used; <strong>PyRadio</strong> should be updated and uninstalled using the distro package manager.</p>
562+
<p>In order to accomplice that, you just have to change the <strong>distro</strong> configuration parameter in the <strong>config</strong> file. <strong>PyRadio</strong> will read this parameter and will disable updating and uninstalling, when set to anything other than “<strong>None</strong>”. So, here’s how you do that:</p>
597563
<p>Once you are in the sources top level directory (typically “<em>pyradio</em>”), you execute the command:</p>
598564
<pre>sed -i &#39;s/distro = None/distro = YOUR DISTRO NAME&#39; pyradio/config</pre>
599565
<p>Then you go on to produce the package as you would normally do.</p>
600566
<p>For example, an <strong>Arch Linux</strong> packager would use this command:</p>
601567
<pre>sed -i &#39;s/distro = None/distro = Arch Linux&#39; pyradio/config</pre>
602-
<p>The distro name you insert here will appear in <strong>PyRadio</strong>’s log file, so that I know where the package came from while debugging, so if you are not packaging for a specific distribution, please do use something meaningful (for example, using “<em>xxx</em>” will do the job, but provides no useful information).</p>
568+
<p>The distro name you insert here will appear in <strong>PyRadio</strong>’s “<em>Configuration Window</em>”. In addition to that it will appear in the log file, so that I know where the package came from while debugging.</p>
569+
<p>Having siad that, if you are not packaging for a specific distribution, please do use something meaningful (for example, using “<em>xxx</em>” will do the job, but provides no useful information).</p>
603570
<h2 id="todo">TODO <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
604571
<ul class="task-list">
605572
<li><input type="checkbox" disabled="" />

0 commit comments

Comments
 (0)