Skip to content

Add option to emit progress updates as newline-delimited lines (non-TTY / wrapper-friendly) or as json format #201

@JasonLandbridge

Description

@JasonLandbridge

Related: Tyrrrz/CliWrap#66

Hi there,

dash-mpd-cli currently renders progress as an inline-updating single line (carriage returns / TTY-style progress bar). This works well for interactive terminals, but it is difficult to consume from wrappers and process supervisors because:

  • Many process libraries and log systems are newline-delimited and won’t emit events until \n is written.
  • Inline \r redraw output is hard to parse reliably and often ends up lost, buffered, or mangled.
  • In CI/log pipelines or when stdout/stderr are redirected (non-TTY), the progress bar output is not wrapper-friendly.
Image

Requested feature

Add a CLI argument that switches progress output from “single line redraw” to “newline-per-update”.

Examples (name bikeshedding):

  • --progress=tty|lines (default tty)
  • --progress-lines
  • --no-inline-progress
  • --progress-newline

Behavior in lines mode:

  • Each progress update is emitted as a complete single line terminated by \n (no carriage return redraws).
  • Suitable for programmatic parsing and logging.

Suggested output format

Human-readable is fine; stability matters more than prettiness. For wrappers it would be helpful if the line contained:

  • elapsed time
  • current step (e.g. “Fetching audio segments”)
  • speed
  • total file size
  • optional: percent / downloaded bytes / total bytes

Example:
[16s] Fetching audio segments speed=0.6MB/s filesize=12301mb

(If you’re open to it, a machine-readable alternative like --progress-format=json would be ideal, but newline text alone would already solve the wrapper issue.)

Why this matters

I’m building a wrapper around dash-mpd-cli inside Reaparr to offer stream downloads, and need to provide real-time progress updates to my application/UI. With newline-delimited progress, wrappers can reliably stream output and parse progress without dealing with terminal control characters.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions