GithubHelp home page GithubHelp logo

gmailfilters's Introduction

gmailfilters

A tool for managing your GMail filters that has two tricks:

  1. You can manage your filters as a YAML file, which has substantially less markup than the XML export from GMail
  2. You can specify multiple labels for a filter, and gmailfilters will automatically expand that into multiple filters, each applying a single label.

For example, if you have:

- from: [email protected]
  label: gmail awesome redhat

You will get, in your generated XML, something like:

<entry>
  <title>Mail Filter</title>
  <category term="filter"/>
  <updated>2017-06-26T15:28:31.018961</updated>
  <content/>
  <app:property name="from" value="[email protected]"/>
  <app:property name="label" value="gmail"/>
</entry>
<entry>
  <title>Mail Filter</title>
  <category term="filter"/>
  <updated>2017-06-26T15:28:31.018961</updated>
  <content/>
  <app:property name="from" value="[email protected]"/>
  <app:property name="label" value="awesome"/>
</entry>
<entry>
  <title>Mail Filter</title>
  <category term="filter"/>
  <updated>2017-06-26T15:28:31.018961</updated>
  <content/>
  <app:property name="from" value="[email protected]"/>
  <app:property name="label" value="redhat"/>
</entry>

Do this once (optional)

Export your GMail filters to XML:

  1. Go to Settings -> Filters and Blocked Addresses
  2. At the bottom of the filter list, click "All" to select all filters
  3. Click the "Export" button to save your filters

Convert your filters to YAML:

gmailfilters --fromxml mailFilters.xml -o mailFilters.yml

Do this whenever you want to update your filters

Make changes to your YAML document (e.g. mailFilters.yml).

Convert your filters to XML:

gmailfilters --toxml mailFitlers.yml -o mailFilters.xml

Delete your existing filters in GMail:

  1. Go to Settings -> Filters and Blocked Addresses
  2. At the bottom of the filter list, click "All" to select all filters
  3. Select "Delete" to delete the filters.

Import your filters into GMail:

  1. Go to Settings -> Filters and Blocked Addresses
  2. At the bottom of the filter list, select "Import filters"
  3. Select "Choose File" and navigate to your generated XML filters.
  4. Select "Open file"
  5. Scroll to the bottom of the list of filters and select "Create filters"

gmailfilters's People

Contributors

larsks avatar zenguine avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.