Giter Club home page Giter Club logo

news's Introduction

License: Unlicense Go Report Card

📰 News

News is a minimalist RSS/Atom aggregator that saves to HTML files.

📂news
  ├📰 index.html
  ├📰 page2.html
  └📰 page3.html

That's it! No database, no configuration files, no HTTP server, no ads, no tracking and no JavaScript. Everything is stored in the HTML files which look like this:

screenshot

Usage

Running news creates 📂news directory containing a sample 📰index.html file which you should edit with your own RSS/Atom feed sources.

Every 10 minutes it fetches news from your feeds and saves what's fresh to 📰index.html.

When 📰index.html grows large (1000 items by default), the oldest 500 items are moved to 📰page2.html.

📂news can reside in Google Drive or Dropbox for easy access everywhere.

This is how I use it:

news -wait 30 -dir "D:/gdrive/news"

Command-line arguments

news -h prints:

  -dir string
        directory to store html files. By default ./news is used and created if necessary
  -items int
        number of items per page.html file. A new page.html file is created whenever index.html contains 2x that number (default 500)
  -noflood duration
        minium seconds between calls to same domain to avoid flooding (default 30s)
  -opml string
        path to OPML file containing feed URLS to be imported. Existing feed URLs are overwritten, not duplicated
  -template news/feed/template.go
        custom Go html/template file to use when generating .html files. See news/feed/template.go
  -timeout duration
        timeout in seconds when fetching feeds (default 10s)
  -verbose
        verbose mode outputs extra info when enabled
  -wait duration
        minutes to wait between updates (default 10m0s)

Running from code

go get -uv github.com/ww9/news

cd $GOROOT/src/github.com/ww9/news

go get ./... to fetch dependencies

go run main.go

Installing from code

go install -i github.com/ww9/news

If you have Go's /bin directory in $PATH env variable, you should be able to run news from anywhere.

Downloading binaries

Windows, Linux and OSX binaries are available in Releases.

Todo

  • More tests
  • Go modules
  • Vendor
  • Dockerfile

License

The Unlicense, Public Domain. As free as it gets.

news's People

Contributors

ww9 avatar gabx avatar

Stargazers

 avatar

Watchers

James Cloos 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.