A simple utility to take single and multipart MIME messages from stdin and pipe them to macOS' qlmanage
in order to display them.1
This utility can be used in conjunction with a text-based Mail User Agent, like alot, to display HTML and other multimedia emails.
Not currently available via NPM! However, you can install roughly like so:
- Clone this repo:
git clone https://github.com/earksiinni/pipe-mime-to-qlmanage.git
- Install dependencies (we assume that you have Node installed):
npm install
Or, if you use Nix, simply run nix-env -f default.nix -iA package
inside your cloned directory.
- Open an HTML email inside alot.
- While in thread view, pipe to the script:
pipeto /path/to/pipe-mime-to-qlmanage
If you're using alot on a remote machine via SSH, you can also pipe to your local computer via SSH:
- Use remote forwarding to open a tunnel from your remote computer to your local computer's SSH port. An example entry in
~/.ssh/config
might look like:RemoteForward 127.0.0.1:2222 127.0.0.1:22
- Create a script on your remote machine (example:
~/pipe-to-local
) to pipe data to back to your local computer:
#!/usr/bin/env bash
ssh -p 2222 127.0.0.1 /path/on/local/computer/to/pipe-mime-to-qlmanage
- Make your pipe script executable:
chmod +x ~/pipe-to-local
- While in alot's thread view, pipe your message to the script:
pipeto ~/pipe-to-local
The preview should open on your local computer, like magic.
1: HTML is currently opened using the default browser due to a limitation in qlmanage
, in which links are unclickable.