Giter Site home page Giter Site logo

gorss's Introduction

GORSS - Go RSS Reader

Go Report Card MIT License

About

Simple RSS/Atom reader written in Golang. Highly configurable and with themes.

Overview

Screenshots

Usage

Tarballs with prebuilt binaries for both Linux and OSX can be found under release page.

Just start by running either gorss_linux or gorss_osx binary from the tarballs.

You can also specify theme, configuration and database manually.

./gorss -config gorss.conf -theme default.theme -db mydb.db

If either the configuration or theme files are not specified, gorss will attempt to use$XDG_CONFIG_HOME/gorss/gorss.conf and $XDG_CONFIG_HOME/gorss/themes/default.theme, respectively. These files will be created from the defaults if not present.

To build and run use the makefile.

make run

In order to cross-compile make release for Linux on OSX you need to install the following:

brew install FiloSottile/musl-cross/musl-cross

The database gorss.db will be automatically created in your systems 'Data Home' directory. You can specify which database to use with the argument -db to the binary.

Features

  • OPML Support for loading feed URLs (opmlFile in gorss.conf)
  • Support for XDG configuration
  • RSS and Atom support (via github.com/mmcdole/gofeed)
  • Highlights for configurable words
  • Keyboard shortcuts highly configurable
  • Custom keys for custom execution of external applications
  • Open links in browser
  • Mark articles and open all marked in bulk in webbrowser
  • Theme support
  • Preview content of the RSS
  • Backed by SQLite database
  • Mark articles as read
  • Mark all as read/unread
  • Undo last read (mark it as unread)
  • Search titles
  • System notifications

Configuration Example (Default config)

It's possible to specify configuration file as a flag, default is gorss.conf.

The configuration file can specify URLs of feeds as strings, or, if you want to customise the name of the feed as it is shown in your Gorss, as objects with url and name fields. (See the example below for supported options).

./gorss -config my.conf
{
    "highlights": [
        "emulation",
        "truck",
        "google",
        "network",
        "math",
        "toyota"
    ],
    "OPMLFile": "../example_ompl.xml",
    "feeds": [
        "https://news.ycombinator.com/rss",
        {"url": "https://www.sweclockers.com/feeds/nyheter", "name": "Swedish Overclocking"},
        {"url": "https://www.reddit.com/r/homeassistant/.rss", "name": "Home Assistant"},
        {"url": "https://www.reddit.com/r/golang/.rss"},
        {"url": "https://www.reddit.com/r/programming/.rss"}
    ],
    "feedWindowSizeRatio": 2,
    "articlePreviewWindowSizeRatio": 5,
    "articleWindowSizeRatio": 2,
    "previewWindowSizeRatio": 1,
    "daysToKeepDeletedArticlesInDB": 1,
    "daysToKeepReadArticlesInDB": 1,
    "skipArticlesOlderThanDays": 10,
    "secondsBetweenUpdates": 300,
    "skipPreviewInTab": true,
    "keyOpenLink": "Backspace2",
    "keyMarkLink": "Enter",
    "keyOpenMarked": "o",
    "keyDeleteArticle": "d",
    "keyMoveDown": "s",
    "keyMoveUp": "w",
    "keySortByDate": "r",
    "keySortByUnread": "e",
    "keySortByTitle": "t",
    "keySortByFeed": "y",
    "keyUpdateFeeds": "Ctrl+U",
    "keyMarkAllRead": "Ctrl+R",
    "keyMarkAllUnread": "Ctrl+T",
    "keyMarkAllReadFeed": "Ctrl+F",
    "keyMarkAllUnreadFeed": "Ctrl+G",
    "keyTogglePreview": "q",
    "keySelectFeedWindow": "1",
    "keySelectArticleWindow": "2",
    "keySelectPreviewWindow": "3",
    "keyToggleHelp": "h",
    "keySwitchWindows": "Tab",
    "keyQuit": "Esc",
    "keyUndoLastRead": "u",
    "keySearchPromt": "/",
    "notifications": true,
    "customCommands": [
        {
            "key": "j",
            "Cmd": "echo 'ARTICLE.Content' 'ARTICLE.Link' > /tmp/test2.txt"
        },
        {
            "key": "k",
            "Cmd": "echo 'ARTICLE.Title' 'ARTICLE.Feed' > /tmp/test.txt"
        }
    ]
}

Custom Commands

Custom commands can be added such as the example in the example configuration above.

The variables given will be substituted with the content of the given article. There are no escaping going on so be careful!

Available variables are:

  • ARTICLE.Content - The content of the article
  • ARTICLE.Link - The link to the article
  • ARTICLE.Feed - Name of the feed
  • ARTICLE.Title - Title of the article

Themes

Themes are highly configurable and 3 example themes are included. You can start gorss with a specific theme as argument.

./gorss -theme my.theme

Themes are configured with JSON, default example below:

{
    "feedNames": [
        "#8ed2c8",
        "#46aa9f",
        "#2e6294",
        "#3b9293"
    ],
    "date": "#a25478",
    "time": "#f96bad",
    "articleBorder": "#4b7d81",
    "previewBorder": "#4b7d81",
    "feedBorder": "#4b7d81",
    "feedBorderTitle": "#fcedd5",
    "articleBorderTitle": "#fcedd5",
    "previewBorderTitle": "#fcedd5",
    "highlights": "#c90036",
    "tableHead": "#b2b37d",
    "title": "#fcedd5",
    "unreadFeedName": "#FFFFFF",
    "totalColumn": "#FFFFFF",
    "unreadColumn": "#FFFFFF",
    "previewText": "#FFFFFF",
    "previewLink": "#39537e",
    "statusBackground": "#4b7d81",
    "statusText": "#fcedd5",
    "statusKey": "#f6d270",
    "statusBrackets": "#bfceab",
    "feedIcon": "๐Ÿ”–",
    "articleIcon": "๐Ÿ—ž",
    "previewIcon": "๐Ÿ“ฐ",
    "linkMarker": "๐ŸŒ",
    "unreadMarker": "๐ŸŒŸ"
}

[Screenshots]

default theme irssi theme night theme

License

This is distributed under the MIT License.

gorss's People

Contributors

aearil avatar chux0519 avatar dherbst avatar lallassu avatar prologic avatar rene00 avatar sboysel avatar shanehowearth avatar tormath1 avatar travonted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gorss's Issues

make all shouldn't depend on the `clean` target

Right now, when you call make, the build environment spends a few minutes chugging along, compiling everything, and in the end you're left back where you started because all the build artefacts were removed by the clean target.

Usually, one expects that calling make will at least result in a usable binary, something like make build in your makefile.

In the Makefile, I would replace all: build release clean by all: build.

[feature request] Custom titles for RSS feeds

This looks like an underrated feature ๐Ÿ™‚

It would be nice to have custom titles in the config overriding what's originally in the feed. Mostly for reasons to keep multiple resources consistent and clean for view.

add support for LSB ~/.config

Hello I love the app, I wanted a CLI go RSS reader that will auto-update, so I can just have it there showing me the news.
But, I think it only supports old UNIX and BSD standard ~/.myconfig instead of nowadays modern LSB (Linux standard base) ~/.config/nameofsoftware/config

I usually will just dive myself in a fork but I am 100% full of work and I attempt to avoid github for coding as much as possible I tend to help projects on gitlab, sourcehut and such.

Clean up downloading errors

I hope the screenshot is explicative enough of the issue, but how do I clear the screen of rss urls printing errors to stdout? I am using Archlinux with kitty terminal

image

Crashing on switching feeds

Hi,

cannot say for sure what I did. But it just crashed after a few seconds "browsing".

GO VERSION
go version go1.15.7 linux/amd64

GO ENV

~ $ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/tom/.cache/go-build"
GOENV="/home/tom/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/tom/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/tom/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build016152857=/tmp/go-build -gno-record-gcc-switches"

Error Message

~ $ gorss
2021/01/24 14:14:28 main.go:89: Using config: /home/tom/.config/gorss/gorss.conf
2021/01/24 14:14:28 main.go:90: Using theme: /home/tom/.config/gorss/themes/default.theme
2021/01/24 14:14:28 main.go:91: Using DB: /home/tom/.local/share/gorss/gorss.db
2021/01/24 14:14:28 main.go:92: Using log file: /home/tom/.local/share/gorss/gorss.log
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x58e435]

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0xc000160280)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/application.go:149 +0x87
panic(0x9369a0, 0xca61f0)
	/usr/local/go/src/runtime/panic.go:969 +0x175
github.com/rivo/tview.(*Table).Draw.func1(...)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/table.go:563
github.com/rivo/tview.(*Table).Draw(0xc0001de6e0, 0xa41fc0, 0xc0003f6000)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/table.go:889 +0x20d5
github.com/rivo/tview.(*Flex).Draw(0xc0001f6300, 0xa41fc0, 0xc0003f6000)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/flex.go:169 +0x2a8
github.com/rivo/tview.(*Flex).Draw(0xc0001f63f0, 0xa41fc0, 0xc0003f6000)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/flex.go:169 +0x2a8
github.com/rivo/tview.(*Flex).Draw(0xc0001f6480, 0xa41fc0, 0xc0003f6000)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/flex.go:173 +0x357
github.com/rivo/tview.(*Flex).Draw(0xc0001f6510, 0xa41fc0, 0xc0003f6000)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/flex.go:173 +0x357
github.com/rivo/tview.(*Application).draw(0xc000160280, 0x0)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/application.go:363 +0xd9
github.com/rivo/tview.(*Application).Draw.func1()
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/application.go:316 +0x2a
github.com/rivo/tview.(*Application).Run(0xc000160280, 0x0, 0x0)
	/home/nergal/go/pkg/mod/github.com/rivo/[email protected]/application.go:253 +0x5a5
github.com/Lallassu/gorss/internal.(*Window).Start(0xc0001de5a0)
	/home/nergal/temp/gorss/internal/window.go:183 +0x85
github.com/Lallassu/gorss/internal.(*Controller).Init(0xc000188480, 0xc000026210, 0x22, 0xc0000262a0, 0x2c, 0xc000026330, 0x25)
	/home/nergal/temp/gorss/internal/controller.go:67 +0x3fc
main.main()
	/home/nergal/temp/gorss/cmd/gorss/main.go:101 +0x778

Unfortunately the log seems to be empty.

~ $ wc /home/tom/.local/share/gorss/gorss.log
0 0 0 /home/tom/.local/share/gorss/gorss.log

[feature request] Search on keywords

A small suggestion for this already great tool.
Is a search option to search all feeds by keywords,

Maybe something of a filter system where you can filter articles further with different keywords

Or another alternative

(which works independently of the highlights)

Crashing on arm64

The program frequently crash at start (99/100 times) and output this :

` /usr/local/go/src/net/url/url.go:701 +0x40 fp=0x1c8bca4 sp=0x1c8bc84 pc=0x1a729c
net/url.(*URL).ResolveReference(0x22b0000, 0x2af63c0)
/usr/local/go/src/net/url/url.go:1122 +0x304 fp=0x1c8bccc sp=0x1c8bca4 pc=0x1a9cf8
github.com/mmcdole/gofeed/internal/shared.(*XMLBase).push(0x2f271c0, {0x0, 0x0})
/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/internal/shared/xmlbase.go:148 +0x74 fp=0x1c8bd04 sp=0x1c8bccc pc=0x3a5a30
github.com/mmcdole/gofeed/internal/shared.(*XMLBase).NextTag(0x2f271c0, 0x21c1db0)
/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/internal/shared/xmlbase.go:109 +0xc8 fp=0x1c8bd28 sp=0x1c8bd04 pc=0x3a57f0
github.com/mmcdole/gofeed/rss.(*Parser).parseChannel(0x1811458, 0x21c1db0)
/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/rss/parser.go:133 +0xe0 fp=0x1c8be14 sp=0x1c8bd28 pc=0x3b8f1c
github.com/mmcdole/gofeed/rss.(*Parser).parseRoot(0x1811458, 0x21c1db0)

/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/rss/parser.go:67 +0x4f4 fp=0x1c8beac sp=0x1c8be14 pc=0x3b8a20
github.com/mmcdole/gofeed/rss.(*Parser).Parse(0x1811458, {0x5a2820, 0x208fb50})
/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/rss/parser.go:28 +0xcc fp=0x1c8bec8 sp=0x1c8beac pc=0x3b84f4
github.com/mmcdole/gofeed.(*Parser).parseRSSFeed(0x186ec60, {0x5a2820, 0x208fb50})
/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/parser.go:141 +0x30 fp=0x1c8bee4 sp=0x1c8bec8 pc=0x3be7a0
github.com/mmcdole/gofeed.(*Parser).Parse(0x186ec60, {0xa40d1400, 0x1f983a8})
/home/user/go/pkg/mod/github.com/mmcdole/[email protected]/parser.go:75 +0x1d4 fp=0x1c8bf1c sp=0x1c8bee4 pc=0x3bdeec
github.com/Lallassu/gorss/internal.(*RSS).FetchURL(0x189e060, 0x186ec60, {0x18d6460, 0x48})
/home/user/gorss/internal/rss.go:131 +0x2d8 fp=0x1c8bf88 sp=0x1c8bf1c pc=0x3d35cc
github.com/Lallassu/gorss/internal.(*RSS).Update.func1(0x189e060, 0x186ec60, 0x19c6468, 0x19c6470, {{0x18d6460, 0x48}, {0x0, 0x0}})
/home/user/gorss/internal/rss.go:81 +0x34 fp=0x1c8bfcc sp=0x1c8bf88 pc=0x3d313c
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:838 +0x4 fp=0x1c8bfcc sp=0x1c8bfcc pc=0x86ac4
created by github.com/Lallassu/gorss/internal.(*RSS).Update
/home/user/gorss/internal/rss.go:80 +0x1c8
`

It don't happen with amd64 version.

I precise that there I have a big opml file imported, don't know if this can cause problems...

Aditionally, Is it possible to add a function to copy link in text file instead of opening it in a browser ? Because it doesn't work with SSH connection.

Thank you very much for this software, very fun !

[feature request] Non blocking feed update

First of all, thank you for developing this awesome looking tool! :)

That said I have one issue that's preventing me from switching to gorss as my daily driver: right now, when you update the feeds, gorss's UI freezes until all the feeds have been updated. This is particularly noticeable at startup, and I can only guess that the problem is going to get worse as I add more feeds.

I think it would be nice to have the feeds update in a background thread so that the rest of the UI can feel snappy at all time.

I'm sorry I have no code to show for it as I lack experience writing in Go

OPML Support?

I have an extensive collection of feeds in a different reader. Any plans to add OPML import support?

Crash from UndoLastRead if nothing previously read

Encountered this crash when hitting 'u' if nothing has been read yet:

	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x44959c1]

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0xc000166380)
	/Users/user/go/pkg/mod/github.com/rivo/[email protected]/application.go:149 +0x87
panic(0x462c100, 0x4ad9af0)
	/usr/local/go/src/runtime/panic.go:969 +0x1b9
github.com/Lallassu/gorss/internal.(*Controller).Input(0xc0001ef680, 0xc0003183e0, 0xc000166380)
	/Users/user/src/d/gorss/internal/controller.go:595 +0x8e1
github.com/rivo/tview.(*Application).Run(0xc000166380, 0x0, 0x0)
	/Users/user/go/pkg/mod/github.com/rivo/[email protected]/application.go:219 +0x445
github.com/Lallassu/gorss/internal.(*Window).Start(0xc000248aa0)
	/Users/user/src/d/gorss/internal/window.go:183 +0x85
github.com/Lallassu/gorss/internal.(*Controller).Init(0xc0001ef680, 0xc00014ec80, 0x37, 0x46bd878, 0x14, 0xc00014edc0, 0x35)
	/Users/user/src/d/gorss/internal/controller.go:67 +0x3fc
main.main()
	/Users/user/src/d/gorss/cmd/gorss/main.go:101 +0x778

Proposal: Ask before exit

As a Vim user I habitually hit the Esc key before I go to do something that my mind thinks should be in command mode (i know, I know). Unfortunately this key is set to 'exit' Gorss.

I have no desire to change the key, but I do wish that the application would ask me if I want to exit.

Only acts as client

Hey,
Nice app! One question though: did you ever consider to make it a "client only"? For example, I use minio as my RSS aggregator. Minio supports the official Fever API, which makes it possible to connect to the minio instance from a variety of devices (iOS (Reeder), Mac, etc).

I think it would be cool if gorss also "speaks" the fever API, so we can point it to our own minio instance.

Article highlighted is the index from the previous feed

I've discovered that when I move from one feed to another the highlighting of the Article is set to the index that it was in the last feed,. this is odd when moving between feeds, but not a deal breaker, except when you move to a feed with a limited count of articles.

eg. I was looking at articles in my Hacker News Feed (which has 1081 articles in it), and I was at index 40+. I moved to my Go-time podcasts feed, which has 2 articles in it, and I couldn't move to either of them, because the index is set to.. 40 odd from the previous feed win.

I'd like to have the index set smarter, to the most recent unread article?

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.