Giter VIP home page Giter VIP logo

rss-feed-combiner's Introduction

RSS Feed Updater

Summary

  • Daily (via Github actions) pull blog titles, links, and descriptions from a speciifed list of blogs with RSS feeds
  • Daily (via Github actions and Sendgrid) send an email with these blog links for easy reading

Motivation

I enjoy reading engineerng tech blogs from companies like Netflix and Facebook and from individuals like Josh W Comeau. However, I usually only see the articles when they are linked on other sites like HackerNews. The goal of this project was to automatically monitor those site's blogs (via their RSS feeds) and then email myself periodically whenever there are new blogs to read.

Approach

  • Read a text file that I can push changes to so the script knows what blogs to check the RSS feeds for
  • Use a node-fetch and a RSS parser to read the RSS feeds of the blogs
  • Use Github actions to run the script periodically with a cron
  • Write the results of every run to a JSON file and commit with Github actions so we don't need to use a database
  • Use SendGrid API to send emails to myself with links to the new blog posts from each blog

Final Email Result Preview

This is what the email that is send to my inbox periodically (i.e. weekly) looks like: Final Email Example

Miscellaneous

Technology

  • Language: TypeScript
  • Framework: Node.js
  • Libraries: rss-parser, node-fetch, dotenv

Local Instructions

  • Build with: npm run build

  • Run with: npm run start

Environmental Variables:

Three Environmental variables are used and saved as Github workspace env variables to get the script to run properly:

  • SENDGRID_API_KEY (use Sendgrid to get your account to work)
  • SEND_EMAIL (a flag 0 or 1. Should be 1 if you want emails to actually be send. Used so I don't always send emails when testing.)
  • WRITE_TO_FILES (a flag 0 or 1. Should be 1 if you want files to actually be written out. Used so I don't always write new files when testing.)

rss-feed-combiner's People

Contributors

actions-user avatar macolby14 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wanghaisheng

rss-feed-combiner's Issues

Only Show New Articles in Email sent out

Motivation

I would like the periodic email to only show me if there is a new email. If there are no new articles posted, I do not want any email at all.

Approach

We can already write out to an output file with outputFeed.json. We can read the last outputFeed.json and compare it to the information we would use to write the current run. We then only write out the informaton that is different between the output feeds.

Tasks

  • Read the previous outputFeed.json
  • Compare the information fetched from the rss feeds (that will be used for next outputFeed.json) and compare the two
  • Use the comparison results to write the email
  • If no new articles, do not send an email

Make email not from gmail

TODO

  • investigate Sendgrid API to see if we can send emails from markcolby.dev
  • implement with new email address if possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.