GithubHelp home page GithubHelp logo

abhishekkr / gmail-helper Goto Github PK

View Code? Open in Web Editor NEW
413.0 9.0 14.0 62 KB

it will contain different utilities for GMail API over OAuth2

License: Other

Python 98.91% Shell 1.09%
python3 python gmail gmail-api gmail-login google-api-client-library client gmail-client

gmail-helper's Introduction

gmail-helper

to allow helpful GMail tasks over OAuth2 API using Google's API Client

details on how to get credentials json are here

Capabilities

  • Permanently delete mails based on search criteria allowed by GMail such as partial match of subject, to or from e-mail address fields (also allowing just domain match). Ran for a range of years provided by config as since_year and before_year.

by default it reads mails first and stores it locally (except attachments) in a sqlite DB separated by year of mail, then deletes

How to use: python3 delete-mails.py ./config-yamls/delete-mails-config.yaml

GMail API doc: developers.google.com/gmail/api/v1/reference/users/messages/delete

result after a recent run

Google storage freed by 9%

  • Fetch created GMail Labels and persist to a local DB

How to use: python3 get-labels.py ./config-yamls/get-labels-config.yaml

  • Get all GMail filters
  • persisted in db: python3 get-labels.py ./config-yamls/get-filters-config.yaml

  • exported to json in configured dir filters_json_basepath with adding switch --to-json to above command

  • Create a new/overwrite GMail filter

ToDo

  • offline backup of mails (all/filtered) into local SQLite3 db file; not of attachments

  • send mails from a custom template to a list of receivers

  • check recent mails for a specific mail, act as desired if received


For Contributors


gmail-helper's People

Contributors

abhishekkr avatar janmechtel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmail-helper's Issues

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.