{"id":21967171,"url":"https://github.com/rgglez/webkit2png-daemon","last_synced_at":"2025-06-22T17:36:56.064Z","repository":{"id":153393966,"uuid":"628883322","full_name":"rgglez/webkit2png-daemon","owner":"rgglez","description":"Server written in Perl which uses webkit2png to take screenshots of webpages.","archived":false,"fork":false,"pushed_at":"2023-04-20T04:03:42.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T01:44:31.201Z","etag":null,"topics":["daemon","perl","screenshot","server","webkit2png"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgglez.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}},"created_at":"2023-04-17T07:18:40.000Z","updated_at":"2024-01-09T08:30:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4d51439-2ccc-40a9-80c9-44c472ae729f","html_url":"https://github.com/rgglez/webkit2png-daemon","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/rgglez%2Fwebkit2png-daemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Fwebkit2png-daemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Fwebkit2png-daemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Fwebkit2png-daemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgglez","download_url":"https://codeload.github.com/rgglez/webkit2png-daemon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245026006,"owners_count":20549071,"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":["daemon","perl","screenshot","server","webkit2png"],"created_at":"2024-11-29T13:22:15.968Z","updated_at":"2025-03-22T22:13:09.235Z","avatar_url":"https://github.com/rgglez.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webkit2png-daemon\n\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n![GitHub issues](https://img.shields.io/github/issues/rgglez/webkit2png-daemon) \n![GitHub commit activity](https://img.shields.io/github/commit-activity/y/rgglez/webkit2png-daemon)\n\nA server daemon written in Perl which listens in an specified TCP port for a string containing the URL to be screenshoted. It uses the [WebKit2PNG](https://pypi.org/project/webkit2png/) script to make the screenshot.\n\nYou can configure the listening port, host and other parameters for the daemon using the [Net::Server configuration](https://metacpan.org/pod/Net::Server). \nSee the *run.sh* script for an example on how to run the daemon.\n\n## Usage\n\nAdjust the paths of the programs here:\n\n```perl\nmy $PYTHON = '/usr/bin/python';\nmy $XVFB = '/usr/bin/xvfb-run';\nmy $WEBKIT2PNG = 'webkit2png.py';\nmy $CAT = '/bin/cat';\n``` \n\nCreate the directory for the logs and set the correct permissions/ownerships:\n\n```bash\nmkdir /var/log/webkit2png/\nchown $USER:$GROUP /var/log/webkit2png/\n```\n\nStart the server executing:\n\n```bash\nperl WebKit2PNGDaemon.pl\n```\n\nThen send a string (the URL to be screenshoted) to the specified port and host. The server will execute WebKit2PNG and return a first line containing\n\n```\nLENGTH: \u003clength of the captured image in bytes\u003e\n```\n\nand then the bytes of the captured screen in PNG format, or an error image.\n\n## Dependencies\n\n### Perl modules \n\nYou can install them using *perl -MCPAN -e shell* or your distro's package manager:\n\n* [Net::Server::PreFork](https://metacpan.org/pod/Net::Server::PreFork)\n* [GD::Simple](https://metacpan.org/pod/GD::Simple)\n* [File::Temp](https://perldoc.perl.org/File::Temp)\n* [MIME::Base64](https://metacpan.org/pod/MIME::Base64)\n* [Sys::Syslog](https://perldoc.perl.org/Sys::Syslog)\n* [Digest::SHA](https://metacpan.org/pod/Digest::SHA)\n* [Data::Validate::URI](https://metacpan.org/pod/Data::Validate::URI)\n\n### Programs\n\n* [WebKit2PNG](https://pypi.org/project/webkit2png/)\n* [Python](https://www.python.org/)\n* [xvfb-run](https://github.com/revnode/xvfb-run/blob/master/xvfb-run)\n* [cat](https://man7.org/linux/man-pages/man1/cat.1.html)\n\n## Notes\n\n* You must download the [webkit2png](https://pypi.org/project/webkit2png/) Python script.\n* If you are into cloud FaaS, look [here](https://github.com/rgglez/fc-webpage-screenshot).\n\n## License\n\nCopyright (c) 2023, Rodolfo González González.\n\nRead the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgglez%2Fwebkit2png-daemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgglez%2Fwebkit2png-daemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgglez%2Fwebkit2png-daemon/lists"}