What is Nostr?
cinerion /
npub1nts…y4mr
2025-01-08 01:53:39
in reply to nevent1q…f4w6

cinerion on Nostr: John Paul Grips eris I listen to my music using mpd and ncmpcpp. Everytime there is a ...

John Paul Grips (nprofile…lq09) eris (nprofile…ltwp) I listen to my music using mpd and ncmpcpp.

Everytime there is a song change, ncmpcpp executes a script that updates the song on pleroma:

#! /bin/env sh

TOKEN=$(cat "$HOME/var/mpd-scrobble/token.txt")
INSTANCE="cawfee.club"

TITLE=$(mpc current -f %title%)
ARTIST=$(mpc current -f %artist%)
ALBUM=$(mpc current -f %album%)

curl -s -X POST \
-d "title=$TITLE " \
-d "album=$ALBUM " \
-d "artist=$ARTIST " \
-H 'Authorization: Bearer '"$TOKEN" \
https://$INSTANCE/api/v1/pleroma/scrobble > /dev/null


To get the token I use this site: https://prplecake.github.io/pleroma-access-token/ , fill the fields, select scope: write, and give oauth access through pleroma and get the first value, access_token, which I save to the location on the script.

I downloaded the page and ran it locally to get the auth token to be sure, it seems fine, I guess. If I ever post something unlike me, it's because I got hacked because of this :yuihehe:

Author Public Key
npub1ntsjppwnt8gw7cftguuqn5vza8gzx2maqal4gjux2qeymrfsc56s7my4mr