Re: Download multiple attachments at once

2013-08-04 Thread Jim Graham
On Tue, Jul 30, 2013 at 11:44:44AM -0500, David Champion wrote:
 * On 30 Jul 2013, James Griffin wrote: 
  
  David, out of curiosity, how do you get voicemail sent to your email
  server?

 I have home VoIP service, and the provider (Megapath, formerly known
 as Speakeasy) has this as a built-in option.

Another way is to use youmail (http://www.youmail.com).  It's free, and
you can put contacts into groups (e.g., friends, family, doctors, and so
on), add specific greetings for those groups, etc.  For example, for my
group called doctors, I have a greeting from the community greetings
that's Bugs Bunny saying, ehhh, what's up doc?  You can use the
community greetings (users upload their own grettings,and allow them
to be used by others) or you can upload your own (and either keep them
private or add to community greetings).  They also have a (paid) option
where you can have your voice messages sent to you in text format.

I get my voice messages as e-mail and on my Android (youmail app).
The messages are sent via e-mail in mp3 format.

You can also ditch numbers that you don't ever want to hear from, like
spam callers.  You can apply a special ditch greeting, too.  Mine is,
in the usual telco message voice, Hello, welcome to ATT wireless voice
mail.  Goodbye and then the caller is hung up on.  There are also
special options for blocked caller ID and caller ID unavailable, if you
choose to use them.

I've been a youmail user for years, and I highly recommend it.

OB Mutt:  Does anyone remember what year it was when Mutt was at a
version number somewhere around 0.86?  I know it was in the mid-90s,
but I'm curious to know, so I can know just how many years I've
been using Mutt.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)  | Tux (E Cat):  DS B+Wd Y 6 Y L+++ W+ C++/C++ I+++
spooky1...@gmail.com  | T++ A E H+ S V- F++ Q+++ P/P+ B++ PA+ PL SC---
 Running Mac OS X Lion  | 
ICBM / Hurricane: | Tiggerbelle:  DS W+S+Bts % 1.5 X L W C+++/C+
   30.44406N 86.59909W| I+++  T A E++ H S++ V+++ Q+++ P  B++ PA++ PL+ SC



Re: Download multiple attachments at once

2013-08-04 Thread Brandon Sandrowicz
 OB Mutt:  Does anyone remember what year it was when Mutt was at a
 version number somewhere around 0.86?  I know it was in the mid-90s,
 but I'm curious to know, so I can know just how many years I've
 been using Mutt.

According to FileWatcher.com[1], October 10, 1997.

[1] 
http://www.filewatcher.com/b/ftp/ftp.42.org/pub/OLD/m/mutt/old/orig/devel-0.html
-- 
Brandon Sandrowicz
:
: web = http://brandon.sandrowicz.org
: github  = http://github.com/bsandrow
: twitter = @bsandrow
: email   = bran...@sandrowicz.org


Re: Download multiple attachments at once

2013-07-30 Thread James Griffin
Mon 29.Jul'13 at 11:20:48 -0500, David Champion
 * On 28 Jul 2013, fe...@crowfix.com wrote:
   Today as I was saving about 20 photos I received from my sister,
   I thought I wonder if there is a way to save all of the images
   attached to an email in one swoop as opposed to hitting s for each
   one.  How do you guys manage attachments?
 
  I wrote this small script; invoke it by |muttrip dir.  It depends
  on having ripmime installed.  The followup .pl program merely builds
  a crude index.html file and reports how many files it found; you can
  skip it.
 
 Adding to this theme: I receive voice mail as wav attachments, but I
 don't view them through mutt.  I have a procmail rule that sends
 voicemail messages to a python script (attached).  This script saves all
 audio/* attachments to a designated location with a unique filename.  It
 could easily be adapted as an ad hoc bulk attachment filer.
 
 -- 
 David Champion • d...@bikeshed.us

David, out of curiosity, how do you get voicemail sent to your email
server? that sounds like a great idea. My mobile has no signal where i
live; if I could get my voicemail sent to my server that would be
fantastic! It also sounds complex??


Re: Download multiple attachments at once

2013-07-30 Thread David Champion
* On 30 Jul 2013, James Griffin wrote: 
 
 David, out of curiosity, how do you get voicemail sent to your email
 server? that sounds like a great idea. My mobile has no signal where i
 live; if I could get my voicemail sent to my server that would be
 fantastic! It also sounds complex??

I have home VoIP service, and the provider (Megapath, formerly known
as Speakeasy) has this as a built-in option.  I think you can do it
using Google Voice (as a wrapper around your home/mobile) as well, but I
haven't tried it.

-- 
David Champion • d...@bikeshed.us


Re: Download multiple attachments at once

2013-07-29 Thread David Champion
* On 28 Jul 2013, fe...@crowfix.com wrote:
  Today as I was saving about 20 photos I received from my sister,
  I thought I wonder if there is a way to save all of the images
  attached to an email in one swoop as opposed to hitting s for each
  one.  How do you guys manage attachments?

 I wrote this small script; invoke it by |muttrip dir.  It depends
 on having ripmime installed.  The followup .pl program merely builds
 a crude index.html file and reports how many files it found; you can
 skip it.

Adding to this theme: I receive voice mail as wav attachments, but I
don't view them through mutt.  I have a procmail rule that sends
voicemail messages to a python script (attached).  This script saves all
audio/* attachments to a designated location with a unique filename.  It
could easily be adapted as an ad hoc bulk attachment filer.

-- 
David Champion • d...@bikeshed.us
#!/usr/bin/env python

import os
import sys
import email
import email.parser
import errno

def extract(m):
n = 0
audio = []
for part in m.walk():
n += 1
if part.get_content_type().startswith('audio/'):
data = part.get_payload(decode=True)
params = dict(part.get_params())
if 'name' in params:
name = params['name']
else:
name = 'attachment%03d.wav' % n
fp = open(name, 'w')
fp.write(data)
fp.close()
audio.append(name)

return audio


def main(args):
os.chdir(os.path.dirname(sys.argv[0]))

p = email.parser.Parser()
m = p.parse(sys.stdin)
audio = extract(m)
for file in audio:
base, ext = os.path.splitext(file)
if '_' in base:
caller, date, timeofday = base.split('_')
dir = date[:6]
else:
dir = time.strftime('%Y%m')

try:
os.makedirs(dir)
except OSError, e:
if e.errno == errno.EEXIST:
pass
os.rename(file, os.path.join(dir, file))

if len(audio):
return 0

return 1


if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))


Re: Download multiple attachments at once

2013-07-28 Thread felix
On Sat, Jul 27, 2013 at 08:06:27AM +0900, John Niendorf wrote:

 Today as I was saving about 20 photos I received from my sister, I thought I 
 wonder if there is a way to save all of the images attached to an email in 
 one swoop as opposed to hitting s for each one.
 How do you guys manage attachments?

I wrote this small script; invoke it by |muttrip dir.  It depends on having 
ripmime installed.  The followup .pl program merely builds a crude index.html 
file and reports how many files it found; you can skip it.

The ripmime args are somewhat of a mystery to me, so I aperiodically change 
them :-)

 muttrip
#!/bin/sh

mkdir -p ~/muttrip/$1  ripmime -v -i - -d ~/muttrip/$1 --no-nameless 
--infix  $0.pl ~/muttrip/$1

 muttrip.pl
#!/usr/bin/perl

use warnings;
use strict;

# Args are dirs to process.

# Each dir is scanned for files and a rudimentary html file created with 
inline images and links for
# other files.

process_dir($_) foreach @ARGV;

exit 0;

sub process_dir {
my $dir = shift;
opendir(my $dh, $dir) or die $dir: $!;
my @files = grep { $_ !~ /^\.\.?$/ } readdir($dh);
closedir($dh) or die $dir: $!;
my @images = ();
my @others = ();
foreach my $file (sort @files) {
if (-d $dir/$file) {
process_dir($dir/$file);
next;
}
if ($file =~ /\.(gif|jpeg|jpg|png|tiff)$/i) {
push(@images, $file);
} else {
push(@others, $file);
}
}
next unless @images || @others;
my $index = 'index';
$index .= 'x' while grep { $_ eq $index.html } @others;
open(my $fh, '', $dir/$index.html) or die $dir/$index.html: $!;
my $title = $dir:  . @images . '/' . @others;
print $fh htmlheadtitle$title/head/title\nbody\n;
print $fh img src=\$_\ alt=\$_\ vspace=\5\br\n foreach 
@images;
print $fh a href=\$_\$_/abr\n foreach @others;
print $fh /body\n/html\n;
close $fh or die $dir/$index.html: $!;
print $title\n;
}

-- 
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
 Felix Finch: scarecrow repairman  rocket surgeon / fe...@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o


Re: Download multiple attachments at once

2013-07-27 Thread Dale Raby
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

You could make an archive of the files and call it something like
sisterphotos.tar.gz.  This is what I do when I am sending more than
two or three attachments.

This way you only have one file to attach.  The downside is that the
recipient must have appropriate knowledge/software to unpack the
archive. Applications like Fileroller and G-zip come to mind, but
there are command line tools that accomplish the same thing.

On 07/26/2013 06:06 PM, John Niendorf wrote:
 Hi Mutt-folks,
 
 Today as I was saving about 20 photos I received from my sister, I 
 thought I wonder if there is a way to save all of the images
 attached to an email in one swoop as opposed to hitting s for each
 one. How do you guys manage attachments?
 


- -- 
Dale A. Raby

Buy My Book: 777 Bon Mots for Gunslingers and Other Real Men

Available at Amazon, Google Books, Barnes  Noble, Book Tango, and
other online book stores.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHz7H0ACgkQq4gfK1twdnfuGQCgz9qhGpgpg4CGPDcUFfTFRjQc
kJoAnicvf7OEA/mm8OgwoO4cyTeB/Beb
=LdjE
-END PGP SIGNATURE-


Download multiple attachments at once

2013-07-26 Thread John Niendorf

Hi Mutt-folks,

Today as I was saving about 20 photos I received from my sister, I thought I 
wonder if there is a way to save all of the images attached to an email in one 
swoop as opposed to hitting s for each one.
How do you guys manage attachments?

--
John


Re: Download multiple attachments at once

2013-07-26 Thread Charles Cazabon
John Niendorf j...@jfniendorf.org wrote:
 
 Today as I was saving about 20 photos I received from my sister, I thought I
 wonder if there is a way to save all of the images attached to an email in
 one swoop as opposed to hitting s for each one.  How do you guys manage
 attachments?

On the list of attachments, tag them all, then tag-save.  You'll be prompted
for filenames for each one, but you can just hold the enter key to use the
defaults for each.

Charles
-- 
---
Charles Cazabon
GPL'ed software available at:   http://pyropus.ca/software/
---


Re: Download multiple attachments at once

2013-07-26 Thread John Niendorf

Thanks for the really useful tip Charles.


Today as I was saving about 20 photos I received from my sister, I thought I
wonder if there is a way to save all of the images attached to an email in
one swoop as opposed to hitting s for each one.  How do you guys manage
attachments?


On the list of attachments, tag them all, then tag-save.  You'll be prompted
for filenames for each one, but you can just hold the enter key to use the
defaults for each.

Charles


--
John