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

echarts-scrappeteer

v1.2.0

Published

Find all echarts in a web page and save them as image using puppeteer

Downloads

6

Readme

Echarts Scraper Puppeteer

Build Status codecov npm version

For svg output, it is required that echarts 3.8+ is used and the echarts instance is renderred as svg.

Introduction

It scrapes all echarts found in a web page as images. And it scrapes 3D charts too. Of course, it supports pyecharts as well. Please find the example in later section.

Installation

$ npm i -g echarts-scrappeteer

requirements

Node 7.6.0 or later

Usage


Usage: scrappeteer [options] <url/file>


Options:

  -f, --format <png,jpeg,gif,svg>         image format
  -o, --output <outputname>               output file name
  -w, --wait <delay in milli-seconds>     wait a while before scrapping
  -v, --viewPort <width,height>           force puppeteer to set viewport. for echarts gallery site only
  -r, --clipRectangle <x,y,width,height>  record rectangle when making gif animation
  -c, --frameCounts <number>              of frames. gif only
  -i, --frameInterval <number>            frame intervals. gif only
  -s, --skipFrames <number>               skip initial frames. gif only
  -g, --gap time<number>                  between each gif snapshot. gif only
  -h, --help                              output usage information

If the page load speed is slow or if the resulting image is partial, -w parameter is required to delay the scrape action.

Please note that if more than one echarts should be found in a page, -f option applies to all.

Example

Scrape echarts from a URL

demo

Here is the command for your discretion:

$ scrappeteer https://pyecharts.github.io/echarts-china-cities-js/preview.html

Scrape echarts from a local file

$ scrappeteer render.html

Where does the render.html come from? It is genereted by pyecharts. Please visit pyecharts-demo.py.

scrape pyecharts

Gallery

Gif format :fire:

scrappeteer http://gallery.echartsjs.com/editor.html?c=xrkJtnKJq- -w 2000 -f gif -r 525,50,770,750 -o gf3 -i 300 -c 10 -v 1300,800

high speed route

Static images

step count pig plan surface wave

LICENSE

ISC