You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bringing back this idea from an old issue: #64
I still think there's some value to a JSON output format, even when there's --format now.
For example, I wanted to have a conditional formatting:
If both the artist and title name is available, I want to display {{ artist }} - {{ title }}.
If only the title name is available, I want to display {{ title }}.
I tried playing around with the default function, but I don't think this is possible.
This can be potentially implemented as part of the format string, but I think it's easier to just have the tool output JSON. This will be very powerful, because once you have a JSON string, you can do any logic you want with it. Also, JSON is available everywhere these days, even in the shell with tools like jq.
The text was updated successfully, but these errors were encountered:
Bringing back this idea from an old issue: #64
I still think there's some value to a JSON output format, even when there's
--format
now.For example, I wanted to have a conditional formatting:
If both the artist and title name is available, I want to display
{{ artist }} - {{ title }}
.If only the title name is available, I want to display
{{ title }}
.I tried playing around with the
default
function, but I don't think this is possible.This can be potentially implemented as part of the format string, but I think it's easier to just have the tool output JSON. This will be very powerful, because once you have a JSON string, you can do any logic you want with it. Also, JSON is available everywhere these days, even in the shell with tools like
jq
.The text was updated successfully, but these errors were encountered: