Skip to content

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.

Notifications You must be signed in to change notification settings

LouisLSCHVN/caen-weather-daily

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

git clone [email protected]:LouisLoveCryptoo/caen-weather-daily.git

Install the required Node.js packages:

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

node index.js

Contributing

Feel free to fork this repository and submit pull requests with your own improvements.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published