r4#
native desktop browser for radio4000 — 1.6k radios, 150k tracks, all local
installation#
from source (requires rust toolchain):
cargo install --path .
or install directly from git:
cargo install --git ssh://git@tangled.sh/oskar.tngl.sh/desktop-test
then r4 will be in your path. Note that our program is also a CLI, so you can do
cargo run -- --help (which is like running `r4 --help`)
development#
clone and run:
git clone ssh://git@tangled.sh/oskar.tngl.sh/desktop-test
cd desktop-test
cargo run
linting:
cargo fmt # format code
cargo clippy # catch issues
testing:
cargo test # all tests
cargo test metadata # specific module
cargo run --release # performance testing (dev builds are slower)
data pipeline:
r4 import # run import manually (or it runs automatically on first launch)
you'll need rust toolchain installed
structure#
src/
main.rs iced app, elm architecture
view.rs view definitions (what to show)
panel.rs pane grid (where to show it)
channels_view.rs channels list + state
tracks_view.rs tracks list + state
tags_view.rs tags browser + filtering
view_editor.rs inline view creation/editing
channel.rs channel data model
track.rs track data model
metadata.rs hashtag/mention extraction
data_store.rs loads channels.json + tracks.json
palette.rs colors
data/
*.gz compressed sources (committed)
channels.json 1.6k radios (generated, gitignored)
tracks.json 150k tracks (generated, gitignored)
docs/ notes for building efficiently
iced.txt framework reference
halloy-patterns.txt real-world iced patterns
data.txt import pipeline details
metadata.txt tag/mention extraction
views-and-panels.txt architecture explanation
testing.txt testing patterns
~/.config/r4/views/ user-created view definitions (toml)
see AGENTS.md for context, decisions, and workflow