Skip to content

Instantly share code, notes, and snippets.

@pseudo-projects
pseudo-projects / gmail-total-unread-emails-multi-pi-oled.py
Last active August 1, 2019 22:14
Get the total unread email message count summed from multiple Gmail accounts via the gmail api and display it on an OLED connected to your Raspberry Pi..
from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import Adafruit_GPIO.SPI as SPI
import Adafruit_SSD1306
@pseudo-projects
pseudo-projects / plex_imdb_top_250_collection.py
Created July 28, 2019 22:48 — forked from JonnyWong16/plex_imdb_top_250_collection.py
Automatically create an IMDB Top 250 collection in Plex using an existing movie library
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#
# Automated IMDB Top 250 Plex collection script by /u/SwiftPanda16
#
# *** Use at your own risk! ***
# *** I am not responsible for damages to your Plex server or libraries. ***
#
#------------------------------------------------------------------------------
@pseudo-projects
pseudo-projects / gmail-total-unread-emails-multi.py
Last active July 22, 2019 22:13
Get the total unread email message count via the gmail api and forward to MQTT (example for multiple gmail accounts).
from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import paho.mqtt.client as paho
### BEGIN Editable Vars
GMAIL_QUERY_ARGS = "label:unread category:primary"