Skip to content

Commit 76d7637

Browse files
authored
Update README.md
1 parent e10a9a1 commit 76d7637

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

README.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Schedule](https://img.shields.io/badge/schedule-v1.2.1-blue)](https://schedule.readthedocs.io/en/stable/)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
99

10-
Automate your Twitter presence. Auto Post from from file, from a string, schedule a new tweet to be posted daily or post the tweet instantly.
10+
Automate your Twitter presence. Auto Post tweets from from openAI GPT4, from a file, from a string, schedule a new tweet to be posted daily or post the tweet instantly.
1111
</div>
1212

1313
---
@@ -17,15 +17,32 @@ Automate your Twitter presence. Auto Post from from file, from a string, schedul
1717
This Python-based Twitter Auto-Post Bot automates tweeting, Credit to the Tweepy library for making this easy, this project enables scheduled and random tweets, offering a dynamic and engaging Twitter experience.
1818

1919
### 📁 Files Overview
20+
#### Using OpenAI
21+
##### Instantly:
22+
- `src/instantly-tweet-from-openai.py`: Immediately tweets a tweet from openAI api response, currently using GPT4, but you can change the model in [functions.py](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/functions.py#L21)
2023

24+
- ###### Prompt defined [here](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/instantly-tweet-from-openai.py#L7)
25+
26+
##### Schedule to auto post, tweet daily at a time:
27+
- `src/schedule-daily-post-from-openai.py`: Automates daily tweets, Runs daily at a scheduled time and queries open ai api to create a tweet, the tweet returned is then automatically tweeted each day to fully automate twitter on auto pilot. By default the model is OPENAI GPT4 but you can change the model in [functions.py](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/functions.py#L21).
28+
- ###### Prompt defined [here](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/schedule-daily-post-from-openai.py#L12)
29+
- ###### Schedule time defined [here](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/schedule-daily-post-from-openai.py#L20)
30+
31+
#### From File
2132
- `src/schedule-daily-post-from-file.py`: Automates daily tweets, randomly selecting from `tweets.txt`. To change the schedule time [edit this](https://github.com/lewispour/Twitter-auto-Post-Bot---X.com---Tweepy-python-bot/blob/main/src/schedule-daily-post-from-file.py#L22).
22-
- `src/tweeter-from-code.py`: Immediately tweets a pre-defined message with the current date, but you can change this to whatever you like.
2333
- `src/tweeter-random-from-file.py`: Instantly posts a random tweet from `tweets.txt`.
24-
- `data/tweets.txt`: Add your tweets here, one per line. They will be randomly selected and tweeted.
34+
35+
###### Add your tweets to `data/tweets.txt`: one per line. They will be randomly selected and tweeted.
36+
37+
#### Manually tweeting using script
38+
`src/tweeter-from-code.py`: Immediately tweets a pre-defined message with the current date, but you can change this to whatever you like.
39+
40+
#### common files
41+
- `config/keys.py`: Holds both the creds for openai and twitter api.
42+
- `src/functions.py`: Shared functions for generating tweets from openai and tweet posting
2543
- `requirements.txt`: Lists all necessary Python packages.
2644

2745
### 📁 Upcoming Features
28-
- `Adding Feature to Auto fetch from openAI api and tweet based on a prompt`.
2946
- `Adding CLI`.
3047

3148
## 🚀 Getting Started
@@ -51,11 +68,12 @@ This Python-based Twitter Auto-Post Bot automates tweeting, Credit to the Tweepy
5168
1. Obtain Twitter API credentials [here](https://developer.twitter.com/apps).
5269
2. update `config/keys.py` file with your credentials:
5370
```python
54-
bearer_token = "your_bearer_token"
55-
api_key = "your_api_key"
56-
api_secret = "your_api_secret"
57-
access_token = "your_access_token"
58-
access_token_secret = "your_access_token_secret"
71+
bearer_token = "GET_KEY_FROM_developer.twitter.com/apps"
72+
api_key = "GET_KEY_FROM_developer.twitter.com/apps"
73+
api_secret = "GET_KEY_FROM_developer.twitter.com/apps"
74+
access_token = "GET_KEY_FROM_developer.twitter.com/apps"
75+
access_token_secret = "GET_KEY_FROM_developer.twitter.com/apps"
76+
openai_key = "GET_YOUR_OPENAI_API_KEY_FROM_https://platform.openai.com/api-keys"
5977
```
6078
3. Customize `data/tweets.txt` with your tweets.
6179

@@ -64,7 +82,8 @@ This Python-based Twitter Auto-Post Bot automates tweeting, Credit to the Tweepy
6482
Run any script using Python:
6583

6684
```bash
67-
python schedule-daily-post-from-file.py
85+
cd src/
86+
python instantly-tweet-from-openai.py
6887
```
6988

7089
## 🤝 Contributing

0 commit comments

Comments
 (0)