xob0t / Google-Photos-Toolkit

Userscript to filter, search, organize, or delete your Google Photos library
MIT License
78 stars 3 forks source link
bulk-operation google-photos javascipt mass-delete organize userscript

GitHub Downloads (all assets, all releases)

Google Photos Toolkit

Bulk organize your media

demo

How It Works

In your browser, utilizing GP's undocumented web api

How To Install

  1. Install any recommended userscript manager for your browser

  2. Click Install

  3. Accept installation

How to use

Tutorial 1. Go to [photos.google.com](https://photos.google.com/) and click the GPTK icon in the top bar to open it ![demo](media/tutorial/step0.png) 2. Select a source from which to read from: ![demo](media/tutorial/step1.png) 3. Use Filters to filter found items with: ![demo](media/tutorial/step2.png) 4. Select an action to apply to found items: ![demo](media/tutorial/step3.png)

Finding space-consuming media

This example groups all space-consuming media in one album.

  1. Make sure "Library" is the selected source
  2. Select SPACE-CONSUMING in the Space filter
  3. Select action Add to new album

    Deleting all media in the library

    As simple as selecting "Library" source, clicking Move to trash, then clearing it.

    Use GPTK's api

    GPTK exports it's api class globally so you can use it in your browser's console.

    Example usage.

    // getting the fist page of the library by taken date
    const libraryPage = await gptkApi.getItemsByTakenDate()
    // getting the info of the first item on the page
    const itemInfo = await gptkApi.getItemInfo(libraryPage.items[0].mediaKey)
    console.log(itemInfo)

BUGS

If something does not work, open an issue and describe it in detail

If you have a question, open a discussion

Credits

Borrowed some code and UI inspiration from undiscord

If GPTK is useful to you, please consider supporting the project:

Steam

BTC 12znTocLytrrYhQT4AJVeJdR8KTULWbKb7