Command line interface



If the R.U.B.E executable is invoked from the command line with parameters, it will run in non-interactive mode, with no GUI display. This method can be used to work with many files in a large batch. Multiple scripts can be executed for the scene, and the result can then be exported and/or resaved.

To see all available options for the command line interface, invoke the RUBE executable with the '-h' option. Here is the first part of the help output:
Usage: rube -i INPUTFILE
            [-s SCRIPTFILE]...
            [-r RESAVEFILE] [-e EXPORTFILE] [-c SRCFILE]
            [OPTION]...
The order of options is not important, except for the order of scripts. Consider this example:
rube  -i scene.rube  -s script1.rs -s script2.rs  -e rawinfo.json
This will open the file 'scene.rube' and execute the scripts 'script1.rs' and 'script2.rs' in that order. The resulting scene will then be exported to 'rawinfo.json'. All of the save/export options can be used simultaneously, for example:
rube  -i in.rube  -s script.rs  -r out.rube  -e out.json  -c out.cpp
...will resave the modified scene, and also export both raw info and C++ source.


Notes for Mac users
The R.U.B.E app that you see in the finder is actually a package folder structure containing the necessary libraries to run the program, so you would not invoke that on the command line. The actual executable that you need to invoke is inside the package, so instead of just 'rube' you will need to prepend the path to the executable like this:
R.U.B.E.app/Contents/MacOS/rube

Notes for Windows users
In Windows an application must be either a console application or a GUI application, it cannot be both. RUBE is a GUI application, which means it will not output anything to the console when you invoke it as shown above. Instead, all the output that normally would have been shown in the console will be written to 'rube.log'. A quick way to view the contents of the log after running is:
type rube.log
...or you can use a tool like Tail for Win32 to show the latest contents of the log if you are doing many repeated runs.