GithubHelp home page GithubHelp logo

antonpolishko / find-missing-photo-references Goto Github PK

View Code? Open in Web Editor NEW

This project forked from msolnit/find-missing-photo-references

0.0 3.0 0.0 1 KB

Identifies "broken references" in the macOS Photos library.

Shell 100.00%

find-missing-photo-references's Introduction

Introduction

This script was inspired by the Stack Exchange question, Is there someway to get a list of all missing photos from the photo library?

I had the same question, and it turns out that the photo library is backed by a SQLite database under the covers. You can find it at <photo library root>/database/photos.db. There's a table called RKMaster, with a row for every photo, and a column called fileIsReference that tells you whether the photo is "external" or not. It's relatively straightforward to script a solution from there.

Usage

The script does not require any parameters. You can simply run:

./find-missing-photo-references

If it finds any broken links, then it will produce output like the following:

/Users/msolnit/Pictures/beach.jpg is missing.
/Users/msolnit/Pictures/cow.jpg is missing.
/Users/msolnit/Pictures/kitten.jpg is missing.

If there are no broken links, then the script is silent (does not produce any output).

Warning

The photos.db schema is not part of any public Apple documentation, so this script may break any at any time due to minor (or major) software updates. No guarantees are made about its safety, etc. etc. But it works fine for me.

find-missing-photo-references's People

Watchers

 avatar  avatar  avatar

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.