This project automates the process of collecting news from an RSS feed, extracting their content, storing the data in a local SQLite database, and generating summaries using OpenAI's API. The summaries are then used to populate a JSON character file for Eliza.
Before running the scripts, ensure you have the following:
- Node.js installed on your system.
- An OpenAI API key.
- An RSS feed URL (e.g., from Google Alerts).
- Clone the repository:
git clone <repository-url> cd <repository-folder>
- Install dependencies::
npm install
- Setup .env::
edit .env
cp env.example .env
RSS_FEED=your_google_alerts_rss_feed_url OPENAI_API_KEY=your_openai_api_key`
-
Run
spider.js
to:- Fetch news from the feed
- Extract text content
- Populate the local SQLite database
node spider.js
-
Run
teacher.js
to:- Generate content summaries using OpenAI
- Update Eliza's character JSON file
node teacher.js my_character.json