radio4000 / radio4000/cli

Replace r4.channel+track with r4 view?

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Related to the discussion in #8 I'm wondering about changing the commands a bit.

  • r4 view '' -> data to stdout
  • r4 dl '' -> media/files to disk for tracks in that view
  • r4 backup '@channel' -> snapshot bundle, basically a view + plus timestamp
  • remove r4 channel + track

ViewURI is the abstraction. Reuse the one from r4-sync-tests/docs/views.md.

  • r4 view '' is the main read command.
  • r4 view returns one shape:
    {
    "uri": "@ko002 #house?limit=20",
    "channels": [],
    "tracks": []
    }

More notes..

  • view is the export/read story
  • dl is the file/materialization story
  • backup is just a named snapshot format, not a core abstraction
  • no separate export command
  • avoid old channel view / track list --channel style
  • let the URI carry query semantics instead of duplicating them as flags
    Minimal flags for view:
  • --format <text|json|ndjson|sql|m3u>
  • maybe --limit, --order, --direction only if you want CLI overrides on top of URI semantics, but ideally keep those in the URI
    So the UX becomes:
r4 view '@ko002'
r4 view '@ko002 #house?limit=50'
r4 view '@alice;@bob'
r4 dl '@ko002'
r4 backup '@ko002' > ko002.backup.json

Not sure about the @ symbols everywhere. bit annoying, but needed for the view string at least..

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with r4-sync-tests/docs/views.md to understand the ViewURI abstraction, then inspect the existing r4 channel and track command entry points. Compare the current command behavior with the proposed view, dl, and backup UX, including the listed formats and URI examples. Done means the command structure and output shape are agreed and implemented without the old channel and track commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.