minor update
This commit is contained in:
parent
64cfab7d40
commit
3129cc7bee
2 changed files with 28 additions and 1 deletions
28
bin/mb_csv.fish
Normal file
28
bin/mb_csv.fish
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
set -l artist_id $argv[1]
|
||||
|
||||
set -l total 999
|
||||
set -l offset 0
|
||||
|
||||
set -l out ""
|
||||
|
||||
|
||||
set query '.["release-groups"][] | [(.["artist-credit"] | (map(.name) | join(";") )), .title, .["first-release-date"], .["primary-type"], (.["secondary-types"] | join(";")), "https://musicbrainz.org/release-group/" + .id] | @csv'
|
||||
|
||||
while test $offset -lt $total;
|
||||
echo "fetching offset $offset of $total"
|
||||
|
||||
set -l json (curl -SsL -H "Accept: application/json" "http://musicbrainz.org/ws/2/release-group?inc=artist-credits+aliases&release-group-status=website-default&artist=$artist_id&offset=$offset" | tee /tmp/foo.json)
|
||||
|
||||
set total (echo $json | jq -r '.["release-group-count"]')
|
||||
set offset (math $offset + 25)
|
||||
|
||||
set -l csv (echo $json | jq -r $query | string collect -N)
|
||||
|
||||
set out (string collect -N $out $csv)
|
||||
end
|
||||
|
||||
|
||||
echo $out | wl-copy -n
|
||||
|
||||
echo $out
|
||||
|
|
@ -12,4 +12,3 @@ monitorv2 {
|
|||
exec-once = [workspace 1 silent] uwsm app -a brave_work -- brave --profile-directory="Default" # work profile
|
||||
exec-once = [workspace 6 silent] uwsm app -- brave -a brave_personal --profile-directory="Profile 2" # personal profile
|
||||
|
||||
windowrulev2 = tile, class:com-eviware-soapui-SoapUI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue