Skip to content

trip5/webstations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webstations

An attempt at open-sourcing curated web-radio lists.

Trip 5 Note

Sorry for the AI-generated readme... I'll improve this at some point.

Project Structure

  • playlists/ - Source playlist files in various formats (CSV, JSON)
  • convert_playlists.py - Converts playlists to standardized formats
  • generate_index.py - Generates the master index file

How It Works

The project automatically converts playlist files from various formats into both CSV and JSON standardized formats. Each input file produces two output files.

These files are then put into the latest release

Input Formats (playlists.master/)

CSV files can use various formats:

  • Tab-delimited: name\turl\tovol
  • Space-delimited: name url ovol or url name or name ovol url
  • Double-space-delimited name url ovol
  • Mixed formats with different field orders

JSON files can be:

  • Ka-Radio format: {"Name":"...","URL":"host","File":"path","Port":"80","ovol":"0"}
  • Standard format: {"name":"...","url":"...","ovol":"0"}

Output Formats (playlists/)

Each input file is converted to both formats:

CSV files: Tab-delimited format

Station Name\thttp://url.com/stream\t0

JSON files: Compact JSON array format (no line breaks)

[{"name":"Station Name","url":"http://url.com/stream","ovol":"0"}]

Master Index (index.json)

A master index file is automatically generated in playlists/index.json listing all available playlists:

[{"name":"my stations","csv":"my-stations.csv","json":"my-stations.json","total":"50"}]
  • name: Display name (derived from filename with underscores converted to spaces)
  • csv: CSV filename
  • json: JSON filename
  • total: Number of stations in the playlist

Example

Input file: playlists/my-stations.csv

Output files:

  • playlists-output/my-stations.csv (standardized tab-delimited)
  • playlists-output/my-stations.json (JSON array format)

Running Locally

Convert playlists:

python convert_playlists.py

Generate master index:

python generate_index.py

Or run both:

python convert_playlists.py && python generate_index.py

This will process all files in playlists/ and output standardized files plus index.json to playlists-output/.

GitHub Actions

Any push to the main branch automatically triggers the workflow, which:

  1. Runs the conversion script to standardize all playlists
  2. Generates the master index file
  3. Creates a new release with all playlist files

Releases

Each workflow run creates a new release:

  • Tag: Date-time format YYYY-MM-DD-HHmmss (e.g., 2026-02-09-041400)
  • Name: Human-readable timestamp with colons (e.g., 2026-02-09 04:14:00)
  • Marked as: Latest release
  • Contains: All files from the playlists/ folder (CSV, JSON, and index.json)

Contributing

To add new stations:

  1. Add or update files in playlists/
  2. Commit and push your changes
  3. The workflow will automatically generate standardized output files and create a release

About

An attempt at open-sourcing curated web-radio lists...

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages