Giter VIP home page Giter VIP logo

webkit2png-daemon's Introduction

webkit2png-daemon

License GitHub issues GitHub commit activity

A 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 script to make the screenshot.

You can configure the listening port, host and other parameters for the daemon using the Net::Server configuration. See the run.sh script for an example on how to run the daemon.

Usage

Adjust the paths of the programs here:

my $PYTHON = '/usr/bin/python';
my $XVFB = '/usr/bin/xvfb-run';
my $WEBKIT2PNG = 'webkit2png.py';
my $CAT = '/bin/cat';

Create the directory for the logs and set the correct permissions/ownerships:

mkdir /var/log/webkit2png/
chown $USER:$GROUP /var/log/webkit2png/

Start the server executing:

perl WebKit2PNGDaemon.pl

Then 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

LENGTH: <length of the captured image in bytes>

and then the bytes of the captured screen in PNG format, or an error image.

Dependencies

Perl modules

You can install them using perl -MCPAN -e shell or your distro's package manager:

Programs

Notes

  • You must download the webkit2png Python script.
  • If you are into cloud FaaS, look here.

License

Copyright (c) 2023, Rodolfo González González.

Read the LICENSE file.

webkit2png-daemon's People

Contributors

rgglez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.