A hackable news processor and reader.
Go to file
kitzman b051fedcfd
fixed behaviour in case failed retrieval (#15)
2021-07-11 20:36:36 +03:00
examples multiple sources feature (#12), updated example 2021-06-30 19:38:03 +03:00
lieferhund fixed behaviour in case failed retrieval (#15) 2021-07-11 20:36:36 +03:00
.gitignore first commit 2021-06-25 10:59:50 +03:00
LICENSE first commit 2021-06-25 10:59:50 +03:00
README.md (real) atom feeds now supported (#13) 2021-07-01 00:22:48 +03:00
lieferhund.scm database is now saved after processing (#16) 2021-07-01 11:53:03 +03:00

README.md

Synopsis

Lieferhund is a (the most?) hackable news-reading utility.

To use it, first make sure you have a configuration file in place - the default location is in $HOME/.config/lieferhund/config.scm. Then, the first step would be to pulling the news from the sources.

lieferhund -x pull
lieferhund -c $CONFIG_FILE -b $DB_FILE -x pull

Next, one can invoke the read command (which is quite basic at this moment), to go through the news:

lieferhund -x read

Supported protocols

Currently, only RSS and Atom feeds are supported, but mailing lists are on their way.

Configuration hacking

An example configuration can be found in examples/.

One just needs to add entries.

The hackability comes into attention, when writing the 'post-hook field in the configuration. A post hook is defined as:

  • #f - no action, just add to the database
  • a lambda, which takes as argument, a list of the form '((config-entry news-items) ...)
  • an exp of the form ('process-each hook-fn), which applies the lambda with the signature (lambda (config-entry item) ...), to each news item, in a sorted manner
  • an exp of the form ('process-each-channel hook-fn), which applies the lambda with the signature (lambda (config-entry news-items) ...), to each channel and its entries
  • ('hook-gen make-hook args ...) applies the hook generator, with the arguments specified (i.e: (hook-gen make-send-mail-to "xxx@yyy.zzz"))
  • ('hook-cons hooks ...) which means that multiple hooks can be combined

There are already 2 hooks already implemented:

  • make-printer-hook - takes no argument, prints each item
  • make-each-script-hook - takes two arguments - a string describing the command, and a list with strings which describe the content of the message, which is written to a temporary file and can be used in the command; to make the process useful, the following string interpolations are defined: ~~CONTENT~~ - the content file, ~~NAME~~ - config entry name, ~~TITLE~~ - item's title, ~~DATE~~ - item's date, ~~DESCRIPTION~~ - the item's description

To be able to write and use custom hooks, each configuration entry has a field opts, which is an association list.

Additionally, in lieferhund/interpolator.scm, one can find functions that can interpolate different type of information, including the entry options.

Treating your delivery doggo well

lieferhund -x give-treat

TODOs

Below are some TODOs:

  • make-each-pair-script-hook
  • make-ui-hook - it would nice to have a little UI - either term aware or not
  • add user-defined options (to be read by hooks, i.e: NNTP group)
  • add support for IMAP
  • write lieferwelpe (the daemon - which obviously has more energy)
  • write lieferkatze (the web interface; it would be nice to wait for guile's to-ecmascript compiling)
  • add support for mailing lists