Medieval Times, a TypeScript-powered medieval crier. This project serves as a medieval-inspired news crier, leveraging AI to announce daily news headlines in a unique and entertaining format.
Medieval Times combines the following:
- An RSS news feed parser to fetch the latest headlines.
- OpenAI GPT-powered text generation to rewrite headlines as a medieval town crier would.
- Integration with BlueSky for posting these rewritten headlines.
The project aims to deliver daily news updates with a touch of medieval flair, making current events more engaging and whimsical.
- Language: TypeScript
- Key Libraries and APIs:
@atproto/api
for BlueSky integration.dotenv
for environment variable management.rss-to-json
for RSS feed parsing.openai
for GPT-based text generation.
- News Fetching: Fetches the latest news headlines from Google News RSS feeds.
- AI-Powered Rewriting: Transforms headlines into medieval-style announcements using GPT.
- BlueSky Posting: Posts these announcements to a BlueSky account.
- Customizable Prompts: Allows modifications to the style and tone of the AI-generated text.
- Daily Automation: Schedules daily updates using a cron job.
To set up this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/seth-wood/medieval-times.git cd medieval-times
-
Install dependencies:
npm install
-
Set up environment variables:
Create a.env
file in the root directory with the following keys:BLUESKY_USERNAME=your_bluesky_username BLUESKY_PASSWORD=your_bluesky_password OPENAI_KEY=your_openai_api_key
-
Run the project:
deno run --allow-net --allow-env main.ts
-
Fetch and Announce News:
The main script fetches news headlines, rewrites them in a medieval style, and posts them to BlueSky. Simply run:deno run --allow-net --allow-env main.ts
-
Schedule Daily Updates:
The project includes a cron job that automates the process daily:Deno.cron("everymorning", "30 12 * * *", main);
-
Testing:
Run tests using Deno:deno test
Contributions are welcome! 🎉
To contribute:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature-name
-
Commit your changes:
git commit -m "Add some feature"
-
Push your branch:
git push origin feature-name
-
Open a pull request.
This project is currently unlicensed. For any inquiries about usage or redistribution, please contact the repository owner.