nomadks.blogg.se

Mastodon linux emoji
Mastodon linux emoji








mastodon linux emoji

Let's build a command-line Mastodon client that reads, by default, the toots of the account you log into, but that will also let you read toots from any federated account you pass as a parameter to the script.Īs you will also need login credentials to access an account, you are going to need at least three options on the command line.

#MASTODON LINUX EMOJI CRACK#

You will only need to run readtoots_register.py once, and, when you're done, you can crack on with readtoots.py proper. It also kindly adds the address of the instance the app is registered with, making it super convenient as you will see later on. The Mastodon.create_app() function shown in Listing 1 not only registers the application, it also returns a client_id (line 1 in Listing 2) and a client_secret (line 2 in Listing 2) that you will be able to use to identify your application each time it has to interact with the Mastodon instance. If you look inside, you will see something similar to Listing 2. Save the file as readtoots_register.py, make it executable with chmod a+x readtoots_register.pyĪfter running it for the first time, nothing apparently happens, but you will find a new.

mastodon linux emoji

Finally, the to_file argument tells readtoots_register.py where to store the credentials information the server will send back down the line for the application. This is the address of a Mastodon server – you would usually use the instance where you have your account for this.

mastodon linux emoji

The api_base_url on line 8 tells the application what instance of Mastodon you want to go through. On line 7, you tell the server what sort of actions it will be able to carry out (in this case only 'read' – other actions are 'write', 'follow', and 'push'). Lines 5 through 10 registers the app, giving it a name the server can identify it by ( readtoots on line 6). Line 3 pulls in the bits of the mastodon module you need. Line 1 of Listing 1 just sets the interpreter you want to use to run this script (your default Python interpreter).










Mastodon linux emoji