Re:Steve Albini has died
by adolph on Wednesday May 08, 2024 @03:52PM
(#40302176)
Also, what is this jqmusic executable with the jq style query?
[ Parent
| on HN ]
Re:Steve Albini has died
by BoingBoomTschak on Wednesday May 08, 2024 @03:59PM
(#40302234)
Just a jq wrapper that adds -e and includes some functions
$ cat ~/bin/jqmusic
#!/usr/bin/env bash
exec jq -e "${@:1:$(($#-2))}" "include \"music\"; ${@: -2:1}" "${@: -1}" >/dev/null 2>&1
$ cat ~/.jq/music.jq
def year: .released | match("[0-9]{4}").string | tonumber;
def has_genre(str): .genres.primary | any(. == str);
def match_genre(regexp): .genres.primary | any(match(regexp));
Together with https://git.sr.ht/~q3cpma/rymscrap to get the actual JSON.