{"id":19535614,"url":"https://github.com/miyako/4d-plugin-notes","last_synced_at":"2026-03-11T10:06:36.719Z","repository":{"id":147172398,"uuid":"46859900","full_name":"miyako/4d-plugin-notes","owner":"miyako","description":"Interact with the Notes app on macOS","archived":false,"fork":false,"pushed_at":"2024-05-01T07:43:31.000Z","size":25913,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T10:12:00.875Z","etag":null,"topics":["4d-plugin"],"latest_commit_sha":null,"homepage":"https://miyako.github.io/4d-plugin-notes/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyako.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-25T12:20:48.000Z","updated_at":"2024-08-27T04:43:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8d20850-1ebe-4d03-92e4-759d183af0a4","html_url":"https://github.com/miyako/4d-plugin-notes","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/miyako/4d-plugin-notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-notes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-notes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30377838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["4d-plugin"],"created_at":"2024-11-11T02:19:19.720Z","updated_at":"2026-03-11T10:06:36.694Z","avatar_url":"https://github.com/miyako.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-19%2B-5682DF)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm\u0026color=blue)\n[![license](https://img.shields.io/github/license/miyako/4d-plugin-notes)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-notes/total)\n\n# 4d-plugin-notes\n\nInteract with the Notes app on macOS\n\nSee [4d-utility-sign-app](https://github.com/miyako/4d-utility-sign-app) on how to enable the plugin in 4D.\n\n[Documentation](documentation.md)\n\n**Bug**: It is no longer possible to add an attachment in macOS Catalina.\n\nsee:\n\nhttps://hookproductivity.com/help2/integration/hook-and-macos-10-15-catalina-notes-app/\nhttps://forum.latenightsw.com/t/notes-app-scripting-dictionary-defective-on-catalina/2136\n\n```applescript\ntell application \"Notes\"\n  note id \"x-coredata://2BB27C30-9D8D-4501-8ADD-D16531CA22F5/ICNote/p51\"\n  (*\n  returns:\n  show id \"x-coredata://2BB27C30-9D8D-4501-8ADD-D16531CA22F5/ICNote/p51\" of application \"Notes\"\n  it is not possible to use this as a specifier; bummer! (error 1700)\n  *)\n  \nend tell\n```\n\n## Important\n\nThis version uses [``AEDeterminePermissionToAutomateTarget``](https://developer.apple.com/documentation/coreservices/3025784-aedeterminepermissiontoautomatet?language=objc) from the 10.14 SDK\n\nc.f. https://www.felix-schwarz.org/blog/2018/08/new-apple-event-apis-in-macos-mojave\n\nThis tool may help sign your application\n\n[4d-utility-build-application](https://github.com/miyako/4d-utility-build-application)\n\nIf access has been previously denied by user, the application will not ask again.\n\nThe use must manually enable it.\n\nAlternatively, you can clear all permissions for Automation.\n\n```\ntccutil reset AppleEvents\n```\n\nbefore\n\n\u003cimg width=\"668\" alt=\"2019-03-05 16 01 49\" src=\"https://user-images.githubusercontent.com/1725068/53786763-084a2d00-3f60-11e9-8f6a-b75c88ddb5e9.png\"\u003e\n\nafter\n\n\u003cimg width=\"668\" alt=\"2019-03-05 16 02 40\" src=\"https://user-images.githubusercontent.com/1725068/53786792-1f891a80-3f60-11e9-8911-fab9d6c6466a.png\"\u003e\n\nThe main application must have the following keys in ``Info.plist``\n\n**Key**: Privacy - AppleEvents Sending Usage Description (``NSAppleEventsUsageDescription``)  \n\n**Value**: Reason to access private data\n\nIf the entry does not exist, plugin calls will silently fail.\n\n\u003cimg width=\"765\" alt=\"2019-03-05 16 06 08\" src=\"https://user-images.githubusercontent.com/1725068/53787121-206e7c00-3f61-11e9-8801-9080083e5d4f.png\"\u003e\n\nIf the app is signed, you obviously have to sign it again after editing ``Info.plist``.  \n\nIf the key exists, the system will ask the user for permission on the first attempt.\n\n\u003cimg width=\"420\" alt=\"2019-03-05 16 09 11\" src=\"https://user-images.githubusercontent.com/1725068/53787180-4d229380-3f61-11e9-8d38-d046e9107d55.png\"\u003e\n\nYou will also need to codesign the built app (with the ``--deep`` option, since some frameworks are unsigned).\n\nTo sign, you may have to ``xattr -rc`` and first clean all files inside the app.\n\n## Architecture\n\nThis plugin uses several different ways to access Notes. \n\n### ScriptingBridge\n\nThe file ``Notes.h`` was generated by ``sdef``.\n\n```\nsdef /Applications/Notes.app | sdp -fh --basename Notes\n```\n\nMost functions ask the Notes app to complete the task by sending ``obj-c`` messaged over [ScriptingBridge](https://developer.apple.com/documentation/scriptingbridge).\n\n### NSAppleScript\n\nAdding attachments seems impossible via ScriptingBridge. So [NSAppleScript](https://developer.apple.com/documentation/foundation/nsapplescript) is used instead.\n\n### SQLite\n\nThe path of attachment files is likewise not exposed via AppleScript. So direct access to the backend SQLite database is performed.\n\n* Example of connecting to the Notes backend SQLite database.\n\n```\nsqlite3 /Users/miyako/Library/Group\\ Containers/group.com.apple.notes/NoteStore.sqlite\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-notes/lists"}