How to automatically generate a png export from a .ndbx file in a command line (with a script)?
Hello,
I made a nodebox 3 file (.ndbx) that generates a dashboard of a production status.
It is based on csv files that change every day.
For the moment, I have to open each day the nodebox file manually and generate the png.
I would like to generate automatically the dashboard with a script that I could execute with our Continuous Integration System.
Is there a way to call nodebox3 in a command line with a .nbdx file and tell it to generate a png image?
Thank you!
Gilbert
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by Frederik De Ble... on 30 Jun, 2014 08:20 PM
Hi,
I've added a GitHub Issue that tracks this.
I've also solved it :-)
The nodebox.jar now has a new class, nodebox.NodeBox, that serves as a command-line tool renderer.
Since you don't only need the nodebox.jar but also all of its dependencies, you first need to find the full classpath. Use
ant classpathfor this:Copy the full classpath, and invoke it like this:
Example:
This will generate a file in the same folder with the PNG extension.
There are two options:
-o FILEAllows you to override the output file-l FILEAllows you to specify the location of thelibrariesfolder, which contains the NodeBox system libraries. (By default we look in the current directory for alibrariesfolder)Hope this helps,
F
Support Staff 2 Posted by Frederik De Ble... on 30 Jun, 2014 10:21 PM
The NodeBox JAR now contains all dependencies, so assuming you're in the root of the NodeBox Git repo, you can just do:
You still need to refer to the system libraries folder.