Skip to content

Luckywee/BlueskyDaily

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bluesky bot

Setup

Install python 3

sudo apt-get update
sudo apt-get install python3 python3-venv python3-pip

Start & activate venv

cd /home/freebox/bsky
python3 -m venv myenv
source /home/freebox/bsky/myenv/bin/activate

Install dependencies

pip install -r requirements.txt

Cron

Make sure you're on the good timezone:

sudo timedatectl set-timezone <your_timezone>

Edit the crontab:

crontab -e

Add the following cron jobs:

# Run at 10 AM / 10:00 every day with REPOST, saving log with date
0 10 * * * cd /home/freebox/bsky && /home/freebox/bsky/myenv/bin/python dailyLauncher.py REPOST >> /home/freebox/bsky/logs/dailyLogs_$(date +\%Y-\%m-\%d).log 2>&1

# Run at 6 PM / 18:00 every day with IMAGE, saving log with date
0 18 * * * cd /home/freebox/bsky && /home/freebox/bsky/myenv/bin/python dailyLauncher.py IMAGE >> /home/freebox/bsky/logs/dailyLogs_$(date +\%Y-\%m-\%d).log 2>&1

# Run at 8 PM / 20:00 every day to send mails
0 20 * * * cd /home/freebox/bsky && /home/freebox/bsky/myenv/bin/python dailyMail.py >> /home/freebox/bsky/logs/dailyMailLogs_$(date +\%Y-\%m-\%d).log 2>&1

Then exit (CTRL + X) and save (Y and Enter)

Directory Structure

Setup

mkdir -p /home/freebox/bsky/logs

Example

/home/bsky
├── dailyChara
│   └── characterName
│        └── data
│            └── 1.png
│            └── ...
│        └── data_to_send.csv
│
├── logs
│   └── dailyLogs_2024-09-10.log
│   └── dailyMailLogs_2024-09-10.log
│
├── myenv
│   └── bin
│   └── ...
│
├── dailyConfig.py
├── dailyGeneric.py
├── dailyLauncher.py
├── dailyMail.py
├── requirements.txt
└── README.md

About

This project is an automated bot for posting images to BlueSky using a Dockerized environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages