<<< Date Index >>>     <<< Thread Index >>>

Re: setting firefox about:config to invoke or start mutt when



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, April 21 at 03:21 PM, quoth jkinz@xxxxxxxx:
>The script is a little slow. It has 14 or so spawned processes
>which could be replaced by internal Bash parameter
>expansions.

Lemme see if I can help with that. :)

>Here is script I found on the web; modified to invoke mutt under the 
>KDE konsole terminal app:
>
>#!/bin/bash
>MAILTO_URL="$1"
>
>#Strip off the protocol
>MAIL_DATA=$(echo "$MAILTO_URL" | /bin/sed -s 's/^mailto://')

MAIL_DATA=${MAILTO_URL#mailto:}

>#Get Recipient and strip it off
>RECIPIENT=$(echo "$MAIL_DATA" | cut -d? -f1 -)

RECIPIENT=${MAIL_DATA%%\?*}

>MAIL_DATA=$(echo "$MAIL_DATA" | /bin/sed -s s/^$RECIPIENT//)

MAIL_DATA=${MAIL_DATA#$RECIPIENT}

>#Get Subject,BCC, and CC
>SUBJECT=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?subject=//' \
>| /bin/sed -s 's/?.*//')

SUBJECT=${MAIL_DATA#*\?subject=}
SUBJECT=${SUBJECT%%\?*}

>BCC=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?bcc=//' | /bin/sed -s 's/?.*//')

BCC=${MAIL_DATA#*\?bcc=}
BCC=${BCC%%\?*}

>CC=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?cc=//' | /bin/sed -s 's/?.*//')

CC=${MAIL_DATA#*\?cc=}
CC=${CC%%\?*}

>It's very slow to pop up the mutt window, so I'm sure I'll eventually
>upgrade those $( echo blah | sed ) transforms to PE expressions, unless
>I come across a better solution in the meantime.

Hope I could help!

>The first goal was just to get "something" working so I could
>respond to ads on craigslist with a single click... :) 

Careful! I hear that thing is full of killers! ;)

~Kyle
- -- 
The past isn't dead and buried. In fact, it isn't even past.
                                                    -- William Faulkner
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAknuIyIACgkQBkIOoMqOI14YTQCfSNddVCJFGWHZOykRS35MPq7e
mOYAoMdvifmdZdq9/VNvSYO7M4G8A6rR
=/gsh
-----END PGP SIGNATURE-----