Skip to content

Commit 90cc319

Browse files
committed
- fixing md to html conversion
- continuing station history...
1 parent 549328d commit 90cc319

File tree

10 files changed

+251
-207
lines changed

10 files changed

+251
-207
lines changed

README.html

Lines changed: 73 additions & 71 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,12 @@ These modes are specifically designed to be used with tiling window managers, tr
284284

285285
1. The **Limited Height** mode, which is automatically enabled when the window height gets below 8 lines.
286286

287-
In this mode, only a limited information is visible and if playback is on, the volume is the only thing that can be adjusted (or muted) and saved. This is the **Limited display**.
287+
- In this mode, only a limited information is visible and if playback is on, the volume is the only thing that can be adjusted (or muted) and saved. This is the **Limited display**.
288288

289289
2. The **Limited Width** mode, which is automatically enabled when the window width get bellow certain limits:
290290

291291
- When the width gets bellow 40 columns, all windows will be closed and the main window will be the only visible one (either displaying stations, playlists or registers).
292+
292293
- When the width gets bellow 20 columns, the **Limited display** will be activated.
293294

294295
![Pyradio reduced to the "Limited display"](https://members.hellug.gr/sng/pyradio/pyradio-limited-display.jpg)

build.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
33
<head>
44
<meta charset="utf-8" />
55
<meta name="generator" content="pandoc" />
@@ -26,7 +26,7 @@
2626
TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;}
2727
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;}
2828
.task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;}
29-
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;}
29+
img{display: block; margin-left: auto; margin-right: auto; max-width: 750px; 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;}
3030
a{ color: SaddleBrown;}
3131
a:visited{color: SaddleBrown;}
3232
</style>
@@ -37,10 +37,10 @@
3737
<body>
3838
<header id="title-block-header">
3939
</header>
40-
<h1 style="color: SaddleBrown"id="pyradio-build-instructions">PyRadio Build Instructions</h1>
40+
<h1 style="color: SaddleBrown" id="pyradio-build-instructions">PyRadio Build Instructions</h1>
4141
<p><strong>PyRadio</strong>: Command line internet radio player.</p>
4242
<p>Ben Dowling - <a target="_blank" href="https://github.com/coderholic">https://github.com/coderholic</a></p>
43-
<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>
43+
<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></span></h2>
4444
<!-- vim-markdown-toc Marked -->
4545
<ul>
4646
<li><a href="#current-state-of-the-project">Current state of the project</a>
@@ -65,20 +65,20 @@ <h2 id="table-of-contents">Table of Contents <span style="padding-left: 10px;"><
6565
</ul>
6666
<!-- vim-markdown-toc -->
6767
<p><a href="README.html">[Return to main doc]</a></p>
68-
<h2 id="current-state-of-the-project">Current state of the project <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
68+
<h2 id="current-state-of-the-project">Current state of the project <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
6969
<p>Starting with version <strong>0.8.9.15</strong>, <strong>PyRadio</strong> has changed its installation method from invoking <em>setup.py</em> directly to <em>pip</em> (i.e. from “<em>python setup.py install</em>” to “<em>python -m pip .</em>”). This is a must for all <strong>Python</strong> projects in order to keep up with the latest developments. For more info, please refer to “<a target="_blank" href="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html">Why you shouldn’t invoke setup.py directly</a>”.</p>
7070
<h3 id="what-does-it-all-mean-and-why-should-you-care">What does it all mean and why should you care</h3>
7171
<p>Moving to the <strong>pip</strong> way of doing things has its implications:</p>
7272
<ol type="1">
73-
<li><strong>PyRadio</strong> will be installed as a pip package.</p></li>
74-
<li><strong>PyRadio</strong> will no longer be installed as a system-wide package.<br />
73+
<li><p><strong>PyRadio</strong> will be installed as a pip package.</p></li>
74+
<li><p><strong>PyRadio</strong> will no longer be installed as a system-wide package.<br />
7575
<br />
7676
This means that after installing <strong>PyRadio</strong>, it will only be available to the current user. If another user wants to use it as well, he would have to install it again.<br />
7777
<br />
7878
In other words, in order to have a <strong>Pyradio system-wide installation</strong>, your distribution has to provide a package for it.</p></li>
79-
<li>As I’m starting the procedure to move away from <em>Python 2</em>, <strong>PyRadio</strong> will not be compatible with it on <em>macOs</em> and <em>Windows</em> (but will still be on <em>Linux</em>, at least for the time being).</p></li>
79+
<li><p>As I’m starting the procedure to move away from <em>Python 2</em>, <strong>PyRadio</strong> will not be compatible with it on <em>macOs</em> and <em>Windows</em> (but will still be on <em>Linux</em>, at least for the time being).</p></li>
8080
</ol>
81-
<h2 id="preparing-for-the-installation">Preparing for the installation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
81+
<h2 id="preparing-for-the-installation">Preparing for the installation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
8282
<p>Before installing <strong>PyRadio</strong> you have to prepare your system, so that you end up with a working installation. The process depends on the OS you are on.</p>
8383
<h3 id="linux">Linux</h3>
8484
<p>Use your distribution method to install</p>
@@ -130,7 +130,7 @@ <h3 id="macos">macOS</h3>
130130
<p>Your system is ready now for <strong>pyradio</strong> to be installed. You can follow the instructions given at “<a href="#performing-the-installation">Performing the installation</a>”.</p>
131131
<h3 id="windows">Windows</h3>
132132
<p>Windows installation is presented in its <a href="windows.html">own page</a>.</p>
133-
<h2 id="performing-the-installation">Performing the installation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
133+
<h2 id="performing-the-installation">Performing the installation <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
134134
<p>First thing you do is get the installation script. Open a <strong>terminal</strong> and type:</p>
135135
<pre>cd
136136
wget https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py</pre>

devel/pre-commit

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,25 @@ do
8585
TD {text-align: left; vertical-align: top; padding: 5px 10px;border: 1px solid SaddleBrown;} \
8686
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;} \
8787
.task-list {list-style-type: none; padding: 0; margin: 0 0 0 1em ;} \
88-
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;} \
88+
img{display: block; margin-left: auto; margin-right: auto; max-width: 750px; 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;} \
8989
</style>' ${out}
9090
sed -i -e 's/<code>//g' \
9191
-e 's{</code>{{g' \
9292
-e 's{<a href="#pyradio">pyradio</a>{[pyradio]{' \
93+
-e '/^<html/s/lang=""/lang="en"/g' \
9394
-e 's/<p><strong>Tip:/<p style="margin: 1.5em 4em 0 4em; text-indent: -2em;"><strong>Tip:/' \
9495
-e 's/<p><strong>Note:/<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:/' \
95-
-e 's/<li><p>/<li>/g' \
96-
-e 's{</</p></li>{</li>{g' \
9796
-e 's/\.md">/.html">/g' \
9897
-e '/h1 class="title"/d' \
9998
-e 's/<a href="http/<a target="_blank" href="http/g' \
100-
-e 's{</h2>{ <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style>&{' \
99+
-e 's{</h2>{ <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span>&{' \
101100
-e 's|<.style>$|a{ color: SaddleBrown;}\na:visited{color: SaddleBrown;}\n</style>|' \
102-
-e 's/<h1 /<h1 style="color: SaddleBrown"/' \
101+
-e 's/<h1 /<h1 style="color: SaddleBrown" /' \
103102
${out}
104103
rm tmp.md
105104
if [ "$out" = "windows.html" ] || [ "$out" = "windows-mplayer.html" ];then
106105
sed -i -e 's/h3 {margin-top: 2em; color: SaddleBrown;}/h3 {margin-top: 2.5em; color: SaddleBrown; border-bottom:1px solid SaddleBrown;}/' \
107-
-e 's{</h3>{ <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style>&{' \
106+
-e 's{</h3>{ <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span>&{' \
108107
"$out"
109108
fi
110109
#
@@ -119,19 +118,17 @@ do
119118
-e 's|<.strong><.sup>E<.strong>|<strong>^E</strong>|' \
120119
"$out"
121120
fi
122-
#sed -i "/^alt=/d" ${out}
123-
# sed -i '/<figcaption/d' ${out}
124-
# sed -i '/figcaption>/d' ${out}
125121
sed -i 's/\.md/.html/' ${out}
126-
122+
# sed -i 's|^<li>\(.*\)</p>$|<li>\1</li>|' ${out}
123+
# sed -i 's|^<li><p>\(.*\)</p>$|<li>\1</li>|' ${out}
127124

128125

129126
git add ${out}
130127
done
131128

132129
# insert changelog to README.htm
133130
cat << STOP_HERE > pre
134-
<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>
131+
<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>
135132
<pre style="height: 200px;">
136133
137134
STOP_HERE

pyradio/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,11 @@ def read_playlist_file(
515515

516516
ret = 0
517517
if self._register_to_open:
518+
logger.error('register_to_open = {}'.format(self._register_to_open))
518519
stationFile, ret = self._get_register_filename_from_register()
519520
self._is_register = True
520521
else:
522+
logger.error('stationFile = {}'.format(stationFile))
521523
stationFile, ret = self._get_playlist_abspath_from_data(stationFile=stationFile)
522524
self._is_register = False
523525
read_file = True
@@ -2483,7 +2485,7 @@ def play_previous(self):
24832485
else:
24842486
old_item = self._get()
24852487
self.item -= 1
2486-
self.execute_func(old_item, self._get())
2488+
self.execute_func(self._get(), self.play_previous)
24872489

24882490
def play_next(self):
24892491
if self.item == -1:
@@ -2495,7 +2497,7 @@ def play_next(self):
24952497
else:
24962498
old_item = self._get()
24972499
self.item += 1
2498-
self.execute_func(old_item, self._get())
2500+
self.execute_func(self._get(), self.play_next)
24992501

25002502

25012503
class PyRadioLog(object):

0 commit comments

Comments
 (0)