[ { filter: { and: [ { to: me }, { from: ‘[email protected]’ }, { not: spam }, ] This utility helps you generate and maintain Gmail filters in a declarative way. It has a (Jsonnet) configuration file that aims to be simpler to write and maintain than using the Gmail web interface, to categorize, label, archive and manage your inbox automatically.
[‘news’] (Motivation) If You have Gmail and have to maintain (like me) a lot of filters, because you want to apply labels, get rid of spam or categorize your emails, then you probably have (like me) a very long list of messy filters. Then the day when you actually want to understand why a certain message got labeled in a certain way comes. You scroll through that horrible mess, you wish you could find-and-replace stuff, check the change before applying it, refactor some filters together … in a way treat them like you treat your code! Gmail allows to import and export filters in XML format. This can be used to maintain them in some better way … but dear Lord, no! Not by hand! That’s what most other tools do: providing some kind of DSL that generate XML filters that can be imported in your settings … by hand [this is the approach of the popularantifuchs/gmail-britta forexample]. Gmail happens to have also a neat API that we can use to automate the import step as well, so to eliminate all manual, slow tasks to be done with the Gmail settings. This project then exists to provide to your Gmail filters: (Maintainability; [ /… */ ] An easy to understand, declarative, composable language;
- A builtin query simplifier, to keep the size of your filters down (Gmail has a limit of (chars per filter); Ability to review your changes before applying them; Automatic update of the settings (no manual import) in seconds. [‘news’] (Install) Make sure to setup your ($ GOPATH) correctly, including the (bin) (subdirectory in your ($ PATH) . go get -u github.com/mbrt/ gmailctl / cmd / gmailctl go install github.com/mbrt/gmailctl/cmd/gmailctl gmailctl init The init will guide you through setting up the Gmail APIs and update your settings without leaving your command line.
GIPHY App Key not set. Please check settings