Giter VIP home page Giter VIP logo

mhi's Introduction

MHI

mhi is a commandline style mailreader in the tradition of mh and nmh, but mutated to support IMAP.

Build Status

Why?

One thing that IMAP provides is the ability for multiple clients to access the same mail store. Graphical clients are all well and good, but sometimes a reversion to the commandline is necessary. Neither mh nor nmh will talk to an IMAP server (mh's original semantics, which nmh duplicates, rely on messages not auto-renumbering, as they do in IMAP folders), so I had to write my own client. Python's imaplib made this easy.

How?

As of v0.6.5 MHI is available as a PyPI package (pipx install mhi) The same version also incorporates the old mkLinks wrapper-script functionality via:

  python -m mhi.mklinks <destdir>

.mhirc

.mhirc is an ini-style config file (parsed with configobj). Useful keys:

  • connection - an imap[s]://[username[:password]]@host[:port]/path url string that specifies how to connect to the imap server

  • connection_passwd - the password to use when connection. To avoid putting the password in plaintext in this file, if the string is surrounded by backticks (`), it will be executed as a shell script whose stdout will be used as the password.

  • folder_prefix - the prefix to add to your IMAP folders

  • comp_template - the template put into your editor when you use comp to write new mail

  • repl_template - the template put into your editor when you reply to a message

TODO:

  • use click - but would require new commands?
  • more help - should be self-documenting

Licensing information is in the LICENSE file. (short version: GPLv3 or CCBYSA)

mhi's People

Contributors

chadwhitacre avatar dependabot[bot] avatar pjz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mhi's Issues

use click for arg parsing

do less manual arg parsing (though some will likely still be necessary as 'tagged' args like the leading plus meaning 'folder' aren't supported)

add 'config' command with appropriate subcommands

ala git, instead of having to edit ~/.mhirc you should be able to show the current config with mhi config get and set options with mhi config set <option> <value> and show individual options with mhi config get <option>

add --html flag to show/prev/next

..and have it piped through some configurable HTML-to-console renderer.
maybe w3m -dump -T text/html or maybe html2text or whatever.
Configurable in ~/.mhirc

mhi fails with Python 3.7 (and earlier)

When installed in Python 3.7, importing mhi results in an f-string error:

C:\Users\aneufeld\Documents> py
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mhi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<fstring>", line 1
    (env_date=)
             ^
SyntaxError: invalid syntax
>>> ^Z

While f-strings are supported in Python 3.7, the f"{variable=}" shortcut for f"variable={variable}" is a Python 3.8+ feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.