On top of the @plotly/image-exporter npm package , we'll add standalone Mac, Linux and Window binaries to the release section after every release similar to what's done currently in plotly-database-connector.
Standalone binaries ship with node.js and electron bundled up, but without the fonts we use on prod (if users want the fonts, they'll have to install them locally or use docker). We'll probably use electron-packager same as plotly-database-connector for this task, although there are other options. This part is easy.
Now, we need to figure how to distribute image-exporter to python and R API users. We'll also need to write (thin) python and R wrapper around the plotly-graph-exporter CLI command e.g in python:
from subprocess import call
import json
fig = {"data": [{"y": [1,2,1]}]}
call(['plotly-graph-exporter', json.dumps(fig)])
For distributing, I can think of three different options:
- Include the
image-exporter standalone binaries in plotly.py and plotly.R packages and write the wrapper there, similar to what we currently do with the plotly.js bundle for offline. Potential problems, we'll have to make platform-dependent installs - is that possible with pip and CRAN? Download times might increase significantly too.
- Make new
plotly-image-exporter py/pip and R/CRAN packages from this repo - which would include the py/R wrappers. This option would require platform-specific install too.
- Make users download and install the standalone binaries from this repo's release section, add wrapper code to
plotly.py and plotly.R and make them spit out errors if called when plotly-graph-exporter isn't installed.
cc @chriddyp @cpsievert @jackparmer
On top of the
@plotly/image-exporternpm package , we'll add standalone Mac, Linux and Window binaries to the release section after every release similar to what's done currently in plotly-database-connector.Standalone binaries ship with node.js and electron bundled up, but without the fonts we use on prod (if users want the fonts, they'll have to install them locally or use docker). We'll probably use
electron-packagersame as plotly-database-connector for this task, although there are other options. This part is easy.Now, we need to figure how to distribute
image-exporterto python and R API users. We'll also need to write (thin) python and R wrapper around theplotly-graph-exporterCLI command e.g in python:For distributing, I can think of three different options:
image-exporterstandalone binaries in plotly.py and plotly.R packages and write the wrapper there, similar to what we currently do with the plotly.js bundle for offline. Potential problems, we'll have to make platform-dependent installs - is that possible with pip and CRAN? Download times might increase significantly too.plotly-image-exporterpy/pip and R/CRAN packages from this repo - which would include the py/R wrappers. This option would require platform-specific install too.plotly.pyandplotly.Rand make them spit out errors if called whenplotly-graph-exporterisn't installed.cc @chriddyp @cpsievert @jackparmer