Skip to content

ersinakinci/pipe-mime-to-qlmanage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipe-mime-to-qlmanage

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.

Installation

Not currently available via NPM! However, you can install roughly like so:

  1. Clone this repo: git clone https://github.com/earksiinni/pipe-mime-to-qlmanage.git
  2. 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.

Example usage with alot

  1. Open an HTML email inside alot.
  2. While in thread view, pipe to the script: pipeto /path/to/pipe-mime-to-qlmanage

Example usage with alot and SSH

If you're using alot on a remote machine via SSH, you can also pipe to your local computer via SSH:

  1. 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
  2. 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
  1. Make your pipe script executable: chmod +x ~/pipe-to-local
  2. 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.

About

Pipe single and multipart MIME messages to qlmanage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published