1660944107557195 png
(2.26 MB, 1910x1600)
It's super bare bones, basically just terminal RSS reader with built in, shitty version, of GREP and even worse output formatting but it's a start.
I know I said at the end of August and it was really done this time! ...but I kinda forgot it needs CLI user interface as well (the whole thing was written in REPL) and user interaction took longer than expected.
What it has:
- RSS support
- Very little filtering support - uses simple string.contains so "delet" will match "delet*" -> "*deleted", "deleting" and so on. This is case insensitive.
- Very early TOML config support
- Pretty solid error handling and help with errors I would say
- Terminal VT-100 colored output
- Included example of documented config - Format is very unstable and may (will) change a LOT
- Support for running as "script" (interpreting "directly" by Clojure)
- Support for running as single Java .jar file (standard java -jar way)
- Included instructions on using and building every supported way of running
What it has not
- No Atom feed support
- No html filter (some feeds put html tags inside them, it'll have to be filtered out in the future)
- No Advanced filtering
- When item gets matched it'll also lower case him
- No Checking which feed items has already been read (always displays everything -> it's shit for feeds with long history and feeds that don't change often) - it's best to redirect output to some > file or pipe to less -R (-R to get proper terminal colors)
- No way to disable or customize coloring of matched text
- No On-match hooks for executing commands/code
- Support for native executable using GraalVM (faster startup, no need for java, planned in next release)
- Proper TOML parser - the one for Clojure is really old 0.4.0 and the cool features of TOML 1.0 are not supported, but this will be fixed by using the java version of parser
- No possibility to set delays between different sources (no need to redownload very slow feeds so often when they change once a week)
Background
As it's based on an older code base, language used is Clojure, which is Functional Lisp dialect for JVM. At first I wanted to rewrite it in something else but then I tried it and it is actually quite nice when you get used to it, so I'll stick with it for now.
The Feed downloading and parsing is written from scratch, there is a library for that, I looked for it, but haven't found anything until I implemented entire RSS support so I decided to stick with my version for now as I know it better but it may be switched later. Due to functional style it shouldn't be too hard.
I was a bit worried about the Java dependency but that should be hopefully solved by GraalVM native building.
BUGS
- [NonBreaking] Java 11 doesn't like one Clojure built-in function, so there is one error message about reflection, however program should work fine. This happens only with java 11. Other tested versions (8, 16) seem to not mind.
How to use it
- Get some java (should work 8-17; tested on 8, 11, 16)
- Get config file - you can use example as base
- Copy it to some of the by default searched paths "./feeds.toml", "~/.config/feed-analyzer/config.toml", "~/.feed-config.toml" OR specify any file with the '-c' arg when calling the program
- [optional] Append '-d' for startup debug info or '-dd' for stack trace in case of fatal exception
- Specify any sections and groups you are interested in. If none are specified, all sections are filtered by their groups
- All of the matched feed items will be marked with red bold text (in any VT-100 terminal) and printed to standard output, currently you can't customize this
- More info in the included documentation or shorter version with the '--help' arg
1/2