Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human-readable output format #71

Open
windytan opened this issue May 28, 2020 · 1 comment
Open

Human-readable output format #71

windytan opened this issue May 28, 2020 · 1 comment

Comments

@windytan
Copy link
Owner

Redsea should have an optional human-readable output format. It should

  • be compact and regularly formatted
  • for the most part, have one line per group
  • perhaps utilize ANSI colors to show the status of booleans

For example, this:

{"pi":"0xD385","group":"2A","prog_type":"Pop music","tp":false}
{"pi":"0xD385","group":"2A","prog_type":"Pop music","tp":false}
{"pi":"0xD385","group":"0A","ps":" N-JOY  ","di":{"dynamic_pty":true},"is_music":true,"prog_type":"Pop music","ta":false,"tp":false}
{"pi":"0xD385","group":"2A","prog_type":"Pop music","tp":false}
{"pi":"0xD385","group":"2A","radiotext":"Speeding Cars - Walking On Cars","prog_type":"Pop music","tp":false}
{"pi":"0xD385","group":"0A","di":{"stereo":false},"is_music":true,"prog_type":"Pop music","ta":false,"tp":false}
{"pi":"0xD385","group":"2A","prog_type":"Pop music","tp":false}

becomes this:

D385  2A TP MS (Pop music)
D385  2A TP MS (Pop music)
D385  0A TP MS (Pop music) PS: N-JOY
D385  2A TP MS (Pop music)
D385  2A TP MS (Pop music) RT:Speeding Cars - Walking On Cars
D385  0A TP MS (Pop music)
D385  2A TP MS (Pop music)

This could be implemented by fetching data from the internal JSON representation. A downside to that is that we have to remember the sorting tags for each key.

Some PTY names are quite long compared to the other information, and they take an unnecessarily large space. Arguably it's not even useful information in a human-readable output. Should they be abbreviated somehow? Even omitted?

@andimik
Copy link
Contributor

andimik commented May 28, 2020

Radio manufacturers who use 8 digit displays have already such terms in use, for example https://helpguide.sony.net/ev/dsx-b41d/v1/en/contents/TP0002733572.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants