From 3129cc7beec841883ad0b948d956f19c877edae5 Mon Sep 17 00:00:00 2001 From: aleidk Date: Thu, 9 Oct 2025 16:39:15 -0300 Subject: [PATCH] minor update --- bin/mb_csv.fish | 28 ++++++++++++++++++++++++++ configs/hypr/work-laptop/hyprland.conf | 1 - 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 bin/mb_csv.fish diff --git a/bin/mb_csv.fish b/bin/mb_csv.fish new file mode 100644 index 0000000..9e864c8 --- /dev/null +++ b/bin/mb_csv.fish @@ -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 diff --git a/configs/hypr/work-laptop/hyprland.conf b/configs/hypr/work-laptop/hyprland.conf index d33dcc3..6588cd8 100644 --- a/configs/hypr/work-laptop/hyprland.conf +++ b/configs/hypr/work-laptop/hyprland.conf @@ -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