- commit
- 27696c8
- parent
- a7f6257
- author
- xxwhirlpool
- date
- 2026-01-21 18:15:48 -0500 EST
use passtore for lastfm api key
3 files changed,
+10,
-8
+3,
-1
1@@ -10,7 +10,9 @@
2
3 user="springpool"
4
5-URL="https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=$user&api_key=$LASTFM_APIKEY&format=json&limit=1"
6+apikey=$(pass api/lastfm)
7+
8+URL="https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=$user&api_key=$apikey&format=json&limit=1"
9
10 artist=$(curl -s ${URL} | jq -r '.recenttracks.track[0].artist."#text"')
11 album=$(curl -s ${URL} | jq -r '.recenttracks.track[0].album."#text"')
+3,
-6
1@@ -1,12 +1,9 @@
2 #!/bin/bash
3
4-# get last.fm API key
5-if [ -f ~/.privatevars ]; then
6- . ~/.privatevars
7-fi
8-
9+apikey=$(pass api/lastfm)
10 user="springpool"
11-URL="https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=$user&api_key=$LASTFM_APIKEY&format=json&limit=1"
12+
13+URL="https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=$user&api_key=$apikey&format=json&limit=1"
14
15 artist=$(curl -s ${URL} | jq -r '.recenttracks.track[0].artist."#text"')
16 album=$(curl -s ${URL} | jq -r '.recenttracks.track[0].album."#text"')
+4,
-1
1@@ -1,6 +1,9 @@
2 #!/bin/bash
3
4-URL="https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=${USER}&api_key=${API_KEY}&format=json&limit=1"
5+USER="springpool"
6+API_KEY=$(pass api/lastfm)
7+
8+URL="https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=$USER&api_key=$API_KEY&format=json&limit=1"
9
10 artist=$(curl -s ${URL} | jq -r '.recenttracks.track[0].artist."#text"')
11 track=$(curl -s ${URL} | jq -r '.recenttracks.track[0].name')