Update README.md
This commit is contained in:
@@ -6,18 +6,42 @@ This is a simple Python script to automatically unfollow inactive users on Blues
|
|||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
1. Clone the repository:
|
1. Clone the repository:
|
||||||
```git clone https://git.dataprolet.de/dataprolet/Bluesky-Unfollow-Inactive.git```
|
```git clone https://git.dataprolet.de/dataprolet/Bluesky-Unfollow-Inactive.git```
|
||||||
2. Install Python modules:
|
2. Install Python modules:
|
||||||
```python -m pip install atproto python-telegram-bot```
|
```python -m pip install atproto python-telegram-bot```
|
||||||
3. Fill in the variables
|
3. Fill in the variables
|
||||||
4. Create a Telegram bot
|
4. Create a Telegram bot using the [BotFather](https://t.me/botfather)
|
||||||
5. Run the script using ```--dry``` or ```--prod``` and ```--days {amount of days}```
|
|
||||||
|
|
||||||
### Variables
|
#### Variables
|
||||||
```handle```: Your Bluesky handle like _user.bsky.social_
|
```handle```: Your Bluesky handle e. g. _user.bsky.social_
|
||||||
```password```: Your [Bluesky app password](https://bsky.app/settings/app-passwords)
|
```password```: Your [Bluesky app password](https://bsky.app/settings/app-passwords)
|
||||||
```BOT_TOKEN```: Your Telegram bot BOT_TOKEN
|
```BOT_TOKEN```: Your Telegram bot BOT_TOKEN
|
||||||
```CHAT_ID```: Your Telegram bot's chat ID
|
```CHAT_ID```: Your Telegram bot's chat ID
|
||||||
|
|
||||||
The chat ID can be retrieved by opening https://api.telegram.org/bot{BOT_TOKEN}/getUpdates in a browser, send a message to the bot and get chat.id from the returning JSON.
|
The chat ID can be retrieved by opening https://api.telegram.org/bot{BOT_TOKEN}/getUpdates in a browser, send a message to the bot and get ```chat.id``` from the returning JSON.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Run the script with the following arguments:
|
||||||
|
```python unfollow_inactive.py --dry --days 30```
|
||||||
|
|
||||||
|
#### Arguments
|
||||||
|
|
||||||
|
| Argument | Description |
|
||||||
|
| -------- | -------------------------------------------------------------------------------- |
|
||||||
|
| `--dry` | Dry run: Shows which users would be unfollowed without making any changes. |
|
||||||
|
| `--prod` | Production mode: Actually unfollows the inactive users.|
|
||||||
|
| `--days` | Number of days after which a user is considered inactive (default: 15). |
|
||||||
|
|
||||||
|
#### Examples:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Dry run: Show users inactive for 60 days
|
||||||
|
python unfollow_inactive.py --dry --days 60
|
||||||
|
|
||||||
|
# Production run: Unfollow users inactive for 30 days
|
||||||
|
python unfollow_inactive.py --prod --days 30
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user