gmailfilters

A tool to sync Gmail filters from a config file to your account.

  • 所有者: jessfraz/gmailfilters
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

gmailfilters

Travis CI
GoDoc
Github All Releases

A tool to sync Gmail filters from a config file to your account.

NOTE: This makes it so the single configuration file is the only way to
add filters to your account, meaning if you add a filter via the UI and do not
also add it in your config file, the next time you run this tool on your
outdated config, the filter you added only in the UI will be deleted.

Table of Contents

Installation

Binaries

For installation instructions from binaries please visit the Releases Page.

Via Go

$ go get github.com/jessfraz/gmailfilters

Usage

$ gmailfilters -h
gmailfilters -  A tool to sync Gmail filters from a config file to your account.

Usage: gmailfilters <command>

Flags:

  -d, --debug       enable debug logging (default: false)
  -e, --export      export existing filters (default: false)
  -f, --creds-file  Gmail credential file (or env var GMAIL_CREDENTIAL_FILE) (default: <none>)
  -t, --token-file  Gmail oauth token file (default: /tmp/token.json)

Commands:

  version  Show the version information.

Example Filter File


query = "to:your_activity@noreply.github.com"
archive = true
read = true


query = "from:notifications@github.com LGTM"
label = "github/LGTM"


query = """
(-to:team_mention@noreply.github.com \
(from:(notifications@github.com) AND (@jfrazelle OR @jessfraz OR to:mention@noreply.github.com OR to:author@noreply.github.com OR to:assign@noreply.github.com)))
"""
label = "github/mentions"


query = """
to:team_mention@noreply.github.com \
-to:mention@noreply.github.com \
-to:author@noreply.github.com \
-to:assign@noreply.github.com
"""
label = "github/team-mention"


query = """
from:notifications@github.com \
-to:team_mention@noreply.github.com \
-to:mention@noreply.github.com \
-to:author@noreply.github.com \
-to:assign@noreply.github.com
"""
archive = true


query = "(from:me AND to:reply@reply.github.com)"
label = "github/mentions"


query = "(from:notifications@github.com)"
label = "github"


queryOr = [
"to:plans@tripit.com",
"to:receipts@concur.com",
"to:plans@concur.com",
"to:receipts@expensify.com"
]
delete = true


queryOr = [
"from:notifications@docker.com",
"from:noreply@github.com",
"from:builds@travis-ci.org"
]
label = "to-be-deleted"


query = "drive-shares-noreply@google.com OR (subject:\"Invitation to comment\" AND from:me ) OR from:(*@docs.google.com)"
label = "to-be-deleted"


query = "(from:(-me) {filename:vcs filename:ics} has:attachment) OR (subject:(\"invitation\" OR \"accepted\" OR \"tentatively accepted\" OR \"rejected\" OR \"updated\" OR \"canceled event\" OR \"declined\") when where calendar who organizer)"
label = "to-be-deleted"


query = "list:coreos-dev@googlegroups.com"
label = "Mailing Lists/coreos-dev"
archiveUnlessToMe = true


queryOr = [
"list:xdg-app@lists.freedesktop.org",
"list:flatpak@lists.freedesktop.org"
]
label = "Mailing Lists/xdg-apps"
archiveUnlessToMe = true

Setup

Gmail

  1. Enable the API: To get started using Gmail API, you need to
    first create a project in the
    Google API Console,
    enable the API, and create credentials.

    Follow the instructions
    for step enabling the API here.

主要指標

概覽
名稱與所有者jessfraz/gmailfilters
主編程語言Go
編程語言Dockerfile (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2018-12-29 06:35:33
推送於2023-02-25 00:56:55
最后一次提交2020-09-17 14:16:20
發布數1
最新版本名稱v0.0.0 (發布於 2018-12-29 03:17:48)
第一版名稱v0.0.0 (發布於 2018-12-29 03:17:48)
用户参与
星數554
關注者數14
派生數33
提交數41
已啟用問題?
問題數11
打開的問題數7
拉請求數2
打開的拉請求數8
關閉的拉請求數5
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?