{"id":20783618,"url":"https://github.com/jedi4ever/python-keynote","last_synced_at":"2025-12-25T05:33:30.511Z","repository":{"id":250465473,"uuid":"834540774","full_name":"jedi4ever/python-keynote","owner":"jedi4ever","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-27T20:34:38.000Z","size":361,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T09:30:37.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedi4ever.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-07-27T15:24:48.000Z","updated_at":"2024-12-30T16:32:30.000Z","dependencies_parsed_at":"2024-07-27T17:08:12.046Z","dependency_job_id":"e3f4fa32-bbf7-4c55-bef0-4c461fea3c9d","html_url":"https://github.com/jedi4ever/python-keynote","commit_stats":null,"previous_names":["jedi4ever/python-keynote"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedi4ever%2Fpython-keynote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedi4ever%2Fpython-keynote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedi4ever%2Fpython-keynote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedi4ever%2Fpython-keynote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedi4ever","download_url":"https://codeload.github.com/jedi4ever/python-keynote/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243125563,"owners_count":20240276,"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","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":[],"created_at":"2024-11-17T14:21:45.788Z","updated_at":"2025-12-25T05:33:30.475Z","avatar_url":"https://github.com/jedi4ever.png","language":"Python","readme":"# Python Keynote Library\n## Description\n\u003e This is still Work in Progress\n\nThis package is able to read and write keynote files.\n\n- We use appscript to execute applescript commands\n- We are limited to the applescript commands that are exposed to applescript\n- To go even further we use applescript UI automation to do more\n\nRemarks: \n- This will only work on MacOS as it needs applecript\n- It can't be headless and needs a running UI/Login session\n- It needs to have Keynote installed\n- Needs a working installed Xcode environment\n\n## TODO\n- see if we can the original files (audio, movies, images):\n    - using [`keynote-parse`](https://pypi.org/project/keynote-parser/)\n    - or \u003chttps://github.com/paulhildebrandt/python-keynote/blob/master/keynote_api.py\u003e\n- set background of slide, text item\n- create text items as bulletlists\n- create shapes (rectangle, circle etc)\n\n## Notes\n\n### Applescript \u0026 Python Strategies\n- We first tried to use pyobjc with scriptengine , but found no way to pass a file to create files or export a file\n    - \u003chttps://github.com/DominikPalo/scripting-bridge-definitions/blob/master/com.apple.iWork.Keynote/Keynote.swift#L233\u003e\n    - \u003chttps://majestysoftware.wordpress.com/2015/03/31/swift-scripting-part-1/\u003e\n    - \u003chttps://github.com/tingraldi/SwiftScripting\u003e\n- It was certainly trial and error to get the right properties and syntax\n\n- The iWorkAutomation site is very usefull to find those\n    - \u003chttps://iworkautomation.com/keynote/application.html\u003e\n    - The one property that was different then expected was that there are no masters properties as described\n\n- Appscript can be found at : \u003chttps://appscript.sourceforge.io/py-appscript/index.html\u003e\n- We know appscript is deprecated , but hey it works and we can pass a file\n- We use an app called `ASTranslate` to translate applescript scripts to appscript python code\n    - \u003chttps://appscript.sourceforge.io/tools.html\u003e\n    - beware that the indexed in applescript start from 1 , in appscript from 0\n\n- A related library `keynote-js` can be found for the Javascript ecosystem:\n    - \u003chttps://github.com/macintoshhelper/keynote-js/blob/master/src/document.ts\u003e\n    - \u003chttps://stackoverflow.com/questions/44422191/how-to-create-or-edit-keynote-master-slides-using-javascript-for-automation\u003e\n\n\n### Applescript \u0026 GUI Automation\n- Some things are not possible with plain scripting keynote and we have to resort to UI Automation\n- Initially we tried using Accessibility inspector but we found executing `UI Elements` in applescript made it easier to find them\n\n### Applescript Permissions\n- To be able to automate other processes we need Automation permission on MacOS.\n- Unfortuneatly we can't set this and it has to be asked on first execution of the app\n- If we got `user permission denied`, it won't ask again. Some say reinstalling the app will ask it again\n\n- Privacy \u0026 Security \u003e Full Disk Access\n- Privacy \u0026 Security \u003e Files \u0026 Folders\n- Privacy \u0026 Security \u003e Automation\n- Privacy \u0026 Security \u003e Accessibility # No difference\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedi4ever%2Fpython-keynote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedi4ever%2Fpython-keynote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedi4ever%2Fpython-keynote/lists"}