Skip to content
프로젝트

xob0t/Google-Photos-Toolkit

GitHub에서 보기

소개

Google 포토 라이브러리를 필터링, 검색, 정리하거나 삭제하는 사용자 스크립트

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+4
in 7 days
+17
in 15 days
+29
in 1 month
+70

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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 Tampermonkey userscript manager for your browser
    • If you're on Android, try Firefox, it supports Tampermonkey
  2. Click Install
  3. Accept installation

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

Identify media not in any albums

Select all albums in the Exclude albums filter, then use appropriate action.

Identifying duplicates/similar images

Use Similarity filter with action Add to new album Media with similar thumbnails will be added to the 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.
It's much more powerful than the UI!

Example usage. Scan the whole library for media owned by ownerName and move it to trash if found.

let nextPageId = null;
const ownerName = 'John';
do {
  const page = await gptkApi.getItemsByUploadedDate(nextPageId);
  for (const item of page.items) {
    if (item.isOwned) continue;
    const itemInfo = await gptkApi.getItemInfoExt(item.mediaKey);
    console.log(`${item.mediaKey} is shared by ${itemInfo.owner.name}`);
    if (itemInfo.owner.name == ownerName) {
      await gptkApi.moveItemsToTrash([itemInfo.dedupKey]);
      console.log(`${item.mediaKey} moved to trash`);
    }
  }
  nextPageId = page.nextPageId;
} while (nextPageId);
console.log('DONE');

Contributions welcome

If you want to learn more about how GP's api works, read https://kovatch.medium.com/deciphering-google-batchexecute-74991e4e446c
I just found this post, after doing all the work from zero :D

Also, i've made a userscript that parses all responses and logs them to console in a more readable way, you can find it here - https://github.com/xob0t/Google-Photos-Toolkit/tree/main/tools

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

My Other Google Photos Projects

♥

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

BTC 12znTocLytrrYhQT4AJVeJdR8KTULWbKb7
BTC Cash qq7w48d6s3rddgxshl6ae48k7c5jyck76crvppqenn
DOGE DQjBzT2qMuXkLMawUXG7umTf3k9VeT4Y6K
Etherium 0xcfe559D9F6056F82a6CFdEDA51c00132035955c8
Litecoin ltc1qcgc873py5k28qm85sk5d53yfwzle4cztmvkh6l

관련 프로젝트 살펴보기

불러오는 중…