{"id":20134241,"url":"https://github.com/japlscript/japlphoto","last_synced_at":"2025-08-12T02:41:03.278Z","repository":{"id":57727424,"uuid":"407505877","full_name":"japlscript/japlphoto","owner":"japlscript","description":"Java API for Apple's Photos app","archived":false,"fork":false,"pushed_at":"2022-07-14T08:01:43.000Z","size":415,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T22:00:13.624Z","etag":null,"topics":["apple","applescript","japlscript","java","macos","photos"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/japlscript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-17T10:53:33.000Z","updated_at":"2022-06-22T22:49:00.000Z","dependencies_parsed_at":"2022-09-16T16:00:34.083Z","dependency_job_id":null,"html_url":"https://github.com/japlscript/japlphoto","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/japlscript/japlphoto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplphoto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplphoto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplphoto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplphoto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/japlscript","download_url":"https://codeload.github.com/japlscript/japlphoto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japlscript%2Fjaplphoto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269991265,"owners_count":24509004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","applescript","japlscript","java","macos","photos"],"created_at":"2024-11-13T21:07:54.992Z","updated_at":"2025-08-12T02:41:03.241Z","avatar_url":"https://github.com/japlscript.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![LGPL 2.1](https://img.shields.io/badge/License-LGPL_2.1-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/japlphoto/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/japlphoto)\n[![Build and Test](https://github.com/japlscript/japlphoto/workflows/Build%20and%20Test/badge.svg)](https://github.com/japlscript/japlphoto/actions)\n\n\n# Japlphoto\n\n*Japlphoto* is a Java API for the Apple Photos app (macOS) based on\n[JaplScript](https://github.com/japlscript/japlscript).\n\n\n## Installation\n\nJaplphoto is released via [Maven](https://maven.apache.org).\nYou can install it via the following dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tagtraum\u003c/groupId\u003e\n    \u003cartifactId\u003ejaplphoto\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nThe Maven artifacts also contain sources and javadocs. \n\nIf you are using [modules](https://en.wikipedia.org/wiki/Java_Platform_Module_System),\nits name is `tagtraum.japlphoto`.\n\n\n## Usage\n                           \nTo use the generated code, do something like this:\n\n```java\nimport com.tagtraum.macos.photos.Application;\n\npublic class AllAlbumNames {\n\n    public static void main(final String[] args) {\n        // get application\n        final Application application = Application.getInstance();\n        // get albums\n        final Album[] albums = application.getAlbums();\n        \n        for (final Album album : albums) {\n            // print name and size\n            System.out.println(album.getName() + \", size=\" + album.countMediaItems());\n        }\n    }\n}\n```\n\n## API\n\nYou can find the complete [API here](https://japlscript.github.io/japlphoto/com/tagtraum/macos/photos/package-summary.html). \n\n\n## AppleScript Sandbox\n\nSince macOS 10.14 (Mojave), Apple imposed a sandbox on AppleScript. Therefore\nyou may see dialog boxes requesting authorization to perform certain actions.\nAfter a while, these boxes simply disappear and there does not seem to be an easy\nway to authorize your app. In this case, you need to open the system preferences,\nnavigate to *Security \u0026 Privacy*, *Privacy*, and then *Automation*, and make\nsure your app is allowed to remote control whatever app you are trying to remote\ncontrol (see also [this article](https://blog.beatunes.com/2018/10/beatunes-on-mojave-and-windows-10-dark.html)).\n\nIf you are shipping a real app with a UI and not just a command line tool, you\nneed to customize the sandbox permission dialog. You can do so by adding\nthe key `NSAppleEventsUsageDescription` to your app bundle's `/Contents/Info.plist`\nfile. For example:\n\n    [...]\n    \u003ckey\u003eNSAppleEventsUsageDescription\u003c/key\u003e\n    \u003cstring\u003eSuperMusic uses AppleEvents to access your Music.app library,\n            e.g., to set BPM values or create playlists.\u003c/string\u003e\n    [...]\n\nApple's documentation for the keyword is [here](https://developer.apple.com/documentation/bundleresources/information_property_list/nsappleeventsusagedescription).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaplscript%2Fjaplphoto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaplscript%2Fjaplphoto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaplscript%2Fjaplphoto/lists"}