npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

puppet-show

v2.1.1

Published

Print-to-PDF and Screenshot web service

Downloads

26

Readme

Puppet Show Docker

Leverages the Puppeteer library to expose Chromium print-to-pdf and screenshot over a service

Screenshot

Use this web service to programatically convert web pages to PDF or image. For example, create a cron job that uses the service to generate a daily report PDF from a web page and then email it. The HTML form allows you to easily build your request for embedding in an application. This service should only be installed internally on an intranet and not exposed to the Internet as it can be easily abused and would be a high security risk (For example using a file:// protocol in the URL exposes local files).

Install

npm i puppet-show

Note: This application runs on the Node.js JavaScript runtime, which can be downloaded here.

Run

npm start

Now navigate your web browser to http://localhost:3000/puppet-show.

API

The URL parameter names for the web service end point puppet-show/pdf and puppet-show/screenshot mirror the option names for the puppeteer print-to-pdf and screenshot functions found here and here. The puppet-show web forms can also be used to explore the API.

Note: The default values match the puppeteer defaults and the only required parameter is "url".

Configure

export PORT=3000
npm start

Note: Use the appropriate set environment variable command for your shell; Bash shell shown above. For C Shell use "setenv PORT 3000", and for Windows use "set PORT 3000".

Docker

Build image yourself

git clone https://github.com/slominskir/puppet-show
cd puppet-show
docker build -t slominskir/puppet-show .
docker run --privileged -d --rm -p 3000:3000 slominskir/puppet-show
# Navigate web browser to http://localhost:3000/puppet-show/

Or use image on docker hub

docker pull slominskir/puppet-show
docker run --privileged -d --rm -p 3000:3000 slominskir/puppet-show
# Navigate web browser to http://localhost:3000/puppet-show/

Note: Without the --privileged flag to the docker run command Chrome may not launch.

See Also

Similar Projects

Logo