I have some scripts written with d3.js that generate SVG diagrams. I would like to generate these diagrams using a standalone program - what is the easiest way I can convert these scripts to run in batch mode without a browser?
You can:
Convert this to node.js program. You will have access to the file system and you can easily save the generated SVG. You will need node-canvas to replace the HTML canvas. See this d3 example to get started with d3 using node.
You can use the file system APIs in Chrome with your existing scripts to write files to your hard drive. It might be simpler because you just need to implement the file system code on top of what you already have. See this html5rocks article for information on writing to the local file system.
Source: https://habr.com/ru/post/902167/More articles:Are IE7 and 8 modes in IE9 real? - javascriptOdd behavior from border checking - cPerspective correction of UIImage from points - iosContinuous Integration Strategy - Project Ref vs Branching / Merging - branching-and-mergingArchitectural tips for implementing GUI logic - language-agnosticHow to create custom jbutton in java with image base? - javased: simultaneous in-place replacement and printout of modified lines? - shellPython 3 - not copying stream interface for bytearray? - pythonWho should know about something else? - c ++Physical definition of screen size based on user agent in PHP / javascript - javascriptAll Articles