workers-hnrss is a project deployed on Cloudflare Workers that translates Hacker News RSS feeds into the target language using Microsoft Azure Translation API.
-
Clone the repository:
git clone https://github.com/zhu327/workers-hnrss.git
-
Modify the
wrangler.toml
file to include the required environment variables for configuring the Microsoft Azure Translation API:[vars] TRANSLATE_API_KEY = "your-azure-translate-api-key" TRANSLATE_API_REGION = "your-azure-region" TRANSLATE_LANGUAGE = "your-target-language"
Replace
your-azure-translate-api-key
with your Azure Translation API key,your-azure-region
with the Azure region you're using, andyour-target-language
with the target language you want to translate to.
Before deploying the project, make sure to follow the Cloudflare Workers Python documentation for installation and deployment instructions.
npx wrangler@latest deploy
To use the project, replace the Hacker News RSS feed URL on hnrss.github.io with the URL of your deployed Cloudflare Workers project. For example, if your project is deployed at https://hn.you-account.workers.dev
, replace https://hnrss.org/newest
with https://hn.you-account.workers.dev/newest
.
This project is licensed under the MIT License. See the LICENSE file for details.