pho icon indicating copy to clipboard operation
pho copied to clipboard

[Feature] pho view formats

Open alyssadev opened this issue 1 year ago • 0 comments

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

alyssadev avatar Jan 06 '24 02:01 alyssadev