GithubHelp home page GithubHelp logo

firefart / rss_fetcher Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 2.0 259 KB

golang program to send RSS feeds per E-Mail

License: MIT License

Makefile 7.26% Shell 2.44% Go 87.98% Dockerfile 2.32%
rss-fetcher feed rss rss-feed-scraper go golang rss-aggregator

rss_fetcher's Introduction

RSS Fetcher

This little GO program is intended to fetch all configured RSS or ATOM feeds every hour (configurable) and send new entries per E-Mail.

This project is mainly written because IFTT can not handle crt.sh feeds :/

Expected errors during execution are also sent via E-Mail to the E-Mail address configured in config.json.

For sending mails you should setup a local SMTP server like postfix to handle resubmission, signing and so on for you. SMTP authentication is currently not implemented.

The program keeps the last date of the last entry per feed in it's database to compare it to on the next fetch. We can't just use the current date because crt.sh is caching it's feeds and they do not appear at the time written in the feed.

Installation on a systemd based system

  • Build binary or download it
make

or

go get
go build

or

make_linux.bat
make_windows.bat
  • Add a user to run the binary
adduser --system rss
  • Copy everything to home dir
cp -R checkout_dir /home/rss/
  • Modify run time (if you want to run it at other intervalls)
vim /home/rss/rss_fetcher.timer
  • Edit the config
cp /home/rss/config.json.sample /home/rss/config.json
vim /home/rss/config.json
  • Install the service and timer files
./install_service.sh
  • Watch the logs
journalctl -u rss_fetcher.service -f

Config Sample

{
  "timeout": 10,
  "mailserver": "localhost",
  "mailport": 25,
  "mailfrom": "RSS <[email protected]>",
  "mailto": "People <[email protected]>",
  "mailonerror": true,
  "mailtoerror": "[email protected]",
  "database": "rss.db",
  "globalignorewords": ["ignore1", "ignore2"],
  "feeds": [
    {
      "title": "Certificates *.aaa.com",
      "url": "https://crt.sh/atom?q=%25.aaa.com",
      "ignorewords": ["[Precertificate]", "ignore2"]
    },
    {
      "title": "Certificates *.bbb.com",
      "url": "https://crt.sh/atom?q=%25.bbb.com"
    }
  ]
}

rss_fetcher's People

Contributors

dependabot[bot] avatar firefart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.