Added CLAUDE.md and updated .gitignore.
This commit is contained in:
+5
-2
@@ -1,4 +1,4 @@
|
|||||||
# ---> macOS
|
# ---> macOS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.AppleDouble
|
.AppleDouble
|
||||||
.LSOverride
|
.LSOverride
|
||||||
@@ -24,4 +24,7 @@ Icon
|
|||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
|
||||||
|
# Don't commit the code-workspace files
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# Radio Free Elsewhere
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
Radio Free Elsewhere is an Internet radio station streaming eclectic music (Celtic folk, ambient/space, surf rock, and more). It runs on Icecast hosted on a Yunohost server. Streams are live and occasional — a few times per week in the evenings, typically around 7:30pm Eastern, running roughly two hours. This is not a 24/7 automated station.
|
||||||
|
|
||||||
|
The shows have distinct themes and identities:
|
||||||
|
- **O'Morain's Pub** — Celtic folk
|
||||||
|
- **Cosmoeuphoria** — ambient and space music
|
||||||
|
- **Bisexual Surfers From the Twilight of Time** — surf rock and rockabilly
|
||||||
|
- **The Bollocks** - punk rock
|
||||||
|
- **The Spin** - eclectic tunes from all genres
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This repo covers the **frontend only** — the public-facing website. Icecast configuration, Yunohost server administration, and streaming software are out of scope. Do not look for or suggest changes to server-side streaming config.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- [index.php](index.php) — Main page. Contains the audio player, now-playing widget, upcoming schedule section, and about section. Show information is updated here manually before each broadcast.
|
||||||
|
- [now_playing.php](now_playing.php) — Fetches the currently playing track from the Icecast JSON status API and returns it as HTML. Called by the frontend every 15 seconds via `setInterval`.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
- **Backend:** PHP only. No Composer, no package manager, no build step.
|
||||||
|
- **Frontend:** HTML5 UP Strata template with custom CSS additions. No npm, no webpack, no preprocessor — edit CSS directly in `assets/css/main.css` or inline `<style>` blocks.
|
||||||
|
- **Now-playing:** `index.php` fetches `now_playing.php` via JavaScript every 15 seconds and injects the result into `#now-playing`. The fetch uses `arrayBuffer` + `TextDecoder` to handle the UTF-8 encoding correctly on the client side.
|
||||||
|
|
||||||
|
## Icecast Integration
|
||||||
|
|
||||||
|
- **Stream URL:** `https://radio.cyberpunklibrarian.nohost.me/rfe`
|
||||||
|
- **Status API:** `https://radio.cyberpunklibrarian.nohost.me/status-json.xsl`
|
||||||
|
|
||||||
|
The status API returns JSON with track metadata under `icestats.source`. The `source` key may be a single object or an array depending on how many mountpoints are active; `now_playing.php` handles both cases.
|
||||||
|
|
||||||
|
## Known Encoding Quirk
|
||||||
|
|
||||||
|
Icecast double-encodes track metadata as Latin-1 interpreted as UTF-8. The fix in [now_playing.php:23-24](now_playing.php#L23-L24) deliberately converts the string from UTF-8 to ISO-8859-1 to strip the outer encoding layer and recover the correct UTF-8 byte sequence. Do not remove or "simplify" this conversion — it is intentional and necessary for non-ASCII characters (accented names, etc.) to display correctly.
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
There is no CI/CD pipeline. Deployment is manual:
|
||||||
|
|
||||||
|
1. Commit and push changes to the self-hosted Gitea repository.
|
||||||
|
2. Upload changed files to the Yunohost web server via SFTP.
|
||||||
|
|
||||||
|
There is no staging environment — changes go straight to production.
|
||||||
|
|
||||||
|
## Updating Show Information
|
||||||
|
|
||||||
|
Show info lives in the `#one` section of `index.php`. Previous shows are commented out rather than deleted, so there's a history of past broadcasts in the markup. When updating for a new show, comment out the current show block and add the new one above it.
|
||||||
@@ -160,11 +160,13 @@
|
|||||||
<p>I'll try and give as much notice as I can before pushing the button. Goddess willing, maybe I'll get a schedule in place sometime soon. But if you miss the stream, you can always <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere">find it in the archive</a> and <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere/feed.xml">subscribe to the show</a> in your podcast app of choice. <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere/follow">Follow the archive on the Fediverse</a> and you'll be alerted every time a new episode drops into the feed! In the meantime, tune in when you can, and thanks for being here.</p>
|
<p>I'll try and give as much notice as I can before pushing the button. Goddess willing, maybe I'll get a schedule in place sometime soon. But if you miss the stream, you can always <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere">find it in the archive</a> and <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere/feed.xml">subscribe to the show</a> in your podcast app of choice. <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere/follow">Follow the archive on the Fediverse</a> and you'll be alerted every time a new episode drops into the feed! In the meantime, tune in when you can, and thanks for being here.</p>
|
||||||
|
|
||||||
<h3>Shows</h3>
|
<h3>Shows</h3>
|
||||||
<p>Currently, we've got three shows that can go live, depending on what we're feeling at the time. Chances are good we'll add a couple more, but for now, you can tune in for:<br>
|
<p>Currently, we've got five shows that can go live, depending on what we're feeling at the time. Chances are good we'll add a couple more, but for now, you can tune in for:<br>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>O'Morain's Pub</strong> - Celtic folk from both sides of the Atlantic, from the old countries to the new world.</li>
|
<li>👩🎤 <strong>The Bollocks</strong> - Punk rock bangers from the well-known to the deep cuts you don't hear every day.</li>
|
||||||
<li><strong>Cosmoeuhporia</strong> - Audio psychedelia and musical LSD brought to you from the depths of outer, and inner, space. </li>
|
<li>🏄♀️ <strong>Bisexual Surfers from the Twilight of Time</strong> - "Surf's up," they said. And off in the far distance, we heard the screams of pleasure.</li>
|
||||||
<li><strong>Bisexual Surfers from the Twilight of Time</strong> - At first we feared them, with their glassy eyes, their waxed surf boards, their perfect bodies, and their electric guitars. "Surf's up," they said. And off in the far distance, we heard the screams of pleasure.
|
<li>🌌 <strong>Cosmoeuhporia</strong> - Audio psychedelia and musical LSD brought to you from the depths of outer, and inner, space. </li>
|
||||||
|
<li>🍻 <strong>O'Morain's Pub</strong> - Celtic folk from both sides of the Atlantic, from the old countries to the new world.</li>
|
||||||
|
<li>🔊 <strong>The Spin</strong> - The Spin is something a bit different in that it's the playlist of new and newly recommended music we're checking out right now. Easily the most eclectic show because you never know what you're going to hear.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user