MyNixOS website logo
Description

Execute arbitrary actions for each item from RSS/Atom feeds.

Cf README file

imm

Built with nix Build

imm is a program that executes arbitrary callbacks (e.g. sending a mail, or writing a file) for each element of RSS/Atom feeds.

imm is written in Haskell, configured in Dhall. The project includes:

  • a main executable imm that users run directly
  • secondary executables (imm-writefile, imm-sendmail, imm-monolith) meant to be used as callbacks triggered by imm
  • a Haskell library, that exports functions useful to both the main executable and callbacks; the API is documented in Hackage.

Installation

Packaging status

Using nix

This repository is notably a Nix flake that can be installed by running the following command at the root folder:

nix build

Without nix

imm's executables can be installed using cabal-install tool:

cabal install imm

Then, the following runtime dependencies must be installed separately and provided in PATH:

Configuration

Callbacks

Callbacks are configured through the $XDG_CONFIG_HOME/imm/callbacks.dhall file. A commented template file is bundled with the project.

imm will call each callback once per feed item, and will fill its standard input (stdin) with a JSON structure, which schema is described in file schema/imm.json.

Callback process is expected to return 0 in case of success, or any other exit code in case of failure, in which case the standard error output (stderr) will be displayed.

Example use cases

Online feed reader

For the sake of I-want-the-mutt-of-feed-readers zealots, it is possible to turn any mail reader into a feed reader, by having imm send an e-mail with unread elements to an arbitrary address. You can then browse your feeds through your favourite mail reader, and leverage any mail-related tool on your feeds. Bonus points if your mail reader is online as you can now access your feeds from any computer connected to the Internet.

Here is an example configuration:

let Callback : Type =
  { _executable : Text
  , _arguments : List Text
  }

let sendMail =
  { _executable = "imm-sendmail"
  , _arguments = []
  }

let config : List Callback = [ sendMail ]
in config

imm-sendmail does not have a built-in SMTP client, instead it must rely on an external SMTP client program, which is configured in $XDG_CONFIG_HOME/imm/sendmail.dhall (cf example bundled with the project.) imm-sendmail writes the mail bytestring to the standard input of the configured external program.

Offline read-it-later

imm is able to store a local copy of unread elements, to read them later while offline for example.

There are 2 alternate ways of achieving this:

  • using imm-writefile will produce a light HTML file with no stylesheets, no scripts and with links to online resources (images, fonts, ...) that won't be available offline:
    let Callback : Type =
      { _executable : Text
      , _arguments : List Text
      }
    
    let writeFile =
      { _executable = "imm-writefile"
      , _arguments = [ "-d", "/path/to/folder" ]
      }
    
    let config : List Callback = [ writeFile ]
    in config
    
  • using imm-monolith will produce a heavy, self-contained HTML file, with embedded stylesheets, scripts, images and fonts; links to external web pages will still require an internet connection:
    let Callback : Type =
      { _executable : Text
      , _arguments : List Text
      }
    
    let downloadPage =
      { _executable = "imm-monolith"
      , _arguments = [ "-d", "/path/to/folder" ]
      }
    
    let config : List Callback = [ downloadPage ]
    in config
    

Example usage

  • Subscribe to a feed through direct URL:

    imm subscribe http://your.feed.org
    
  • Subscribe to a feed through an alternate link:

    imm subscribe http://your.website.org
    
  • List subscribed feeds:

    imm list
    
  • Show details about a feed:

    imm show 10  # 10 is the index of a subscribed feed, as shown with `imm list`
    
  • Unsubscribe from a feed:

    imm unsubscribe 10  # 10 is the index of a subscribed feed, as shown with `imm list`
    
  • Check for new elements without executing any action:

    imm --read-only run --no-callbacks
    
  • Execute configured callbacks for each new element from all subscribed feeds:

    imm run --all
    
Metadata

Version

2.1.1.0

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows