{"id":22606606,"url":"https://github.com/teitei-tk/chaldeas","last_synced_at":"2025-10-23T16:46:10.007Z","repository":{"id":44443392,"uuid":"91048317","full_name":"teitei-tk/Chaldeas","owner":"teitei-tk","description":"Chaldeas is a library that can automatically launch Chrome as headless mode and Provide Devtools Protocol API at node.js","archived":false,"fork":false,"pushed_at":"2017-12-07T05:38:35.000Z","size":1396,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-11T05:15:39.240Z","etag":null,"topics":["automatic-launch","chrome","headless","headless-browsers","headless-chrome","nodejs"],"latest_commit_sha":null,"homepage":"https://teitei-tk.github.io/Chaldeas/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teitei-tk.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":"2017-05-12T03:40:20.000Z","updated_at":"2023-09-08T17:24:55.000Z","dependencies_parsed_at":"2022-09-16T05:14:31.754Z","dependency_job_id":null,"html_url":"https://github.com/teitei-tk/Chaldeas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teitei-tk%2FChaldeas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teitei-tk%2FChaldeas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teitei-tk%2FChaldeas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teitei-tk%2FChaldeas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teitei-tk","download_url":"https://codeload.github.com/teitei-tk/Chaldeas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345273,"owners_count":21088245,"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":["automatic-launch","chrome","headless","headless-browsers","headless-chrome","nodejs"],"created_at":"2024-12-08T14:14:18.244Z","updated_at":"2025-10-23T16:46:09.952Z","avatar_url":"https://github.com/teitei-tk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chaldeas\nChaldeas is a library that can automatically launch Chrome as Headless mode and Provide Devtools Protocol API at node.js\n\n[![npm version](https://badge.fury.io/js/chaldeas.svg)](https://badge.fury.io/js/chaldeas)\n[![Document](https://teitei-tk.github.io/Chaldeas/badge.svg)](https://teitei-tk.github.io/Chaldeas/)\n[![Docker Automated buil](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/teitei/chaldeas/)\n[![Docker Build Statu](https://img.shields.io/docker/build/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/teitei/chaldeas/)\n\n## Dependency\n* Node 6.10.3 or later\n* GoogleChrome Version59 later or Canary\n* babel-runtime 6.23.0 or later\n* chrome-remote-interface 0.22.0 or later\n* lighthouse 1.6.5 or later\n* chrome-remote-interface-flowtype 0.1.2 or later\n\n## Architecture\n* AsyncAwait Support (babel-preset-es2017)\n* flowtype Support\n* eslint\n\n## API Document\n* https://teitei-tk.github.io/Chaldeas/\n\n## Example\nPrint Page PDF\n\n```bash\n$ yarn add --dev chaldeas\n```\n\n```JavaScript\nimport { writeFile } from 'fs';\nimport Chaldeas from 'chaldeas';\n\nasync function main() {\n  const chaldeas = Chaldeas.new();\n\n  try {\n    const protocol = await chaldeas.fetchProtocol();\n\n    const { Page, Network } = protocol;\n    await Promise.all([\n      Page.enable(),\n      Network.enable(),\n    ]);\n\n    await Page.navigate({ url: 'https://github.com' });\n\n    await Page.loadEventFired(async () =\u003e {\n      const result = await Page.printToPDF();\n      const fileName = (new Date()).getTime();\n      const buffer = Buffer.from(result.data, 'base64');\n      writeFile(`${fileName}.pdf`, buffer, (e) =\u003e {\n        if (e) {\n          throw e;\n        }\n      });\n\n      await chaldeas.terminate();\n    });\n  } catch (error) {\n    await chaldeas.terminate();\n    console.error(error);\n  }\n}\n\nmain();\n```\n\n## Development\n1. install npm modules\n    * ```bash\n      $ yarn\n      ```\n1. Docker\n  * ```bash\n    $ yarn chrome:launch // alias of `yarn build; docker run -it -d --rm --name chaldeas --shm-size=1024m --cap-add=SYS_ADMIN -v `pwd`:/data teitei/chaldeas;`\n    $ docker attach chaldeas\n\n    root@ebcb835b0fcc:/data# ./node_modules/.bin/babel-node example/printPdf.js\n    root@ebcb835b0fcc:/data# ls\n    1497018362340.pdf  LICENSE    example  node_modules  src             yarn.lock\n    Dockerfile         README.md  lib      package.json  yarn-error.log\n    ```\n\n## Contributing\nBug reports and pull requests are welcome :) on GitHub at https://github.com/teitei-tk/Chaldeas.\n\n## Reference\n* https://developers.google.com/web/updates/2017/04/headless-chrome\n* https://chromedevtools.github.io/devtools-protocol/tot/\n\n## LICENSE\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteitei-tk%2Fchaldeas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteitei-tk%2Fchaldeas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteitei-tk%2Fchaldeas/lists"}