https://github.com/chiragsoni81245/codeforces-rss
Its a rss feed generator written in go, for codeforces questions of specific rating range and filtered with tags
https://github.com/chiragsoni81245/codeforces-rss
codeforces golang rss rss-feed
Last synced: 6 months ago
JSON representation
Its a rss feed generator written in go, for codeforces questions of specific rating range and filtered with tags
- Host: GitHub
- URL: https://github.com/chiragsoni81245/codeforces-rss
- Owner: chiragsoni81245
- Created: 2025-02-23T15:49:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-16T01:32:24.000Z (over 1 year ago)
- Last Synced: 2025-06-13T11:17:11.679Z (about 1 year ago)
- Topics: codeforces, golang, rss, rss-feed
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codeforces RSS Feed Generator
## Overview
`codeforces-rss` is a lightweight Go-based service that generates an RSS feed with random Codeforces problems based on specified **tags** and **difficulty ratings**. The feed can be consumed by any RSS reader, such as [FreshRSS](https://freshrss.org/), allowing you to receive daily problem recommendations for consistent practice.
## Features
✅ Fetches **random** Codeforces problems based on given tags and rating range.
✅ Exposes an **RSS feed endpoint** (`/rss`).
✅ Customizable **tags, minimum & maximum rating** via environment variables.
✅ Lightweight and **Docker-ready** for easy deployment.
## Installation
### 1️⃣ Clone the Repository
```sh
git clone https://github.com/yourusername/codeforces-rss.git
cd codeforces-rss
```
### 2️⃣ Install Dependencies
```sh
go mod tidy
```
### 3️⃣ Run Locally
```sh
export CF_TAGS="dp,graphs"
export CF_MIN_RATING="800"
export CF_MAX_RATING="1500"
go run cmd/rss-server/main.go
```
### 4️⃣ Test RSS Feed
```sh
curl http://localhost:8080/rss
```
## Configuration
The service uses **environment variables** for configuration:
| Environment Variable | Description | Default |
|----------------------|-------------|---------|
| `CF_TAGS` | Comma-separated list of Codeforces tags (e.g., `dp,greedy`) | `dp,graphs` |
| `CF_MIN_RATING` | Minimum problem rating | `800` |
| `CF_MAX_RATING` | Maximum problem rating | `1500` |
Alternatively, a fallback configuration file exists at `config/config.json`.
## Docker Deployment
### 1️⃣ Build Docker Image
```sh
docker build -t codeforces-rss .
```
### 2️⃣ Run the Container
```sh
docker run -d --name cf-rss \
-e CF_TAGS="dp,greedy" \
-e CF_MIN_RATING="900" \
-e CF_MAX_RATING="1600" \
-p 8080:8080 \
codeforces-rss
```
### 3️⃣ Test RSS Feed
```sh
curl http://localhost:8080/rss
```
## Docker Compose (Optional)
Create a `docker-compose.yml` file:
```yaml
version: '3.8'
services:
rss-server:
build: .
container_name: cf-rss
environment:
- CF_TAGS=dp,greedy
- CF_MIN_RATING=900
- CF_MAX_RATING=1600
ports:
- "8080:8080"
restart: unless-stopped
```
Run it with:
```sh
docker-compose up -d
```