Skip to content

dielectric-coder/SWLScheduleTool

Repository files navigation

SWL Schedule Tool

A collection of tools for shortwave listeners (SWL) to check broadcast schedules and find active stations.

Overview

This project provides utilities to query and display shortwave radio broadcast schedules from the EiBi (Eibi) database. The main tool allows you to check which stations are currently broadcasting on a specific frequency.

Screenshots

Interactive TUI Dashboard

SWL Dashboard — empty state

Frequency Search Results

Search results for 6070 kHz with ON AIR highlighting, distance, and bearing from QTH:

SWL Dashboard — frequency search results

Station Detail Modal

SWL Dashboard — station detail modal

CLI Schedule Check (checksked)

checksked CLI output

Features

  • Interactive TUI Dashboard: Full-screen terminal UI with live UTC clock, frequency search, bearing and distance display
  • Real-time Schedule Checking: Query current broadcasts on any frequency
  • Radio Tuning: Press t to tune your radio via CAT server; also sends station info to SWLDemodTool
  • azmap-gtk Integration: Press m to show transmitter location on an azimuthal map; reuses a running instance via IPC
  • Bearing & Distance: Great-circle distance and compass bearing from your QTH to each transmitter site
  • UTC Time Display: All times shown in UTC for international coordination
  • SWL Logging: Press l to log the selected station to ~/Documents/swl-log.csv (shared with SWLDemodTool)
  • Frequency Zoom: Press z to see the nearest on-air stations above and below the current frequency, highlighted in blue
  • Active Station Highlighting: Currently broadcasting stations are highlighted in bold green
  • Next Broadcast Display: Inactive stations show time until next broadcast in light grey
  • Remaining Time Display: Shows how much time is left for active broadcasts
  • Midnight Crossing Support: Correctly handles broadcasts that span across midnight
  • Multi-language Support: Displays station language and target area information
  • Transmitter Site Extraction: Extracts transmitter sites with GPS coordinates to JSON
  • Integrated Schedule Updates: Update EiBi data directly from the TUI

Installation

From PyPI

pip install eibi-swl-dashboard

This installs three commands: swl-sched, checksked, and updatesked.

From source (development)

git clone https://github.com/mikewam/SWLScheduleTool.git
cd SWLScheduleTool
pip install -e .

Arch Linux

cd packaging/archlinux
makepkg -si

This installs the entry points (swl-sched, checksked, updatesked) and a desktop entry for application menu integration.

Standalone binary

Build a self-contained executable (~16MB) that bundles Python and all dependencies — no Python installation required on the target machine:

python -m venv .venv && .venv/bin/pip install -e . pyinstaller
.venv/bin/pyinstaller --onefile --name swl-sched \
  --add-data "src/eibi_swl/countrycode.dat:eibi_swl" \
  --add-data "src/eibi_swl/targetcode:eibi_swl" \
  --add-data "src/eibi_swl/transmittersite:eibi_swl" \
  --add-data "src/eibi_swl/swlconfig.conf.sample:eibi_swl" \
  --add-data "src/eibi_swl/swl-schedules-data:eibi_swl/swl-schedules-data" \
  --hidden-import=textual --hidden-import=rich \
  --collect-all=textual --collect-all=rich \
  --paths=src src/eibi_swl/swl.py

The binary is output to dist/swl-sched.

Configuration

Create or edit swlconfig.conf in the project root with your QTH (station location) and optional radio connection:

[qth]
lat = 45.5017
lon = -73.5673
name = Montreal, QC

[radio]
host = localhost
port = 4532

[logging]
listener = Your Name
log_file = ~/Documents/swl-log.csv

The [qth] section is used to calculate bearing and distance to each transmitter site. The [radio] section configures the connection to the EladSpectrum CAT server for the t (tune) key. Radio settings can also be set via --host and --cat-port CLI flags. The [logging] section stores the listener name (persisted across sessions) and log file path.

Usage

Interactive TUI Dashboard

swl-sched
swl-sched --host 192.168.1.50 --cat-port 4532

The --host and --cat-port flags are saved to the config file, so subsequent runs remember the connection without needing the flags again.

Launches a full-screen terminal dashboard with:

  • Tokyo Night theme with black background
  • Starship-style powerline input prompts (requires Nerd Font)
  • Four inputs: QTH (station location), Frequency (kHz), Station (name search), and Update (schedule period like b25)
  • Live UTC clock
  • Schedule table with distance (km) and bearing from your QTH
  • ON AIR highlighting (bold green) for active broadcasts
  • NEXT time display (light grey) for upcoming broadcasts
  • Station detail modal on row select (Enter)
  • Press t to tune the radio to the selected frequency via CAT server
  • Press m to open the selected station in azmap-gtk (azimuthal map)
  • Press z to zoom — shows the nearest on-air stations above and below the current frequency (highlighted in blue)
  • Press l to log the selected station (SWL log entry form with SINPO, mode, remarks)
  • Press F5 to update schedules, Escape to unfocus input, q to quit

Check Stations on a Frequency

checksked <frequency_in_kHz>

Example:

checksked 1170

Output:

Stations en onde à la fréquence 1170 kHz en ce moment -> 14:46 UTC

1170 kHz 0000-0350 UTC Pays: KOR Site: k      Station: KBS Hanminjok            Langue: K   Cible:   FE 0350
1170 kHz 0950-1000 UTC Pays: KOR Site: k      Station: KBS Hanminjok            Langue: K   Cible:   FE 0050
1170 kHz 1400-2400 UTC Pays: KOR Site: k      Station: KBS Hanminjok            Langue: K   Cible:   FE 1000 ◄ ON AIR (reste: 09h14)
1170 kHz 1000-1100 UTC Pays: KOR Site: k      Station: KBS World Radio          Langue: K   Cible:   FE 0100
...

Update Schedule Data

updatesked <schedule_period>

Example:

updatesked b25

Downloads the latest EiBi schedule data for the specified season (a = summer, b = winter, followed by 2-digit year). Also extracts transmitter site locations and coordinates into transmitter-sites.json:

[
  {
    "country": "AFG",
    "site_code": "k",
    "name": "Kabul / Pol-e-Charkhi",
    "lat": 34.5333,
    "lon": 69.3333
  }
]

Data Format

The tool reads schedule data from CSV files in the swl-schedules-data/ directory. The CSV format includes:

  • kHz: Frequency in kilohertz
  • Time(UTC): Broadcast time range in UTC (HHMM-HHMM format)
  • Days: Days of operation (if applicable)
  • ITU: Country code
  • Station: Station name
  • Lng: Language code
  • Target: Target area
  • Remarks: Additional information
  • P: Priority/Power indicator
  • Start/Stop: Start and stop dates

Schedule Files

  • sked-current.csv: Current season's broadcast schedule
  • transmitter-sites.json: Transmitter sites with decimal lat/lon coordinates
  • sked-a25.csv: A25 season schedule (example)

Output Fields

  • Pays: Country code (3 letters)
  • Site: Transmitter site location code
  • Station: Broadcasting station name
  • Langue: Language code (e.g., K=Korean, J=Japanese, E=English)
  • Cible: Target area (e.g., FE=Far East, SAf=South Africa)
  • Duration: Broadcast duration in HHMM format
  • ◄ ON AIR HHhMM: Indicator for currently active broadcasts with remaining time (bold green)
  • → NEXT HHhMM: Time until next broadcast for inactive stations (light grey)

Language Codes

Common language codes used:

  • E: English
  • F: French
  • S: Spanish
  • K: Korean
  • J: Japanese
  • R: Russian
  • M: Mandarin Chinese
  • A: Arabic
  • P: Portuguese

Target Area Codes

Common target area codes:

  • FE: Far East
  • SEA: Southeast Asia
  • Eu: Europe
  • NAf: North Africa
  • SAf: South Africa
  • ME: Middle East
  • SAs: South Asia
  • NAm: North America

Requirements

  • Python >=3.10
  • Standard library modules: sys, os, csv, datetime, json, re, configparser, math
  • External: rich (install via pip install rich or pacman -S python-rich)
  • External: textual (install via pip install textual or pacman -S python-textual) — required for swl.py
  • A Nerd Font terminal font — required for powerline glyphs in swl.py

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

Data Source

Schedule data is based on the EiBi (Eibi) shortwave broadcast schedule database. http://eibispace.de/

License

GPLv3

Author

Michel Lachaine, mike@mikelachaine.ca

Acknowledgments

  • EiBi for providing comprehensive shortwave broadcast schedules

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors