A python package to manage and automate your personal Gmail account.
Project description
Salty Gmailer
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for salty_gmailer-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3e4924935d7971a20d9a3c6d41a7906877d4087680e1d32c0f4d0a84c861899 |
|
MD5 | 79ec56d5821cfd3ba636bc1397b3fbd3 |
|
BLAKE2b-256 | 2c74d429d6151e06e30618cda48c4a3c4238ff04adf57eb5cf4e30bb9e4b19e7 |