Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
.. image:: https://api.travis-ci.org/pyecharts/pyecharts-snapshot.svg?branch=master :target: http://travis-ci.org/pyecharts/pyecharts-snapshot
.. image:: https://dev.azure.com/pyecharts/pyecharts-snapshot/_apis/build/status/pyecharts.pyecharts-snapshot :target: https://dev.azure.com/pyecharts/pyecharts-snapshot/_build?definitionId=1&_a=summary
.. image:: https://codecov.io/gh/pyecharts/pyecharts-snapshot/branch/master/graph/badge.svg :target: https://codecov.io/github/pyecharts/pyecharts-snapshot
Since 0.2.0, NO LONGER, phantomjs is required! NO LONGER, it supports python 2.7
BUT, the capability to render pyecharts in a script has been merged into
pyecharts 1.0.0. And the dependency on phantomjs has been sprawn as:
snapshot-phantomjs <https://github.com/pyecharts/snapshot-phantomjs>
_ .
If you love to use 'snapshot' command line, please continue to use this project.
pyecharts-snapshot renders the output of pyecharts/echarts.js as a png, jpeg, gif, eps, svg image, raw base64 encoding or a pdf file at command line.
Get png:
.. code-block:: bash
$ snapshot render.html
And you will get:
.. image:: https://raw.githubusercontent.com/pyecharts/pyecharts-snapshot/master/images/demo.png :width: 800px
Get pdf:
.. code-block:: bash
$ snapshot render.html pdf
And you will get:
.. image:: https://raw.githubusercontent.com/pyecharts/pyecharts-snapshot/master/images/demo_in_pdf.png :target: https://raw.githubusercontent.com/pyecharts/pyecharts-snapshot/master/examples/grid.pdf :width: 800px
And here the code to generate it <https://github.com/pyecharts/pyecharts-snapshot/blob/master/examples/grid.py>
_
Get svg:
.. code-block:: bash
$ snapshot render.html svg
Please be aware that render.html
should have configure echarts to do svg rendering. This library, being
stupid, does not make canvas rendered image as svg rendered. Here is an example svg file <https://github.com/pyecharts/pyecharts-snapshot/master/exampless/cang-zhou.svg>
_.
Command line options::
$ snapshot output.html [png|jpeg|gif|svg|pdf] [delay] [pixel ratio]
where:
delay
tells pyecharts-snapshot to take a snapshot after
some time measured in seconds. It is needed only when your snapshot is partial because the chart
animation takes long than 1.5 second(default).
pixel ratio
tells pyecharts-snapshot to use a different pixel ratio when generate
the image. It defaults to 2.
Programmatical usage is simple:
.. code-block:: python
... somechart.render(path='cool_snapshot.png') # delay=1, pixel_ratio=3) 1 second delay, 3 as pixel ratio
where delay as an optional parameter can be given to specify delay_in_seconds
.
Please buy me a coffee <http://pyecharts.org/#/zh-cn/donate>
_ if you think this library helped.
You can install it via pip:
.. code-block:: bash
$ pip install pyecharts-snapshot
$ pyppeteer-install
or clone it and install it:
.. code-block:: bash
$ git clone http://github.com/pyecharts/pyecharts-snapshot.git
$ cd pyecharts-snapshot
$ python setup.py install
$ pyppeteer-install
.. note::
pyppeteer-install is recommended but optional. Your first ever run of
snapshot command will invoke pyppeteer-install. This command will
download Chrominium <https://www.chromium.org>
,
about 100MB <https://github.com/miyakogi/pyppeteer#usage>
Fully tested on pypy, python 3.5, 3.6, 3.7 and 3.8-dev.
Only one image at a time. No 3D image support
#. Ghost.Py: very hard to install on my own. Dropped
#. install pyecharts-snapshot #. make demo #. take screenshots of grid.pdf and snapshot.pdf in examples folder
#. chengjiandong <https://github.com/chenjiandongx>
_
#. chfw <https://github.com/chfw>
_ Author
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. use pyppeteer, pythonic puppeteer for rendering pyecharts image
Removed ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. python 2, 3.5- support #. no more phantomjs dependency #. programmatic rendering capability is removed. NO longer it is integrated with pyecharts
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #33 <https://github.com/pyecharts/pyecharts-snapshot/issues/33>
_: Support
base64 encoding
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Support eps
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Loosen the requirement on lml
Fixed ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #28 <https://github.com/pyecharts/pyecharts-snapshot/issues/28>
_:
pixel_ratio as a parameter
Fixed ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #23 <https://github.com/pyecharts/pyecharts-snapshot/issues/23>
_: phantomjs
on windows does not like absolute path but file uri formatted ones
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. use system temp file instead of current working folder for tmp files
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. better error verbose when phantomjs fails to generate output
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Tighter integration with pyecharts 0.4.2. SnapshotEnvironment extends the
rendering capability of pyecharts
#. #16 <https://github.com/pyecharts/pyecharts-snapshot/issues/16>
: phantomjs
check fails on windows
#. #14 <https://github.com/pyecharts/pyecharts-snapshot/issues/14>
: if the
output file name has a path, this library fails over
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. svg support for pyecharts 0.4.0
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #9 <https://github.com/pyecharts/pyecharts-snapshot/issues/9>
_: delay 1.5
seconds
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. higher resolution screenshots for all platforms: windows and linux.
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. support Mac OS Retina display, high resolution screenshots
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #7 <https://github.com/pyecharts/pyecharts-snapshot/pull/7>
_: helpful error
message on missing phantomjs.
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. pyexcel pyexcel#105 <https://github.com/pyecharts/pyexcel/issues/105>
_,
remove gease from setup_requires, introduced by 0.0.9.
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #6 <https://github.com/pyecharts/pyecharts-snapshot/pull/6>
_: show better
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #5 <https://github.com/pyecharts/pyecharts-snapshot/pull/5>
_: fix
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Save the output of pyecharts to gif file
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Allow user to specify a custom delay period in seconds. Default is 0.5s
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #1 <https://github.com/pyecharts/pyecharts-snapshot/pull/1>
_: Support
Updated ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Remove download image arrow on the output file
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Save the output of pyecharts to pdf file
Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Save the output of pyecharts to png file
FAQs
renders pyecharts output as image
We found that pyecharts-snapshot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.