I use Newsboat. Let me know what you think, or have problems with this.
-
Install tools:
To install Newsboat on a Linux-based system, use the following command:
sudo apt-get install newsboatTo install
jq, use the following command:sudo apt-get install jqNote: These commands are for Ubuntu. For other systems, please refer to the respective documentation.
-
Fetch and filter RSS feed:
Use the curl command to fetch the RSS feed:
curl 'http://twitrss.me/twitter_user_to_rss/?user=username'Pipe the output to
jqto filter the tweets:jq '.items[] | select(.title | contains("#NowPlaying"))'Extract links from the filtered tweets:
jq -r '.link'Note: These commands should be combined into one pipeline, as demonstrated in the previous response.
-
Interact with Spotify's Web API:
Before you can interact with Spotify's API, you need to authenticate using OAuth 2.0. You can do this with the
Authorization Code Flow, which involves several steps:- Register your app
- Request authorization from the user
- Exchange the authorization code for an access token
- Use the access token to access the Web API
-
Add songs to a playlist:
Once you have the access token, you can add songs to a playlist with the following command:
curl -X "POST" "https://api.spotify.com/v1/playlists/{playlist_id}/tracks" -H "Accept: application/json" -H "Authorization: Bearer {access_token}" --data "{track_uris}"Replace
{playlist_id},{access_token}, and{track_uris}with your specific details.
