HackerTrans
TopNewTrendsCommentsPastAskShowJobs

rhettbull

no profile record

comments

rhettbull
·6 ay önce·discuss
Glad it's useful for you!
rhettbull
·6 ay önce·discuss
> As far as I know, this is the only tool that restores albums and correctly round-trips all Photos item types while preserving location data, creation dates, and modification dates when restoring back into Photos.

My free open source tool osxphotos [1] does this. In addition to an "osxphotos export" command to create archival exports with all metadata, it also has an "osxphotos import" command that can restore all metadata including albums (with exception of named persons/face regions, though persons can be converted into keywords on import). It can also read XMP sidecar files to restore metadata from those. It's a CLI and definitely a power user tool.

It also includes an "osxphotos sync" command that can sync metadata between two libraries. Some people use this to sync metadata like favorites from iPhone library to the Mac library. (can't go the other way unfortunately)

[1] https://github.com/RhetTbull/osxphotos
rhettbull
·2 yıl önce·discuss
Check out Textinator [0] which is an open source macOS app that watches for screenshots and automatically does text detection then copies text to clipboard. (Disclaimer: I'm the author). It works on macOS 10.15+

[0]: https://github.com/RhetTbull/textinator
rhettbull
·2 yıl önce·discuss
For macOS users, I'm the author of Textinator [0] a similar utility for macOS that uses Apple's Vision framework [1] for doing the OCR natively. Modern versions of macOS (since Sonoma) have a similar ability to copy text from images using the Live Text feature [2] but Textinator works on macOS Catalina and later and simplifies the "take screenshot, copy text to clipboard" workflow. It's also an example of how to build a native macOS app entirely in Python.

[0]: https://github.com/RhetTbull/textinator

[1]: https://developer.apple.com/documentation/vision?language=ob...

[2]: https://support.apple.com/guide/preview/interact-with-text-i...
rhettbull
·2 yıl önce·discuss
I've created a similar tool in python that I find quite useful: https://github.com/RhetTbull/dirsnapshot This doesn't compute content hashes as your tool does but is designed to highlight files added, removed, or changed and I use it primarily for reverse engineering projects. One key feature is it can store the snapshot in a sqlite snapshot database that doesn't take much space then you can compare the directory against the stored snapshot database at some point in the future. Diffs are computed based on stat() info: mode, ownership, size, mtime. In addition to a CLI it also provides a python API so you can use it directly in your own code.
rhettbull
·3 yıl önce·discuss
> Any method that I've found to clean them up (exporting the originals, deleting them from the library, and then re-importing the JPEGs only seems easiest) will lose all of the years of metadata that I've built up in the library.

The open source tool osxphotos (https://github.com/RhetTbull/osxphotos) can help with this. You can export the JPEG images while preserving metadata using the thrid-party exiftool utility:

`osxphotos export /path/to/export --has-raw --skip-raw --exiftool`

This exports all images that have a raw pair but skips the raw component then uses exiftool (https://exiftool.org/) to write the metadata (keywords, etc.) to the exported JPEG files. You can then re-import these into photos either by dragging them or by running `osxphotos import /path/to/export/*`

Both the export and import commands have many other options for controlling export directory, etc. `osxphotos help export` or `osxphotos docs` to open docs in browser. (Disclaimer: I'm the author of osxphotos)
rhettbull
·3 yıl önce·discuss
Yes, `osxphotos show UUID` will open the photo with UUID in the Photos app. (I'm the author of osxphotos)
rhettbull
·3 yıl önce·discuss
https://github.com/RhetTbull/osxphotos will do this:

osxphotos query --min-size 100MB --add-to-album "Big Files"

Finds all photos, videos > 100MB and adds them to the album "Big files"

`osxphotos query --help` for more info or `osxphotos docs` to open docs in the browser.

Disclaimer: I'm the author.
rhettbull
·3 yıl önce·discuss
I'm the author of the osxphotos[0] tool mentioned in the article. For photos in an Apple Photos library, osxphotos gives you access to a rich set of metadata beyond what's in the actual EXIF/IPTC/XMP of the image. Apple performs object classification and other AI techniques on your images but generally doesn't expose this to the user. For example, photos are categorized as to object in them (dog, cat, breed of dog, etc.), rich reverse geolocation info (neighborhood, landmarks, etc.) and an interesting set of scores such as "overall aesthetic", "pleasant camera tilt", "harmonious colors", etc. These can be queried using osxphotos, either from the command line, or in your own python code. (Ref API docs[1])

For example, to find your "best" photos based on overall aesthetic score and add them to the album "Best Photos" you could run:

osxphotos query --query-eval "photo.score.overall > 0.8" --add-to-album "Best Photos"

To find good photos with trees in them you could try something like:

osxphotos query --query-eval "photo.score.overall > 0.5" --label Tree --add-to-album "Good Tree Photos"

There's quite a bit of other interesting data in Photos that you can explore with osxphotos. Run `osxphotos inspect` and it will show you all the metadata for whichever photo is currently selected in the Photos app.

[0] https://github.com/RhetTbull/osxphotos [1] https://rhettbull.github.io/osxphotos/
rhettbull
·3 yıl önce·discuss
Very nice reverse engineering work! I wrote a python library and CLI that does something similar but interacts with Notes via Scripting Bridge: https://github.com/RhetTbull/macnotesapp
rhettbull
·3 yıl önce·discuss
I'm the author of python library & command line tool, https://github.com/RhetTbull/macnotesapp, that will allow you to use Markdown to create (but not yet edit) notes from the Terminal. I use Vim + markdown to create notes all the time: `notes add -m -e` adds a new note using Markdown by opening the default editor.
rhettbull
·3 yıl önce·discuss
https://github.com/RhetTbull/osxphotos

A macOS command-line "multi-tool" for working with Apple Photos. Allows you to export photos (along with all the metadata), batch-edit metadata such as times and timezones, explore the AI metadata Apple computes for each photo (but doesn't make available to the user) such as "well timed shot", "pleasant composition", etc, compare libraries, sync metadata between libraries, and much more! It's written in python and provides a full python API for interacting with Photos.
rhettbull
·4 yıl önce·discuss
I'm the author of osxphotos. Glad you found it useful!