[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] various tidbits and helpers

From: Norman Shapiro
Subject: Re: [Nmh-workers] various tidbits and helpers
Date: Sat, 09 Dec 2006 11:07:56 -0800

(Sorry to bother the whole group with this; I can't get past FreeBSD.org's spam

Alexander Botero-Lowry <address@hidden> writes:
>So I wrote a
>simple Python script to replace ``remime'' lines with proper mhbuild lines
>and then execute mhbuild. remime is not very powerful, it's not intended to
>be. It takes a filename, and uses magic to determine a description and a
>mime-type and then constructs an mhbuild line with that information included.
>Something like #remime: /home/alex/mh.png becomes #image/png; name="mh.png"
><>[ PNG image data, 1400 x 1050, 16-bit/color RGB, non-interlaced ]
>/home/alex/mh.png. remime becomes the buildmimeproc.

I've been wanting something like that for years. Thank you very much for posting
it. It looks like it will improve the quality of my life.

>/You can take a look at
>remime here: http://people.FreeBSD.org/~alexbl/remime It requires the Python
>bindings for libmagic which come with the file distribution.

Unfortunately, I know little about python. I would very much appreciate your
telling me what the phrases "bindings for libmagic" and "the file distribution"
mean. More specifically can you tell me what I need to do to run remine. When I
try to run it I, not unexpectedly, get:

                File "./remine", line 3, in ?
          import magic
      ImportError: No module named magic

I'm running python-2.2.2-26.

Again, thank you very much.

    Norman Shapiro
    798 Barron Avenue
    Palo Alto CA 94306-3109
    (650) 565-8215

reply via email to

[Prev in Thread] Current Thread [Next in Thread]