Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible plugin API that allows to process entire message #577

Merged
merged 2 commits into from
Oct 18, 2018

Conversation

larskotthoff
Copy link
Contributor

See #571. These changes add a plugin API that passes the file name of the message to the do_process method of the plugin and expects a GMimeStream back -- this allows for arbitrary preprocessing of the message, including headers.

Example use case: add plain text part to HTML-only messages so that they can be quoted better when replying.

Copy link
Member

@gauteh gauteh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

@gauteh gauteh merged commit aeb2ce6 into astroidmail:master Oct 18, 2018
@gauteh
Copy link
Member

gauteh commented Oct 18, 2018 via email

@larskotthoff
Copy link
Contributor Author

Will do; I'll also add an example plugin.

@gauteh
Copy link
Member

gauteh commented Oct 18, 2018 via email

@larskotthoff
Copy link
Contributor Author

I've added a short description to the wiki and put an example plugin at https://github.com/larskotthoff/astroid-processing-plugin. Could you add that to the plugins repo please?

@gauteh
Copy link
Member

gauteh commented Oct 18, 2018 via email

@larskotthoff
Copy link
Contributor Author

I'm getting

gi.RepositoryError: Requiring namespace 'GMime' version '3.0', but '2.6' is already loaded

when I change it to 3.0. Any ideas what's going on there?

@gauteh
Copy link
Member

gauteh commented Oct 18, 2018 via email

@larskotthoff
Copy link
Contributor Author

No other plugins. At least I'm not running anything explicitly; maybe astroid is loading a plugin that ships with it implicitly?

@gauteh
Copy link
Member

gauteh commented Oct 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants