# Files for sending what Rhythmbox is currently playing to an Iceshrimp.NET Note ## Introduction: A Rhythmbox plugin creates a hidden text file in the ~/home folder This script takes the contents of that hidden text file and sends it to an Iceshrimp.NET account as a Note ## Prerequisites: * ### Rhythmbox Plugin [https://github.com/Zattstudio/rhythmbox-nowplaying](https://github.com/Zattstudio/rhythmbox-nowplaying) I'm sure other plugins are available * ### Iceshrimp.NET TOKEN To generate a TOKEN, in a Terminal send a POST request: curl -X 'POST' \ 'https://shrimp.example.org/api/iceshrimp/auth/login' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "username": "account_name_goes_here", "password": "super_long_password_goes_here" }' * #### Make a note of the Authentication TOKEN in the response This bit is the Authentication TOKEN: "token":"this_is_the_TOKEN" * #### Test the TOKEN works In a Terminal post something to the instance using the TOKEN provided: curl -X 'POST' \ 'https://shrimp.example.org/api/iceshrimp/notes' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer this_is_the_TOKEN" \ -d '{ "text": "Test Post", "visibility": "public" }' **Note:** * The 'text' parameter is required * The 'visibility' parameter is required ## Files: * ### [currently_playing.py] The Python code to take the contents of a hidden text file and POST it to an Iceshrimp.NET instance as a Note * ### [rhythmbox-current.out] The Rhythmbox plugin creates a hidden text file in ~/home (this is an unhidden example) * ### [secrets.py] The Python file that contains the access Token and other needed connection info