Skip to main content

A python package to manage and automate your personal Gmail account.

Project description

Salty Gmailer

GitHub release (with filter)

Salty Gmailer is a configuration based Gmail automation tool. Configuration is based off of YAML files that utilize the Gmail search query (q=...) and the addition and subtraction of labels to manage emails.

See here for the library of search operators supported.

Usage

usage: gmailer [-h] [paths ...]

Configuration based automation for gmail.

positional arguments:
paths path containing the rule.yaml files

options:
-h, --help show this help message and exit

Currently, the only arguments are locations of YAML configuration files.

For example, if you YAML configuration files were in a relative path to your current location named rules, you would execute the program as gmailer ./rules

Configuration

See the following example of a YAML rule:

name: Trash
description: Sends messages to trash
search:
- older_than: 1m
- from: "github_ OR"
- from: notifications-noreply@linkedin.com
  add_labels:
- TRASH
  remove_labels:

Currently, name and description are for logging purposes only.

search takes a list of key/value pairs to filter email messages to act on. These are taken directly from the Gmail search query operators.

add_labels is a list of labels to add that match the search criteria, while its inverse remove_labels will remove labels that match any search criteria. This rule will find all emails older than 1 month that are from 'github_' or 'notifications-noreply@linkedin.com ' and adds the label 'TRASH' to any emails that match, trashing the emails.

TODO - Add Tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salty_gmailer-0.0.2.tar.gz (6.0 MB view hashes)

Uploaded Source

Built Distribution

salty_gmailer-0.0.2-py3-none-any.whl (7.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page