Skip to content

Instantly share code, notes, and snippets.

View davidedelpapa's full-sized avatar

Davide Del Papa davidedelpapa

View GitHub Profile
import json
import tkinter
from gphotospy import authorize
from gphotospy.media import *
# the following file is available as a gist here:
# https://gist.github.com/davidedelpapa/2c9a0d2a3e0eada5782aeda93a90c0fa
from video_show import ImgVideoCapture, VideoApp
# Select secrets file
CLIENT_SECRET_FILE = "gphoto_oauth.json"
@davidedelpapa
davidedelpapa / video_show.py
Created May 26, 2020 17:46
Tkinter, Pillow, opencv, and gPhotoSpy to view a video from Google Photos in a Tk canvas
import PIL.ImageTk
import PIL.Image
import time
import cv2
import tkinter
class ImgVideoCapture:
def __init__(self, video_url):
# gets the video from the url as a VideoCapture wrapper
@davidedelpapa
davidedelpapa / tutorial_gphotospy_01_tk.py
Created May 15, 2020 08:46
First tutorial for gphotospy using Tk
import io
import base64
from tkinter import *
from urllib.request import urlopen
from gphotospy import authorize
from gphotospy.media import *
from gphotospy.album import *
from PIL import ImageTk, Image
# Select secrets file