{"id":50537221,"url":"https://github.com/abhin4v/feed-repeat","last_synced_at":"2026-06-13T07:01:47.318Z","repository":{"id":359148775,"uuid":"1105977374","full_name":"abhin4v/feed-repeat","owner":"abhin4v","description":"Repeat RSS/Atom feeds into new feeds","archived":false,"fork":false,"pushed_at":"2026-06-12T14:06:41.000Z","size":194,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T15:20:53.334Z","etag":null,"topics":["atom","cli","feeds","nixos-module","rss"],"latest_commit_sha":null,"homepage":"https://abhin4v.github.io/feed-repeat/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhin4v.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-28T12:41:27.000Z","updated_at":"2026-06-12T14:07:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/abhin4v/feed-repeat","commit_stats":null,"previous_names":["abhin4v/feed-repeat"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abhin4v/feed-repeat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhin4v%2Ffeed-repeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhin4v%2Ffeed-repeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhin4v%2Ffeed-repeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhin4v%2Ffeed-repeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhin4v","download_url":"https://codeload.github.com/abhin4v/feed-repeat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhin4v%2Ffeed-repeat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34275068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","cli","feeds","nixos-module","rss"],"created_at":"2026-06-03T17:30:37.076Z","updated_at":"2026-06-13T07:01:47.305Z","avatar_url":"https://github.com/abhin4v.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# feed-repeat\n\nA Haskell tool that repeats entries from RSS/Atom feeds into new feeds. It fetches entries from source feeds, and selects a random subset using weighted sampling where older entries have higher priority, and inserts them in output feeds. [This blog post](https://abhinavsarkar.net/notes/2026-feed-repeat/) describes the motivation behind it.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Prerequisites](#prerequisites)\n- [Building](#building)\n  - [Build with Cabal](#build-with-cabal)\n  - [Build with Nix](#build-with-nix)\n- [Usage](#usage)\n  - [NixOS Module](#using-as-a-nixos-module)\n  - [systemd Service](#using-as-a-systemd-service)\n  - [Docker](#using-as-a-docker-image)\n  - [Web Server](#serving-feeds-with-a-web-server)\n  - [GitHub Pages](#hosting-on-github-pages)\n- [CLI Usage](#cli-usage)\n- [Configuration](#configuration)\n- [License](#license)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n\n## Features\n\n- Processes multiple source feeds with individual configurations.\n- Uses exponential weighting to prioritize older entries.\n- Caches fetched feeds to handle source feed unavailability.\n- Filters entries by minimum age to avoid repeating recent content.\n- Supports RSS, Atom and RDF feed formats.\n\n## Installation\n\n`feed-repeat` is available as statically-linked binaries for AArch64 and AMD64 architectures in the releases. It is also available as a [Docker image](https://github.com/abhin4v/feed-repeat/pkgs/container/feed-repeat) in the GitHub Container Repo.\n\n## Prerequisites\n\nThis project is written in [Haskell](https://www.haskell.org/). You don't need Haskell experience to use this tool, but you'll need the Haskell compiler and build tools installed to build it.\n\nThe easiest way to install Haskell is via [GHCup](https://www.haskell.org/ghcup/). Run GHCup to install GHC (9.10+) and Cabal. Alternatively, check your system's package manager for pre-built packages.\n\n[Nix](https://nixos.org) is optional. It is required for `nix` builds and NixOS module support.\n\n## Building\n\nFirst, clone the repository and navigate into it:\n\n```bash\ngit clone https://github.com/abhin4v/feed-repeat.git\ncd feed-repeat\n```\n\n### Build with Cabal\n\n```bash\ncabal build\n```\n\n### Build with Nix\n\nEnter the Nix shell:\n\n```bash\nnix-shell\n```\n\nRun the scripts available in Nix shell:\n\n```bash\n# Build the project\nbuild\n\n# Build a static binary\nbuild-static x86_64\n# or build-static aarch64\n\n# Run the tool with example config\nrun\n```\n\n## Usage\n\nThis project can be used as a Nix module, a Systemd service, a Docker container, or hosted on GitHub Pages.\n\n### Using as a NixOS Module\n\nThe project includes a NixOS module (`nix/module.nix`) for easy integration into NixOS systems. Import it in your configuration:\n\n```nix\n{\n  imports = [ ./feed-repeat/nix/module.nix ];\n\n  services.feed-repeat = {\n    enable = true;\n    \n    # Feed configurations\n    config = [\n      {\n        sourceFeedUrl = \"https://example.com/feed.atom\";\n        outputFilename = \"example-feed\";\n        saveSourceFeedEntries = true;\n        repeatedEntryCount = 3;\n        minimumEntryAgeDays = 7;\n        maxEntryCountPerDomain = 1;\n        selectionAlpha = 0.9;\n      }\n    ];\n    \n    # Output and cache directories\n    outputDir = \"/var/lib/feed-repeat\";\n    cacheDir = \"/var/cache/feed-repeat\";\n    \n    # Run frequency\n    timerOnCalendar = \"daily\";\n    \n    # Optional: serve feeds via Nginx\n    enableNginx = true;\n    virtualHost = \"feeds.example.com\";\n    virtualHostPath = \"/\";\n    enableSSL = true;\n  };\n}\n```\n\nThe module automatically:\n\n- Creates a systemd service with configurable timer.\n- Sets up user/group with appropriate permissions.\n- Generates the configuration file from your NixOS settings.\n- Optionally configures Nginx to serve the output feeds.\n\n### Using as a systemd Service\n\nFor non-NixOS systems, a systemd service file (`configs/feed-repeat.service`) is provided. To set it up:\n\n1. Create user and group:\n\n    ```bash\n    sudo useradd -r -s /bin/false feed-repeat\n    ```\n\n2. Create required directories:\n\n    ```bash\n    sudo mkdir -p /var/lib/feed-repeat /var/cache/feed-repeat /etc/feed-repeat\n    sudo chown feed-repeat:feed-repeat /var/lib/feed-repeat /var/cache/feed-repeat\n    sudo chmod 750 /var/lib/feed-repeat /var/cache/feed-repeat\n    ```\n\n3. Add web server user to feed-repeat group:\n\n    ```bash\n    sudo usermod -a -G feed-repeat www-data\n    ```\n    This allows the web server (running as www-data) to read the output feeds from `/var/lib/feed-repeat`. Change the user as appropriate.\n\n4. Install the service file:\n\n    ```bash\n    sudo cp configs/feed-repeat.service /etc/systemd/system/\n    ```\n\n5. Place your configuration:\n\n    ```bash\n    sudo cp config.yaml /etc/feed-repeat/config.yaml\n    sudo chown feed-repeat:feed-repeat /etc/feed-repeat/config.yaml\n    sudo chmod 640 /etc/feed-repeat/config.yaml\n    ```\n\n6. Build and install the binary:\n\n    ```bash\n    cabal install --installdir=/tmp --install-method=copy --overwrite-policy=always\n    sudo install -D -m 0755 /tmp/feed-repeat /usr/local/bin/feed-repeat\n    ```\n    Or use the binaries available for download.\n\n7. Install the timer unit:\n\n    ```bash\n    sudo cp configs/feed-repeat.timer /etc/systemd/system/\n    ```\n\n8. Enable and start the service:\n\n    ```bash\n   sudo systemctl daemon-reload\n   sudo systemctl enable --now feed-repeat.timer\n   ```\n\n### Using as a Docker Image\n\nA Docker image can be built with Nix:\n\n```bash\n# Enter nix-shell, then build the Docker image\nbuild-docker x86_64\n# or build-docker aarch64\n\n# Load into Docker daemon\ndocker load \u003c result\n\n# Alternatively, you can pull the pre-built image from GHCR\ndocker pull ghcr.io/abhin4v/feed-repeat:latest\n\n# Run the container\ndocker run --rm \\\n  -v /path/to/config.yaml:/etc/feed-repeat/config.yaml:ro \\\n  -v feed-repeat-output:/var/lib/feed-repeat \\\n  -v feed-repeat-cache:/var/cache/feed-repeat \\\n  feed-repeat:latest\n```\n\nThe container runs as a non-root user (UID/GID `1000:1000`). If you bind-mount\nhost directories instead of using named volumes, ensure they are writable by\nthat UID, for example:\n\n```bash\nsudo chown -R 1000:1000 /path/to/output /path/to/cache\n```\n\nNamed Docker volumes (as used in the examples above) are handled\nautomatically by the Docker runtime.\n\n#### Scheduling Runs\n\nSince the container runs once and exits, you need to schedule it externally:\n\n- Use the host's cron or systemd timer to run the container periodically:\n\n    ```bash\n    # Via cron: add to crontab (runs daily at 2 AM)\n    0 2 * * * docker run -v /path/to/config.yaml:/etc/feed-repeat/config.yaml:ro -v feed-repeat-output:/var/lib/feed-repeat -v feed-repeat-cache:/var/cache/feed-repeat feed-repeat:latest\n    ```\n\n- Docker Compose with Ofelia: Use Docker Compose with the Ofelia scheduler to run the container on a schedule:\n\n    ```yaml\n    services:\n      feed-repeat:\n        image: feed-repeat:latest\n        volumes:\n          - /path/to/config.yaml:/etc/feed-repeat/config.yaml:ro\n          - feed-repeat-output:/var/lib/feed-repeat\n          - feed-repeat-cache:/var/cache/feed-repeat\n        labels:\n          ofelia: \"enabled\"\n          ofelia.enabled: \"true\"\n          ofelia.my-task.schedule: \"@daily\"\n          ofelia.my-task.command: \"/bin/feed-repeat --config /etc/feed-repeat/config.yaml --output-dir /var/lib/feed-repeat --cache-dir /var/cache/feed-repeat\"\n    \n      ofelia:\n        image: mcuadros/ofelia:latest\n        volumes:\n          - /var/run/docker.sock:/var/run/docker.sock\n        command: daemon --docker\n    \n    volumes:\n      feed-repeat-output:\n      feed-repeat-cache:\n    ```\n    \n    Run with: `docker-compose up -d`.\n\n- Kubernetes: If deployed on Kubernetes, use native `CronJob` resources for scheduling.\n- Docker Swarm: Use native scheduled task features if using Docker Swarm.\n\n### Serving Feeds with a Web Server\n\nTo serve the output feeds publicly, you can use any web server. Basic example configurations are provided for Nginx, Apache, and Caddy in the `configs` directory.\n\n### Hosting on GitHub Pages\n\nYou can run and host `feed-repeat` on GitHub Actions and Pages: fork this repo, edit `config.yaml`, and let GitHub Actions publish your repeated feeds to GitHub Pages. See the full [Hosting on GitHub Pages guide](https://abhin4v.github.io/feed-repeat/hosting-on-github-pages.html) for the step-by-step setup.\n\n## CLI Usage\n\n```bash\nfeed-repeat --config config.yaml --output-dir ./output --cache-dir ./cache\n```\n\n### Options\n\n- `--config FILE`: Path to YAML configuration file containing feed sources (required).\n- `--output-dir DIR`: Directory where output Atom files will be written (required).\n- `--cache-dir DIR`: Directory where cached Atom files will be stored (default: current directory).\n- `--user-agent STRING`: User-Agent header to send in HTTP requests (default: 'feed-repeat/\u003cversion\u003e').\n- `--validate`: Only validate the config file and exit.\n- `--verbose`: Enable all logging.\n- `--quiet`: Enable only warning and error logging.\n- `--version`: Show version information.\n\n## Configuration\n\nCreate a YAML file with a list of feed tasks:\n\n```yaml\n- sourceFeedUrl: \"https://example.com/feed.atom\"\n  outputFilename: \"unique-id-1\"\n  saveSourceFeedEntries: true\n  repeatedEntryCount: 3\n  minimumEntryAgeDays: 7\n  maxEntryCountPerDomain: 1\n  selectionAlpha: 0.9\n  passthroughNewEntries: true\n\n- sourceFeedUrl: \"https://another-site.com/rss.xml\"\n  outputFilename: \"unique-id-2\"\n  saveSourceFeedEntries: false\n  repeatedEntryCount: 1\n  minimumEntryAgeDays: 14\n```\n\nSee `config.yaml` for all available parameters and their meanings.\n\n## License\n\nMIT\n\n## Changelog\n\nSee [CHANGELOG](CHANGELOG.md).\n\n## Contributing\n\nI consider this is a done software. Maybe some day when [JSONFeed](https://www.jsonfeed.org/) gets popular, I'd consider adding support for it. Other than that, I don't foresee adding any new features. I'll keep doing bugfixes, security fixes and dependency upgrades.\n\nPlease feel free to create an issue if you find a bug. I'm not inclined to accept pull requests unless there is a very compelling reason.\n\nDisclaimer: This is a personal project. The views, code, and opinions expressed here are my own and do not represent those of my current or past employers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhin4v%2Ffeed-repeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhin4v%2Ffeed-repeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhin4v%2Ffeed-repeat/lists"}