pho
pho copied to clipboard
[Feature] pho view formats
Use case: on investigating #13 and ways I could implement it without changing pho, I tried parsing pho view streamlink-appimage, but the output of that command is unfriendly to parsing. I'd like to propose simple and json formats for pho view.
Currently:
$ pho view streamlink-twitch-gui
> Identifier streamlink-twitch-gui
...
Expected:
$ pho view --format=json streamlink-twitch-gui
{"identifier": "streamlink-twitch-gui","version": "v2.4.1", ...}
$ pho view --format=json streamlink-twitch-gui | jq -r '.version'
v2.4.1
$ pho view --format=simple streamlink-twitch-gui
Identifier streamlink-twitch-gui
Version v2.4.1
...
$ pho view --format=simple streamlink-twitch-gui | grep '^Version' | awk '{print $2}'
v2.4.1