https://github.com/lschvn/caen-weather-daily
This Twitter bot provides daily weather updates at 6 AM using the OpenWeatherMap API, paired with a unique text generated by ChatGPT. It's designed to keep followers informed with the latest weather information in an engaging way.
https://github.com/lschvn/caen-weather-daily
Last synced: 10 days ago
JSON representation
This Twitter bot provides daily weather updates at 6 AM using the OpenWeatherMap API, paired with a unique text generated by ChatGPT. It's designed to keep followers informed with the latest weather information in an engaging way.
- Host: GitHub
- URL: https://github.com/lschvn/caen-weather-daily
- Owner: lschvn
- Created: 2023-11-21T13:43:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-21T14:06:33.000Z (over 1 year ago)
- Last Synced: 2025-02-17T15:14:31.923Z (3 months ago)
- Language: JavaScript
- Size: 2.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Caen Weather Daily
This Twitter bot provides daily weather updates at 6 AM using the OpenWeatherMap API, paired with a unique text generated by ChatGPT. It's designed to keep followers informed with the latest weather information in an engaging way.
### Features
- Daily Weather Updates: Automatically fetches and posts weather updates every day at 6 AM.
- Enhanced with ChatGPT: Each update includes a custom message generated by ChatGPT, adding a personal touch to the weather forecasts.
- Automated with Cron: Uses Cron jobs for scheduling daily posts.
- Twitter API v2 Integration: Posts updates directly to Twitter using the latest version of the Twitter API.
### Prerequisites
Before you begin, ensure you have the following:
- Node.js installed on your system.
- A Twitter Developer account and access to Twitter API v2.
- An FreeAPI key from OpenWeatherMap.
## Installation
Clone the repository
```bash
git clone [email protected]:LouisLoveCryptoo/caen-weather-daily.git
```
Install the required Node.js packages:
```bash
npm install fs path cron openai twitter-api-v2
```## Configuration
Create a .env file in the root directory and fill in your credentials:
```
WEATHER_API=
OPENAI_API_KEY=ACCESS_TOKEN=
ACCESS_TOKEN_SECRET=
X_API_KEY=
X_API_KEY_SECRET=```
### Starting the Bot
```bash
node index.js
```
### Contributing
Feel free to fork this repository and submit pull requests with your own improvements.