Articles in this section

CalderaRIP Automation with Command Line

Here is a basic introduction to the Terminal commands available for running automation with CalderaRIP.

  Limitations

  • RIP configurations must be set up before using the command lines
  • The /opt/caldera/bin/calserver Service must be running to submit jobs. Normally this service is run at startup, but we recommend that you check its status anyway
  • You can not get access to the status of jobs while printing (use the Caldera REST API instead)

 

Set the default terminal environment

Caldera commands need to know where some default configuration directories are to run correctly:

  • Global rip data configuration files
  • First TMP directory to write the files opened
  • Second TMP directory to read the file to print

 

Also, for convenience, we are going to export the place where the binaries are located to avoid prefixing it for each command:

$ export __CAS_DATA=/opt/caldera/lib/
$ export __CAS_TMP=/opt/caldera/var/tmp
$ export BATCH_TMP=/opt/caldera/var/tmp
$ export PATH="/opt/caldera/bin/:$PATH"

Installation

RIP Installation

At the root of the ISO image, you can start the installer without a GUI. The -f option will force copying files without asking questions if they are decisions to make.

On Linux:

$ sudo ./Install.sh -nogui -f

On Mac:

$ sudo ./Install -nogui -f

Driver Installation

To install a new driver silently without running the GUI:

$ /opt/caldera/bin/scriptpatch /path/to/driver.calpatch -nogui

Print Management

Load a file

fileman is the generic command to load a file. The returned information "1.id" will be used for other commands:

$ fileman -load Pictures/file.jpeg 
1.10967.00000

  Info

The file loaded with the previous command is not visible in the ImageBar.

 

Print a file

batch_print is the generic command to print.

Once the job is submitted, the "1.id" is given as an answer.

It is possible to tune this command in several ways:

With a Preset Without a Preset

If you exported some preset file, a minimal set of options is mandatory:

  • Host (can be localhost or a remote IP address)
    -host 127.0.0.1
  • Print server name
    -MyServer
  • Preset file
    -pconfxml /Users/XXXX/Downloads/myconf.xml
  • File to print (note that the filename is composed by img.id without the "1")
    -i /opt/caldera/var/tmp/img.10967.00000

 

At the end, the command line would look like this:

$ batch_print -host localhost -MyServer -pconfxml /Users/XXXX/Downloads/myconf.xml -i /opt/caldera/var/tmp/img.10967.00000

 

Batch Print Options

The img.id file can be automatically deleted:

-del_src

 

Verbose flag for more information on the screen:

-v

 

Job Log

You can just get the final state of a job once treated by polling the log file of your server. The log format is space-separated rows of data limited to the current fields:

  • Timestamp
  • Name of the job (source image by default)
  • User
  • IP address
  • Time to process in seconds
  • Number of copies
  • Media
  • Size of media used
  • Cost of media used
  • Status (Finished, Error, Exported, ...)

 

At the end, the command line would look like this:

$ tail -n 1 /opt/caldera/var/tmp/MyServer.log
1701246395 file.jpeg XXXX IP 46 1 Plain Paper 3.5901 35.90 Terminé

  Info

In the previous example:

  • The image file name is used (and not the ID)
  • The host is the real IP address (and not localhost or 127.0.0.1)
  • The log is translated into the current language ("Terminé" is French for "Finished")

 

Delete Files

There is a last command to know if you do not use the del_src option to batch_print, otherwise, you will need to empty regularly the files created in the TMP directory:

$ batch_trash 1.10967.00000
Was this article helpful?
1 out of 1 found this helpful