Skip to content

Commit e884c7e

Browse files
added version number to about screen
1 parent a2868fc commit e884c7e

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@
719719
</div>
720720
<div id="about" class="screen hidden">
721721
<h2>About</h2>
722+
<h4>mfp; version: 1.0.1</h4>
722723
<p>
723724
mfp; is a PWA remix of
724725
<a href="https://musicforprogramming.net" target="_blank" rel="noopener noreferrer">
@@ -749,6 +750,8 @@ <h3 id="currently-playing-title" style="padding-bottom: 8px;">
749750
<div id="currently-playing-links" class="ibm-plex-mono-semibold-italic">
750751
<p>----------</p>
751752
</div>
753+
<p><b>### EOF ###</b></p>
754+
752755
</div>
753756
</main>
754757
<footer>

mfp-fetch-and-build.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ class Episode:
1818
itunes_duration: str
1919

2020
def main():
21-
episodes = []
2221

22+
with open("package.json", "r") as f:
23+
package_data = json.load(f)
24+
app_version = package_data.get("version", "0.0.0")
25+
print("App Version:", app_version)
26+
27+
episodes = []
2328

2429
#
2530
# always fetch RSS feed to get the latest episodes
@@ -126,7 +131,7 @@ def main():
126131
environment = Environment(loader=FileSystemLoader("templates/"), autoescape=select_autoescape())
127132
template = environment.get_template("index.html")
128133

129-
output = template.render(episodes=episodes)
134+
output = template.render(app_version=app_version, episodes=episodes)
130135

131136
with open("index.html", "w") as f:
132137
f.write(output)

templates/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
</div>
128128
<div id="about" class="screen hidden">
129129
<h2>About</h2>
130+
<h4>mfp; version: {{ app_version }}</h4>
130131
<p>
131132
mfp; is a PWA remix of
132133
<a href="https://musicforprogramming.net" target="_blank" rel="noopener noreferrer">
@@ -157,6 +158,8 @@ <h3 id="currently-playing-title" style="padding-bottom: 8px;">
157158
<div id="currently-playing-links" class="ibm-plex-mono-semibold-italic">
158159
<p>----------</p>
159160
</div>
161+
<p><b>### EOF ###</b></p>
162+
160163
</div>
161164
</main>
162165
<footer>

0 commit comments

Comments
 (0)