{"id":14128654,"url":"https://github.com/alexdelorenzo/screenshot","last_synced_at":"2025-04-13T21:22:55.993Z","repository":{"id":28347332,"uuid":"31860942","full_name":"alexdelorenzo/screenshot","owner":"alexdelorenzo","description":"📸 Automate capturing screenshots of apps and windows on macOS","archived":false,"fork":false,"pushed_at":"2021-08-24T01:43:48.000Z","size":53,"stargazers_count":178,"open_issues_count":5,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T11:43:33.034Z","etag":null,"topics":["automated","capture","mac","macos","macosx","osx","quartz","screencapture","screenshot","screenshots"],"latest_commit_sha":null,"homepage":"https://alexdelorenzo.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdelorenzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["alexdelorenzo"]}},"created_at":"2015-03-08T18:46:33.000Z","updated_at":"2024-12-29T23:43:46.000Z","dependencies_parsed_at":"2022-08-17T21:35:04.515Z","dependency_job_id":null,"html_url":"https://github.com/alexdelorenzo/screenshot","commit_stats":null,"previous_names":["thismachinechills/pyscreencapture"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fscreenshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fscreenshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fscreenshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fscreenshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdelorenzo","download_url":"https://codeload.github.com/alexdelorenzo/screenshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248783457,"owners_count":21160924,"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":["automated","capture","mac","macos","macosx","osx","quartz","screencapture","screenshot","screenshots"],"created_at":"2024-08-15T16:02:00.326Z","updated_at":"2025-04-13T21:22:55.966Z","avatar_url":"https://github.com/alexdelorenzo.png","language":"Python","funding_links":["https://github.com/sponsors/alexdelorenzo"],"categories":["Python"],"sub_categories":[],"readme":"# 📸 screenshot: Better macOS screenshots via the Terminal\n\n`screenshot` is a command line utility that lets you specify an *application name* and *window title* in order to take a screenshot of a specific window.\n\nUsing `screenshot`, you can capture windows belonging to an application, or only an application's windows with certain titles.\n\n## Justification and Use Case\nThe macOS `screencapture` utility is not developer friendly. \n\nTo programmatically take a screenshot of an application, or a specific window, you must supply a *window ID* to `screencapture`.\nIn order to find a window's *window ID*, you'll need call out to Quartz.\n\nIn newer versions of macOS, the `screencapture` utility improves the user experience slightly: you can run the command and then click on the window you'd like to capture.\n\nHowever, that necessitates that the user clicks a window each time. You cannot include this as part of an automated pipeline.\n\nTo that end, I use this utility to automatically generate screenshots of web, mobile and desktop applications.\n\n## Example\nTake a screenshot of the current Terminal window and view it with Preview.app:\n```bash\nopen \"`screenshot Terminal`\"\n```\n\nTake a screenshot of the Pycharm application with the *window title* containing \"screenshot\":\n```bash\nscreenshot Pycharm -t screenshot\n```\n\n\n## Installation\nYou will need Python 3.6+. Please install it with `brew` or `ports` if you do not have it already.\n\n### PyPI\n```bash\npip3 install screenshot\n```\n\n### Github Source\nGrab the source, run the following in the source dir:\n```bash\npip3 install -r requirements.txt\n```\n\nthen run\n```bash\npython3 setup.py install\n```\n\n## Usage\n`screenshot --help`\n\n```\nUsage: screenshot [OPTIONS] APPLICATION_NAME\n\nOptions:\n  -w, --window_selection_options TEXT\n                                  Options: all_windows, on_screen_only,\n                                  above_window, below_window, include_window,\n                                  exclude_desktop\n                                  Default: exclude_desktop\n                                  on_screen_only\n  -t, --title TEXT                Title of window from APPLICATION_NAME to\n                                  capture.\n  -f, --filename TEXT             Filename to save the captured PNG as.\n  -a, --all_windows               Capture all windows matching parameters.\n  -o, --output TEXT               Image format to create, default is png\n                                  (other options include pdf, jpg, tiff)\n  -s, --shadow                    Capture the shadow of the window.\n  --help                          Show this message and exit.\n```\n\n## License\nSee `LICENSE`. Message me if you'd like to use this project with a different license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdelorenzo%2Fscreenshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdelorenzo%2Fscreenshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdelorenzo%2Fscreenshot/lists"}