A serverless RSS feed for papers published on Hugging Face's papers page. This service scrapes the papers page daily and generates an RSS feed that can be consumed by any RSS reader.
Inspired by James (@capjamesg)'s Hugging Face Papers RSS Feed.
- Serverless deployment on Vercel
- Redis caching to minimize scraping
- Daily automatic updates via cron job
- Clean RSS feed with paper titles, links and abstracts
- Health check and status endpoints
- CORS enabled for cross-origin requests
-
Fork this repository
-
Create a new project on Vercel and import your forked repository
-
Set up the following environment variables in your Vercel project settings:
KV_URL=your_redis_url
KV_REST_API_TOKEN=your_redis_write_token
KV_REST_API_READ_ONLY_TOKEN=your_redis_read_token
KV_REST_API_URL=your_redis_rest_api_url
- Deploy! Vercel will automatically build and deploy your RSS feed service
The feed will be available at: https://your-project.vercel.app/api/feed
- Clone the repository:
git clone https://github.com/yourusername/daily-papers.git
cd daily-papers
- Create a
.env
file in the root directory with your Redis credentials:
KV_URL=your_redis_url
KV_REST_API_TOKEN=your_redis_write_token
KV_REST_API_READ_ONLY_TOKEN=your_redis_read_token
KV_REST_API_URL=your_redis_rest_api_url
- Run the development server:
vercel dev
The local server will be available at http://localhost:3000
/api
- Health check and status/api/feed
- RSS feed of papers/api/update-cache
- Manually trigger feed update (requires authentication)
To enable secure manual cache updates, you need to set an UPDATE_KEY
environment variable:
- Add to your Vercel environment variables:
UPDATE_KEY=your_secret_key_here # Use a secure random string
- To manually trigger a cache update, use the following curl command:
curl -X GET \
https://your-project.vercel.app/api/update-cache \
-H 'X-Update-Key: your_secret_key_here'
Successful response:
{
"status": "Cache updated successfully",
"timestamp": "2024-03-20T15:30:45Z"
}
Health check (/api
):
{
"status": "ok",
"endpoints": ["/api/feed"],
"cache_status": true,
"timestamp": "2024-03-20T15:30:45Z",
"version": "1.0.0"
}
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
- Thanks to James (@capjamesg) for the original inspiration
- Hugging Face for their amazing papers platform