{"id":20838012,"url":"https://github.com/fusonic/phantomshot","last_synced_at":"2025-08-28T17:09:58.389Z","repository":{"id":26858465,"uuid":"30318514","full_name":"fusonic/phantomshot","owner":"fusonic","description":"A small JavaScript library to take multiple predefined screenshots of web-pages using PhantomJS.","archived":false,"fork":false,"pushed_at":"2015-03-11T15:33:01.000Z","size":268,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-18T03:41:38.063Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fusonic.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":"2015-02-04T20:07:21.000Z","updated_at":"2015-11-06T16:30:06.000Z","dependencies_parsed_at":"2022-09-01T21:12:19.026Z","dependency_job_id":null,"html_url":"https://github.com/fusonic/phantomshot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fusonic/phantomshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fphantomshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fphantomshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fphantomshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fphantomshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fusonic","download_url":"https://codeload.github.com/fusonic/phantomshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fphantomshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272526724,"owners_count":24949836,"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-28T02:00:10.768Z","response_time":74,"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":[],"created_at":"2024-11-18T01:09:10.142Z","updated_at":"2025-08-28T17:09:58.370Z","avatar_url":"https://github.com/fusonic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"PhantomShot is a simple JavaScript library that enables you to take predefined screenshots from web pages using the headless WebKit PhantomJS. Viewports and screenshot URLs are defined in a configuration file.\n\n### Features\n\n* Shoot multiple screenshots in a row\n* Define custom viewport sizes and device pixel ratios\n* Take screenshots of pages that require login\n* Only save portions of the screen (clipping)\n\n### Use cases\n\nKeep screenshots up to date in documentation content, user manuals or on your product website.\n\n__This is a very, very early working prototype. Do not expect too much in terms of error handling or code quality.__\n\n# Usage\n\n## Basic\n\nFirst create a config file (take a look at `sample-config.json` for some inspiration). Then call the script from command line:\n\n```bash\nphantomjs phantomshot.js [path-to-config-file]\n```\n\nMake sure you are cd'd to the directory of the config file, otherwise it won't work.\n\n## The config file\n\nTBD _(take a look at `sample-config.json` in the meantime)_\n\n## Shooting a page that requires login\n\nAdd a small block of login information to your `config.json`:\n\n```json\n\"login\": {\n    \"url\": \"/login\",\n    \"script\": \"login-script.js\"\n}\n```\n\nBefore taking screenshots the specified URL will be called. After pageload the login script will be injected into the page. It should fill the required form fields and sumit the login form (see `sample-login.js`). PhantomShot starts taking screenshots after the login has been performed.\n\n# Building\n\n## Requirements\n\nYou need to have node up and running, then:\n\n```\nnpm install -g gulp tsd\n```\n\nAfter checking out the phantomshot repository, install dependencies:\n\n```\nnpm i \u0026\u0026 tsd reinstall --save\n```\n\nA build task is configured in gulp\n\n```\ngulp build\n# or\ngulp watch\n```\n\n# Misc\n\n## About PhantomJS\n\nPhantomJS is a headless WebKit with JavaScript API. You should use the most recent version 2 to get web font support and accurate rendering like in your modern desktop browser.\n\nJust grab a binary from [the download page](http://phantomjs.org/download.html) or [create a custom build](http://phantomjs.org/build.html).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusonic%2Fphantomshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusonic%2Fphantomshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusonic%2Fphantomshot/lists"}