guyfedwards / nom Goto Github PK
View Code? Open in Web Editor NEWRSS reader for the terminal
License: GNU General Public License v3.0
RSS reader for the terminal
License: GNU General Public License v3.0
Removing a feed from config.yml doesn't remove items from the store
Currently have to mark all existing as read to remove from UI
The help view has only three columns and is not well balanced in the list view, we should be able to create our own one copying the list implementation for more flexibility.
I'm missing only two features from nom, one is a command-line option to hide read articles. The other is the "Open link in default browser" feature mentioned elsewhere.
It seems that 1, refreshes block the app completely until they're done (which can take up to ~5 seconds), and 2, if you refresh when in the filtered view, your list becomes completely empty.
For point 1, I think it should probably be possible to put the logic for refreshing inside a goroutine, and set an internal variable for "refreshing" or something similar, so that the app doesn't compeletely stop for several seconds.
For point 2, I think the Filter Function just needs to trigger again, but I'm not 100% sure on how to force that. We might just run ResetFilter()
if nothing else, so that the user isn't greeted with a completely blank page just from running refresh.
date/time not always recognised (shows 0001-01-01 00:00:00 +0000 UTC for this sample feed)
from #42
Newsboat does a lot but I've not worked out how to show tagged/starred articles by category, only by feed... Would love that feature and the ability to sync with Tiny Tiny RSS...
Add searching by text in list, also by source, category.
Options:
foo
narrows by titlefoo category:allfoos
narrows by title within categoryHi,
I tried installing nom in termux for android but it wont install. any possibility of providing armv7 and armv8 binaries of nom for linux/termux?
Thank you!
I'm loving this simple tool! I was wondering if we can get an option to sort by oldest item first (publish date ascending).
r pressed in a regular session indeed refreshes all feeds, and shows already read items, too (another r keypress hides them again)
from #42
$ go install github.com/guyfedwards/nom/cmd/nom@latest
This command takes a few seconds to run, provides no output, and does not seem to succeed in installing nom
.
The output of $ go version
is go version go1.22.1 darwin/arm64
.
Hi there, I was looking to create a quick docker for this but ran into issues using the Makefile when running build. this is on alpine with the latest version of go 1.19.4. Any ideas?
/nom # make build
go build -o nom cmd/nom/main.go
go: downloading github.com/jessevdk/go-flags v1.4.0
go: downloading github.com/charmbracelet/bubbles v0.14.0
go: downloading github.com/charmbracelet/bubbletea v0.23.1
go: downloading github.com/charmbracelet/lipgloss v0.6.0
go: downloading golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/JohannesKaufmann/html-to-markdown v1.3.6
go: downloading github.com/charmbracelet/glamour v0.5.0
go: downloading github.com/muesli/reflow v0.3.0
go: downloading github.com/sahilm/fuzzy v0.1.0
go: downloading github.com/containerd/console v1.0.3
go: downloading github.com/mattn/go-isatty v0.0.16
go: downloading github.com/mattn/go-localereader v0.0.1
go: downloading github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b
go: downloading github.com/muesli/cancelreader v0.2.2
go: downloading github.com/muesli/termenv v0.13.0
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab
go: downloading github.com/PuerkitoBio/goquery v1.8.0
go: downloading golang.org/x/net v0.0.0-20220909164309-bea034e7d591
go: downloading github.com/atotto/clipboard v0.1.4
go: downloading github.com/yuin/goldmark v1.4.14
go: downloading github.com/yuin/goldmark-emoji v1.0.1
go: downloading github.com/aymanbagabas/go-osc52 v1.0.3
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/andybalholm/cascadia v1.3.1
go: downloading github.com/alecthomas/chroma v0.10.0
go: downloading github.com/microcosm-cc/bluemonday v1.0.17
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/dlclark/regexp2 v1.4.0
go: downloading github.com/aymerick/douceur v0.2.0
go: downloading github.com/gorilla/css v1.0.0
# command-line-arguments
cmd/nom/main.go:26:73: opts.ShowFeedNames undefined (type Options has no field or method ShowFeedNames)
make: *** [Makefile:2: build] Error 2
When attempting to open an item in browser from the markdown view after filtering, nom panics with the following message:
interface conversion: list.Item is nil, not commands.TUIItem
Steps to reproduce:
Note: Opening an item in the browser works fine from a filtered list view, it's only when you enter markdown mode that it panics
Sytem:
MacOS 14
zsh
tmux
alacritty
I had a quick look into this and it seems like its this line thats causing the issue: internal/commands/viewport.go#L31
which isn't expecting a nil response from m.list.SelectedItem()
Bubble tea SelectedItem - list.go#L440 returns nil iflen(m.VisibleItems()) == 0
, but after filtering and entering the markdown mode m.VisibleItems()
returns an empty list
When running nom
for the first time (adding the first feed), it still requires the configuration file to exist, which is sort of absurd, because a user has no feeds configured at the moment.
Besides, when using nom
for previewing a feed, the configuration file also doesn't seem to be needed, and yet nom
keeps requiring it :)
One feature I really like about newsboat is when you press E your url config is opened in vim by default and you can edit it.
From reddit user b3zi
Say there is a youtube video I want to watch. In my config it is rendered in elinks then I go to it. I press my macro key which is the comma then a y to play the video in mpv with help from yt-dlp.
macro y set browser "i3 exec mpv" ; open-in-browser ; set browser "elinks %u"
If I want to open the video in my browser, I have the macro key + f:
macro f set browser "i3 exec firefox" ; open-in-browser ; set browser "elinks %u"
It is very extensible because I can map it exactly how I like. If I want to open it in any program, I just set a macro for it.
An essential feature of newsboat for me is FreshRSS syncing (using Google Reader API).
Miniflux support if possible, or a google reader api support.
Add ability to read from external sources.
Sources:
in termux (Google Pixel 5a android, arm64 binary) error:
nom -f http://rss.cnn.com/rss/cnn_topstories.rss
error:
"/data/data/com/termux/files/usr/bin/nom" has unexpected e-type: 2
At the same time, in Win11 WSL everything is W-O-N-D-E-R-F-U-L!
I'm so glad to be able to replace a newsboat, the last version of which could be installed only via (hated by me) snap.
Thanks a lot, you're my hero!
I wish it worked with Android too, please!
I am running on windows and I have tried to set this up in %LOCALAPPDATA% but I don't know which fresh RSS API this is supposed to use and every option I try from the help just makes it show the help again. Can I get some guidance?
I've been having trouble getting nom's "open in browser" to work. To be fair, I am doing something I think out of the ordinary, in that i'm trying to get it to launch lynx in terminal rather than a desktop app, but the bug I'm actually reporting is that when I hit 'o' in nom, it drops out of app, but just goes back to a blank command line without any error output, so I'm having trouble figuring out which part of the chain is going wrong, whether its nom missing something, myself missing something, or perhaps just a fat finger in some config I have somewhere.
$ nom add http://feeds2.feedburner.com/patshaughnessy
$ cat config.yml
feeds:
- url: http://feeds2.feedburner.com/patshaughnessy
$ nom add http://feeds2.feedburner.com/patshaughnessy
$ cat config.yml
feeds:
- url: http://feeds2.feedburner.com/patshaughnessy
- url: http://feeds2.feedburner.com/patshaughnessy
It should be easy to check whether the url is already in the list. Not sure if there are repercussions though.
nom
successfully lists the feed items, but attempting to read an individual article only shows the title and date:
Moscow on the Med: A Faraway War Transforms a Turkish Resort Town
2022-12-29 10:00:26 +0000 UTC
Tested with https://rss.nytimes.com/services/xml/rss/nyt/World.xml
Is there a way to theme the colors? I'm not a fan of the purple.
For example if a user wants to open youtube links with mpv, or reddit ones with reddyt
Some feeds I've tested cause panic with this output:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbc6941]
goroutine 9 [running]:
github.com/guyfedwards/nom/internal/rss.Fetch({0xc0003bb080, 0x20})
/home/pt/go/pkg/mod/github.com/guyfedwards/[email protected]/internal/rss/main.go:80 +0x341
github.com/guyfedwards/nom/internal/commands.fetchFeed(0x0?, 0x0?, {0xc0003bb080, 0x20})
/home/pt/go/pkg/mod/github.com/guyfedwards/[email protected]/internal/commands/main.go:149 +0x86
created by github.com/guyfedwards/nom/internal/commands.Commands.fetchAllFeeds
/home/pt/go/pkg/mod/github.com/guyfedwards/[email protected]/internal/commands/main.go:112 +0x46f
The URLs that cause the same issues are the following:
One piece of information that might be useful is that they are all built with Eleventy and are hosted on Netlify. The URL pointing to the feed XML file is handled by Netlify's "redirect" function that is specified in netlify.toml
file. I think they are also technically Atom feeds.
Following on fromhttps://github.com//pull/25#discussion_r1081093157
Ahmmm, the problem with that is the fact that we do fetchAllFeeds on any FindArticle which does another HTTP request per feed, which is completely unnecessary since we are getting the same information we already fetched in the current session.
Let's say we are previewing 2 feeds:
acme.com/rss.xml
example.com/rss.xml
On the startup, we do 2 HTTP calls to get those feeds' contents.Once user navigates to one of the articles, we do FindArticle which calls fetchAllFeeds resulting in 2 unnecessary HTTP calls. The more the user views articles, the more calls we are making in vain.
The repercussions are not only that the interface is sluggish, but we are risking requesting some of the feeds too often and getting rate-limited.
Some options:
This would add some interoperability with features of bubbles/list
and others that use this already, and makes setting up keybinds much more consistent. It shouldn't take too long, and would help address the PR for #61.
The main move would be creating three keybind keymaps, one for List View, one for Filter View (see #61), and one for the Viewport View, and transitioning the keymaps from raw strings to the keymap counterparts (e.g., case key.Matches(msg, ListKeyMap.Quit):
instead of case "q", "ctrl+c", "etc.":
)
Add a shortcut for tagging everything as read
Opened from #77 (comment)
When adding a url with nom add ...
that is already in the config, just shows help instead of a useful error message.
We should show a message to the user explaining what has happened and not show the help.
Hello!
When trying to preview this feed: https://www.sinembargo.mx/feed nom
crashes with a panic error
$ nom -v -f https://www.sinembargo.mx/feed
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa9c018]
goroutine 22 [running]:
github.com/guyfedwards/nom/v2/internal/rss.feedToRSS({{0x7fff14fd2ba8?, 0x7fff14fd2ba8?}, {0x0?, 0x10dc770?}}, 0xc0005722c0)
github.com/guyfedwards/nom/v2/internal/rss/rss.go:76 +0x1d8
github.com/guyfedwards/nom/v2/internal/rss.Fetch({{0x7fff14fd2ba8?, 0x0?}, {0x0?, 0x0?}}, {0x0?, 0x0?})
github.com/guyfedwards/nom/v2/internal/rss/rss.go:43 +0x267
github.com/guyfedwards/nom/v2/internal/commands.fetchFeed(0xc000032420, 0x0?, {{0x7fff14fd2ba8?, 0x0?}, {0x0?, 0x0?}}, {0x0?, 0x0?})
github.com/guyfedwards/nom/v2/internal/commands/commands.go:372 +0xa5
created by github.com/guyfedwards/nom/v2/internal/commands.Commands.fetchAllFeeds in goroutine 1
github.com/guyfedwards/nom/v2/internal/commands/commands.go:263 +0x138
I think is because the pubDate is malformed, example: <pubDate>Dom, 16 Jun 2024 00:05:38 +0000 2024-06-16 00:05:38</pubDate>
and gofeed does not parse it so *it.PublishedParsed
doesn't exist
Also i think it should just continue with either an empty date or just the origin pubDate like other rss tools do, maybe?
Thank you for this tool it's exactly what i've been looking for, i love that i can use custom openers, mpv for youtube, or reader to get complete articles when the rss has only a little extract. is brilliant! ๐
Hi,
I came across your program on r/commandline and really liked what I saw in the demo, so I decided to install and try it out.
Here's a small list of things I would like to see added, if possible:
A system of hints to follow links (similar to qutebrowser), maybe rebind forward to C-f and use f to bring up the hint menu? (mentioned in #8 )
A search option (keybind: /)
More powerful ways of organizing feeds: categories, subcategories, tags... (#4 mentioned categories, although I didn't see they mentioned in the help menu, nor in the documentation/readme)
Ability to download the complete article (already mentioned in #10), maybe take inspiration from other readers that already do this like newsboat? Maybe using something like https://txtify.it/ and its api?
Sadly quite a few feeds only display a really short 1 paragraph description of the content instead of the actual content itself.
Expanding on #9, maybe add the ability to set default programs for certain categories/tags, for example, if I open an article tagged "Video" or "Youtube" it automatically opens up mpv.
A way to (bulk)mark articles as (un)read along with the option to hide read articles/empty categories by default.
I'm quite new to github, so if you'd prefer me to comment on the other issues or create individual ones for each idea, feel free to tell me!
When entering in an item, going down using the arrow key down works, but not the arrow up. When using the arrow up, only the first line will refresh. If we went a few times up using up key and then arrow key down, the view refreshes to the correct one.
In the demo, we can also see some lines being duplicated when pressing the arrow key down
Demo:
Currently the file/defaults precedence is poor. Needs to be refactored to accept defaults and then be overridden by the fileconfig or flags without the need to manually check if it's in the file config and set
Option to favourite articles and not have them cleaned up/removed from the cache.
Needs to be easy to export urls/content
Hey, just wanted to inform you that nom just got merged into the nix package repository:
Thought you might like to know that people are using it and didn't know how else to contact you.
Was testing this bug (#7) and found that nom would error out. Couldn't find config file at the specified location to restore functionality. On macOS, turns out it's created at ~/Library/Application\ Support/nom/config.yml
Suggestion to either add this note to the documentation or store this in the expected location for macOS.
Extending this a bit further, would be nice to have a --config where you can specify/override the default config file used. Might be nice for testing too! :) nice work btw!
After installing nom through "go install", as shown in the README, running the command simply returns "zsh: command not found: nom"
Attempting to re-run "go install github.com/guyfedwards/nom/cmd/nom@latest" doesn't seem to do anything.
-f/--feed requires an additional r (otherwise shows items from the subscribed feeds or "No items found")
from #42
Add ability to open (maybe also mouse support?) for links within an article
I see you have no LICENSE file for this project. The default is copyright.
I would suggest releasing the code under the GPL-3.0-or-later or AGPL-3.0-or-later license so that others are encouraged to contribute changes back to your project.
--preview <feed url>
- url: https://www.reddit.com/r/golang/.rss
Hi, I just thought that it would be nice to check the current version with a simple command line flag like --version
.
It seems that the f
key to favorite a post does not work if you are reading the post. This makes the interaction a bit awkward because if I exit, its marked as read, so then I need to search for it with the read filter on, then when I favorite it it dissapears. It would be great to do the following.
M
first.It should prefix the category of a feed from freshrss similar to how you can
feeds:
# name will be prefixed to all entries in the list
name: dropbox
- url: https://snyk.io/blog/feed
I installed nom by
go install github.com/guyfedwards/nom/cmd/nom@latest
but it would only build the latest version in v1.
And the latest version on https://pkg.go.dev/github.com/guyfedwards/nom is also v.1.2.1.
Maybe some go enforced v1/v2 problems?
--
I am on go version go1.21.5 darwin/amd64
I tried to add the reddit rss by using the following command :
~/Downloads/nom_2.2.3_linux_amd64$ ./nom -f https://www.reddit.com/r/linux/.rss
but I got the following :
Error fetching https://www.reddit.com/r/linux/.rss: rss.Fetch: http error: 403 Blocked
I'm on ubuntu 24.04. I don't if it matters, but I'm using cellular network. Although through Firefox I get the .rss file so I don't know
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.