Code Monkey home page Code Monkey logo

macos-photo-scripts's Introduction

MacOS Photo Scripts

A growing collection of scripts meant to improve photo workflows on the mac and shine dim light on the mysteries of Photos.app.

Further explanation, discussion, and excuses offered in the blog posts associated with each tool and linked below.

photos2spotlight.py

Recent versions of Photos.app classify pictures into 1,000+ categories (4000+ if you include synonyms). photos2spotlight.py duplicates these category tags in filesystem metadata, where Spotlight can index them.

alternative-classifiers.py

Builds a 2nd photos database with tags from 3rd-party image classifiers as well as the Photos.app database. Intended to facilitate easy comparisons of image classification services, and expanded xattr tagging (for spotlight search).

NOTE: Stopping Photolibraryd

In a perfect world, you could reliably stop photolibraryd with launchctl, but this is hit or miss in my experience.

[...]$ launchctl stop photolibraryd
[...]$ echo $?
3

And you'd be able to unload the photolibraryd service without disabling SIP.

[...]# launchctl unload  /System/Library/LaunchAgents/com.apple.photolibraryd.plist
/System/Library/LaunchAgents/com.apple.photolibraryd.plist: Operation not permitted while System Integrity Protection is engage

But you cant't. Here is a dubious method for stopping photolibraryd, which is at least effective. Assumes $photodb is set to your photos.db

[...]$ chmod -w "$photodb"
[...]$ lsof "$photodb" | 
  awk '{ print $2}'    | 
  egrep -v PID         | 
  xargs kill

(Don't forget to restore write permissions when you're done!)

macos-photo-scripts's People

Contributors

28mm 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.