123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- #
- # Copyright 2023 Jeff Cliff
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or (at
- # your option) any later version.
- #
- # This program is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- # General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program at COPYING.GPL. If not, see <https://www.gnu.org/licenses/>.
- #
- HOME=/home/themusicgod1
- INSTANCE=shitposter.world
- #echo "
- TITLE=`cat /tmp/scrobblescript-title`;
- #echo "ARTIST:"
- ARTIST=`cat /tmp/scrobblescript-artist`;
- #echo "ALBUM:"
- ALBUM=`cat /tmp/scrobblescript-album`;
- echo "TOKEN:"
- TOKEN=`cat $HOME/.config/toot/config.json | grep access_token | awk -F':' '{print $2}' | awk -F'"' '{print $2}'`
- #echo $TOKEN
- #echo $ARTIST " " $TITLE " " $ALBUM
- curl -X POST \
- -d "title=$TITLE " \
- -d "album=$ALBUM " \
- -d "artist=$ARTIST " \
- -H 'Authorization: Bearer '$TOKEN \
- https://$INSTANCE/api/v1/pleroma/scrobble
|