{"id":15984216,"url":"https://github.com/rsslove/rss-to-email","last_synced_at":"2025-08-24T08:04:47.324Z","repository":{"id":48918206,"uuid":"127336249","full_name":"rsslove/rss-to-email","owner":"rsslove","description":"Generate HTML emails from your RSS feeds.","archived":false,"fork":false,"pushed_at":"2021-07-07T23:18:04.000Z","size":11465,"stargazers_count":93,"open_issues_count":4,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T16:35:13.874Z","etag":null,"topics":["email-template","html","html-emails","mjml","nodejs","rss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsslove.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-29T19:10:08.000Z","updated_at":"2024-10-29T21:27:11.000Z","dependencies_parsed_at":"2022-09-13T19:31:09.531Z","dependency_job_id":null,"html_url":"https://github.com/rsslove/rss-to-email","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsslove%2Frss-to-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsslove%2Frss-to-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsslove%2Frss-to-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsslove%2Frss-to-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsslove","download_url":"https://codeload.github.com/rsslove/rss-to-email/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713398,"owners_count":20335567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["email-template","html","html-emails","mjml","nodejs","rss"],"created_at":"2024-10-08T02:05:07.833Z","updated_at":"2025-03-16T07:31:58.230Z","avatar_url":"https://github.com/rsslove.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rss-to-email\n\nGenerate HTML emails and [mjml](https://mjml.io/) templates from one or more RSS feeds.\n\n\u003e Note: This project is pre-version 1.0.0, so breaking changes may occur. Use at your own risk or lock down to a specific version using NPM.\n\n[![GitHub workflow](https://github.com/rsslove/rss-to-email/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/rsslove/rss-to-email/actions)\n[![codecov](https://codecov.io/gh/rsslove/rss-to-email/branch/master/graph/badge.svg?token=I2752VL3TQ)](https://codecov.io/gh/rsslove/rss-to-email)\n[![npm](https://img.shields.io/npm/v/rss-to-email.svg)](https://www.npmjs.com/package/rss-to-email)\n[![GitHub stars](https://img.shields.io/github/stars/portable-cto/rss-to-email.svg?style=social\u0026label=Stars)](https://github.com/portable-cto/rss-to-email)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n```\n                                _                                   _ _ \n             _ __ ___ ___      | |_ ___         ___ _ __ ___   __ _(_) |\n            | '__/ __/ __|_____| __/ _ \\ _____ / _ \\ '_ ` _ \\ / _` | | |\n            | |  \\__ \\__ \\_____| || (_) |_____|  __/ | | | | | (_| | | |\n            |_|  |___/___/      \\__\\___/       \\___|_| |_| |_|\\__,_|_|_|\n                                                                        \n\n ```\n\n[![rss-to-email example](http://g.recordit.co/KKSAZBRdsT.gif)](http://g.recordit.co/KKSAZBRdsT.gif)\n\n\n## Table of Contents\n\n- [Usage](#usage)\n  - [Node](#node)\n  - [Command Line](#command-line)\n  - [Browser](#browser)\n  - [Configuration](#configuration)\n  - [Templates](#templates)\n- [Contributing](#contributing)\n- [License](#license)\n\n\n## Usage\n\n### Node\n\nThe recommended way to use this package is as [an npm package](https://www.npmjs.com/package/rss-to-email). To install and save it to your project's dependencies, run:\n\n```\nnpm install rss-to-email --save\n```\n\nAfter installing, call the `RssToEmail` factory with [a config object](#configuration). Use the resulting `rssToEmail` object to get emails in `mjml` or `html` formats: \n\n```\nconst RssToEmail = require('rss-to-email');\nconst config = {\n  // See #Configuration section of the docs below\n};\nconst rssToEmail = RssToEmail(config);\n\nrssToEmail.getEmail('html').then((email) =\u003e {\n  console.log(email); // The HTML version of your email\n});\n\nrssToEmail.getEmail('mjml').then((email) =\u003e {\n console.log(email); // The MJML version of your email\n});\n```\n\n### Command Line\n\nYou can install this package globally and run it as a command line tool as well. First install it:\n\n```\nnpm install -g rss-to-email\n```\n\nThen run the tool:\n\n```\nrss-to-email \u003cconfig-file-path\u003e \u003coutput-folder-path\u003e\n```\n\nThe path should be relative to your current directory. For example, if your config file is at `./config.json` and you want to output the resulting files to a directory `./output`, you would run:\n\n```\nrss-to-email ./config.json ./output\n```\n\n### Configuration\n\nFor an example config file, see `config.example.json`.\n\n- `accentColor`: A hex or html-safe color code.\n- `filename`: The base name of the output files to generate (do not include extensions).\n- `header`: Configuration for the header section of the email:\n  - `banner`: (optional) An image url for the banner at the top of the email.\n  - `link`: A link for the header image or text.\n  - `title`: Shown if the banner is not set or as an `alt` tag on the image.\n- `intro`: The first line of the email. Can use HTML or plain text.\n- `feeds`: An array of RSS feeds you'd like to include. Only `url` is required:\n  - `url`: The url to the RSS feed.\n  - `title`: (optional) A custom feed title. Will use the RSS feed's embedded one by default.\n  - `description`: (optional) A short custom feed description. Will use the RSS feed's embedded one by default.\n  - `limit`: (optional) Truncate items greater than a given limit.\n  - `publishedSince`: (optional) Filter out posts published before this date.\n  - `parserOptions`: (optional) Custom RSS parser options outlined in the Node [rss-parser](https://www.npmjs.com/package/rss-parser#xml-options) documentation.\n- `outro`: The last line of the email. Can use HTML or plain text.\n- `templateUrl`: (optional) A handlebars/mjml template. For more details, see [Templates](#templates) section.\n\n### Templates\nIn order to compose custom emails, you can build your own [MJML templates](https://mjml.io/) with [Handlebars](). If you don't specify a template URL, the library defaults to [this file](https://raw.githubusercontent.com/portable-cto/rss-to-email/master/src/templates/default.mjml).\n\nMany of the config file's variables are exposed in the templates including:\n\n- `header`\n- `intro`\n- `outro`\n\nThe `feeds` variable contains an array of all of the feeds with an array of all of the items in each. For example, the following is a basic template that will loop through all the RSS feeds and items, displaying the title and content of each:\n\n```html\n{{#each feeds}}\n  \u003c!-- Feed --\u003e\n  \u003cmj-section\u003e\n    \u003cmj-column\u003e\n      \u003cmj-text\u003e{{this.title}}\u003c/mj-text\u003e\n      \u003cmj-text\u003e{{this.description}}\u003c/mj-text\u003e\n    \u003c/mj-column\u003e\n  \u003c/mj-section\u003e\n  {{#each items}}\n    \u003c!-- Item --\u003e\n    \u003cmj-section\u003e\n      \u003cmj-column\u003e\n        \u003cmj-text\u003e\n          \u003ca href=\"{{this.link}}\"\u003e{{this.title}}\u003c/a\u003e\n        \u003c/mj-text\u003e\n        \u003cmj-text\u003e{{{this.content}}}\u003c/mj-text\u003e\n      \u003c/mj-column\u003e\n    \u003c/mj-section\u003e\n  {{/each}}\n{{/each}}\n```\n\nYou can also use any helper in the [handlebars-helpers](https://github.com/helpers/handlebars-helpers) library:\n\n```html\n{{#is intro \"A certain intro\"}}\n  \u003cp\u003eA certain intro was used.\u003c/p\u003e\n{{/is}}\n```\n\n## Contributing\n\nAll patches, fixes, and ideas welcome! Please read [contributing.md](contributing.md) for furthers details.\n\n\n## License\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nCopyright 2021, Hughes Domains, LLC.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsslove%2Frss-to-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsslove%2Frss-to-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsslove%2Frss-to-email/lists"}