extract images from mail account

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

extract images from mail account

Herr Oswald
Hi friends,

does evolution have a feature which can extract all images attached or
embedded from a number of selected messages? - I couldnt find such...

What I could find is a py script which should do the job from a mbox
file - which would be perfect for me:

http://www.chuck-jackson-photos.com/mboxattachments/

But it does not run on my machine (ubuntu 18.04), when executing, it
throws this error - with python 2.7 as well as 3.6:

$ mboxattachments --exportpath images rollentausch.mbox
Traceback (most recent call last):
  File "/usr/local/bin/mboxattachments", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/wd/.local/lib/python3.6/site-
packages/pkg_resources/__init__.py", line 3112, in <module>
    @_call_aside
  File "/home/wd/.local/lib/python3.6/site-
packages/pkg_resources/__init__.py", line 3096, in _call_aside
    f(*args, **kwargs)
  File "/home/wd/.local/lib/python3.6/site-
packages/pkg_resources/__init__.py", line 3125, in
_initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/wd/.local/lib/python3.6/site-
packages/pkg_resources/__init__.py", line 578, in _build_master
    ws.require(__requires__)
  File "/home/wd/.local/lib/python3.6/site-
packages/pkg_resources/__init__.py", line 895, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/wd/.local/lib/python3.6/site-
packages/pkg_resources/__init__.py", line 781, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mboxattachments==0.5.35'
distribution was not found and is required by the application

Can somebody give me a useful hint?

Cheers,
Wolf



_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: extract images from mail account

Gnome Evolution - General mailing list
On Mon, 2020-06-01 at 18:34 +0200, Herr Oswald wrote:
> does evolution have a feature which can extract all images attached
> or embedded from a number of selected messages? - I couldnt find
> such...

        Hi,
you want to extract it in what manner, please? If just remove (and
discard) it, possibly to save disk space, then in the menu
Message->Remove Attachments, which works on the selection. If you want
to save the attachments anywhere, then no, Evolution doesn't have any
such feature.
        Bye,
        Milan

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: extract images from mail account

Ángel González
In reply to this post by Herr Oswald
On 2020-06-01 at 18:34 +0200, Herr Oswald wrote:
> pkg_resources.DistributionNotFound: The 'mboxattachments==0.5.35'
> distribution was not found and is required by the application
>
> Can somebody give me a useful hint?
>
> Cheers,
> Wolf

The error suggests the python package wasn't installed properly, since
it is complaining it cannot find itself.

Once you make it work, it currently only deals with mbox files, but it
is easy to make it work with Maildirs, the code is "almost there". Just
a couple of lines to create a mailbox.Maildir instead of a mailbox.mbox.
See the attached patch.

I'm copying the upstream author so he can integrate the change into the
module.

Best regards



_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list

mboxattachments-maildir.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: extract images from mail account

Herr Oswald
> The error suggests the python package wasn't installed properly,
> since
> it is complaining it cannot find itself.

Hello, thank you very much for your attention.

I'm not aware to have changed anything with my vanilla ubuntu setup of
python, exept I activated python3 instead of py2.

So I tried apt install --reinstall python3, but the script's error
messages are the same.

To learn more, I ran 'python -m test' and got the result

$ 9 tests failed:
    test_builtin test_dict test_doctest test_doctest2 test_exceptions
    test_grammar test_opcodes test_types test_unittest

Can this be (part of the) problem? -
So what can I do with it?
Or how else could I fix the python install?

Cheers and many thanks,
Wolf


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: extract images from mail account

Andre Klapper
On Tue, 2020-06-02 at 09:36 +0200, Herr Oswald wrote:
> $ 9 tests failed:
>     test_builtin test_dict test_doctest test_doctest2 test_exceptions
>     test_grammar test_opcodes test_types test_unittest
>
> Can this be (part of the) problem? -

Anything could be...

> So what can I do with it?
> Or how else could I fix the python install?

Best by asking in a support forum of your distribution. Or Python.
As this has nothing to do with Evolution.

Thanks,
andre
--
Andre Klapper  |  [hidden email]
https://blogs.gnome.org/aklapper/


_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list
Reply | Threaded
Open this post in threaded view
|

Re: extract images from mail account

Herr Oswald
> Best by asking in a support forum of your distribution. Or Python.
> As this has nothing to do with Evolution.

True. I set up ubuntu 20 on a virtual machine and the script works well
there - must be some chaos in my python setup.

Anyway - the script works and is useful for me; hopefully somebody can
make use of it as well.

Thanks for your thoughts and attention,
Wolf

_______________________________________________
evolution-list mailing list
[hidden email]
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list