You are not logged in.

#26 2013-10-02 01:04:29

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Minimalist apps and file search question

I'm not a huge fan of emacs, for a number of very legitimate reasons. But let's not get into that.

I found dmc, a program solely designed to send/compose email, or at least that's what it looks like to me. However, it doesn't look like it can attach files in MIME encoding. For me, this is a must.

If no client exists to handle all of these things, then I need individual programs. Trilby's scripts sound excellent, and I can't wait to take a look at them. In the mean time, however, what about this?

1. a program that can handle the composition of messages with attachments
2. a program that can view and manage a maildir, and call external programs/scripts to handle actions. Think uzbl for email.

Do programs such as 1&2 exist? I'm trying to write a script to handle message composition written in BASH, but it's not going so well. I keep forgetting how to use getopts, and Google isn't too forthcoming.

Offline

#27 2013-10-02 01:13:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Minimalist apps and file search question

ParanoidAndroid wrote:

I keep forgetting how to use getopts, and Google isn't too forthcoming.

You need to make notes!

$ cat bin/seed 
#!/bin/bash -
#set -x
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin
export PATH

allan=0

usage="Usage: $0 [OPTION] [FILES]
Make the tea while computing the path of all particles in the known universe and whistling cheerily.
Options:
        -h --help       print this message and exit
        -o --option     an option which takes an argument                       [default value]
If no files are specified, advanced ESP is used to ascertain the user's wishes." 
error () {
        echo "$@" 1>&2
        ((allan++))
        usage_and_exit $allan
}
usage () {
        printf %b "$usage\n"
}
usage_and_exit () {
        usage
        exit $1
}

tempargs=$(getopt -o ho: --long help,option: -- "$@")
if [ $? != 0 ];
then
        usage_and_exit
fi
eval set -- "$tempargs"

while true
do
        case "$1"
        in
                -h | --help)
                        usage;
                        exit $allan;;
                -o | --opt | --opti | --optn | --option)
                        #if [ -f "$2" ]
                        #then
                                option="$2"
                        #else
                        #       error "$2" is not a regular file.
                        #fi
                        shift;
                        shift;;
                --)
                        shift;
                        break;;
                *)
                        error Unrecognised option "$1".
        esac
done

args="$@"



exit $allan
# vim: set nospell:

CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#28 2013-10-04 00:03:04

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Minimalist apps and file search question

I've given up on looking and am attempting to write my own MUA as a pair of scripts in python. The first displays, replies to. and views messages in my inbox. The second creates and sends mail.

I am having trouble with the first item. I need to parse the HTML in message bodies that contain it into a nice, lovely plain-text layout, and so far every method I have tried has failed. Can anyone give me pointers on this?

Last edited by ParanoidAndroid (2013-10-08 20:56:30)

Offline

#29 2013-10-09 08:12:31

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: Minimalist apps and file search question

ParanoidAndroid wrote:

I am having trouble with the first item. I need to parse the HTML in message bodies that contain it into a nice, lovely plain-text layout, and so far every method I have tried has failed. Can anyone give me pointers on this?

Yes. Don't bother. Pass the job off to a dedicated text-mode web browser or to a special instance of Uzbl that's configured for mail reading.

Also, take a look at Mailutils. You might find some of its tools to be handy. For automating modifications to messages before sending them off to msmtp, like GPG signing, you can use Anubis.

I'm late to the party here but I'll add that instead of vim you should be using ed. Anything more would be betraying your philosophical purity.

Last edited by jakobcreutzfeldt (2013-10-09 08:16:35)

Offline

#30 2013-10-09 08:15:19

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: Minimalist apps and file search question

ewaller wrote:

emacs will do all all of that right out of the box.

Yes, but let's be honest: it does come in a rather large box.

Offline

#31 2013-10-10 17:23:53

ParanoidAndroid
Member
Registered: 2012-10-14
Posts: 114

Re: Minimalist apps and file search question

I considered ed, but I couldn't figure it out with the provided documentation and I'm rather attached to vim. It is my one digital vice, as it were.

I'm writing the second in the set of scripts that comprise the core of my email system. capacities like replying, etc. and added functionality in the mailbox reader will be handled later. The script in question is the compmail script, which handles composing an email. I have the following questions:

1. How do I get it to read a file piped to it, or ask for input if such a file is not provided?
2. how can I send the completed message to msmtp? I'm not sure from the docs that the smtp module is designed to do that. Please correct me if I'm wrong.


when and if I complete all the needed programs, I'm hoping to post them here for review. My code is generally sloppy, as I haven't used python in a while and have a weaker grasp of classes and objects than I would like... but so far it's functional. It would be nice to have someone smarter than me to look over it, though.

Offline

Board footer

Powered by FluxBB