a simple mastodon terminal client in python
Best you use the requirements.txt
For images in terminal use requirements-full.txt
(that's a big installation!)
basic:
pip install -r requirements.txt
full:
pip install -r requirements-full.txt
Copy the conf.py
to conf_local.py
and change the settings to your needs.
Create a new app under: https://YOUR_INSTANCE_DOMAIN/settings/applications
eg: https://mastodon.social/settings/applications
Launch main.py with python
python main.py
- Create a batch file, in this example
toot.bat
, to run your Python script:
@echo off
cd C:\Users\Gamer\Documents\Projekte\coding\python\pyToot
call .\venvs\venv3_10\Scripts\activate
python main.py %*
- Add the location of your batch file to the PATH:
To do this, right-click on 'This PC' or 'My Computer' and select 'Properties'. Then, click on 'Advanced system settings' and select 'Environment Variables'. Under 'System Variables', find the PATH variable, select it, and click on 'Edit'. In the 'Variable value' field, append the full path to the directory containing your batch file. Separate it from the existing paths by a semicolon. - Restart your terminal:
After making these changes, you may need to restart your terminal (or even your computer) for the changes to take effect.
Now, you should be able to type toot
in your terminal, and your Python script will execute, no matter which directory you're in.
Build/update the container with dockerBuild.sh
(Mac / Linux) or dockerBuild.bat
(Windows).
Run the container with dockerStart.sh
(Mac / Linux) or dockerStart.bat
(Windows).
No internet / network
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='mastodon.social', port=443): Max retries exceeded with url: /api/v1/timelines/home?limit=1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001B051A7A3B0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))