Skip to content

Flag for script-friendly output #132

@noctuid

Description

@noctuid

I have an mpv script that uses webtorrent-cli and parses its output (which is somewhat complicated to do, especially because of the colorized output). It would be nice if there was a flag to just output json once as soon as the server is up (no colors) and nothing else. For example, something like this:

{
    "selected": 0,
    "files": [
        {
            "href": "localhost://8000/...",
            "name": "Video name.mkv",
            "path": "/path/to/Video name.mkv"
        },
        ...
    ]
}

Edit: In some cases it would actually be useful to keep the normal output as well, so if this could just be output on a single line non-colored once the server is up, that would be good (assuming this is the only case where { starts a line). That or if there was a flag to run a command with this as the argument once the server was up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions