How it works? Simple! Every day at 11 am (or at time of your choosing) letter runs on
the server via cron and fetches all your precious RSS feeds to check whether
there is anything new from yesterday. After some mapping and rendering newsletter digest is created
and sent via e-mail. All in a catsy manner. And right into your inbox.
Notice: Letter assumes your personal feeds.opml or feeds.txt in /rss folder. You can create either one manually or in case of OPML format you can also export it from preferred service (like Feedly or whatever). OPML is de-facto standard for importing and exporting RSS feeds in such services so it should be relatively easy.
You can receive your daily readings with Letter automatically by using this Letter Template. Just set up required environment variables and you're good to go. You can also adjust newsletter look to your liking.
-
Clone repository to desired location
git clone https://github.com/radekkozak/letter.git
-
Install
npm ci
-
Rename
.env.exampleto.envand add your own configuration there. -
Run one time
npm run letter
-
OR run periodically : as described, letter is meant to be run at specific schedule. This can easily be achieved via
crondirective. Cron tab needs to be created separately. For example, below settings would run letter every day at 11 o'clock server time (assumingnpmis correctly in your PATH)0 11 * * * cd /fullpath/to/your/letter/folder && npm run letter
Letter uses Handlebars with html extension as default templating engine. Email is generated from letter template inside emails directory. You can make it your own as you please. Templating
assumes the structure of html, subject and text html files. Here's how letter template looks by default:
Sometimes certain services like i.e Feedly, export OPML feeds in a nested manner. Letter supports both flat
and categorized notations. Even in the same file. Please see feeds.opml.example . Don't forget to set LETTER_FEEDS to opml if you choose this format, so Letter knows what file you want it to pick.
If you use Gmail for sending out the newsletter and your account has Two-Factor Authentication (2FA) enabled you
need to generate app-specific password which then can be used in place of your regular SMTP_PASSWORD variable in .env file.
Meow-what ? Cats don't need no stinking licenses. Just be good and state the source of the original cat [wink].
I have tried hard to find original authors of cat gif and cat avatar used in the template and header. Long time ago i found those chucklesome pics sitting in my old computer folder one day and they sparked me to make this simple why-not weekend project. Funny enough i found myself using it for this day (What can i say - i just love my RSS readings delivered as email - i'm weird that way) Aaanywho - if you are the original author of any of these lovely cats, please let me know so i could give credit where credit is due.
