Command line


Using the command line, you can create images of your product automatically without user intervention. You can create a command using the help or the Batch Processing tool.

To run Cover Commander in the command line mode:

  1. Click on the Start button on your Desktop and then select Run... on the menu that appears.

  2. In the Run Application window that appears, click on the Browse... button, navigate to the Cover Commander home folder and select the application executable.

  3. Type necessary keys and options and then click OK.

Batch mode


Parsing large amounts of data - multiple projects with multiple images - is much more productive with command line options. Below you can find examples of using different batch processing options from the command line.

Command line options and commands


CoverCommander.exe -b project_file [-r] [-result image_file] [-front[_N] image_file] [-left[_N] image_file] [-top[_N] image_file] [-right[_N] image_file] [-back[_N] image_file] [-bottom[_N] image_file] [-screen[_N] image_file] [-disc[_N] image_file] [-color[_N] value] [-text[_N] text_to_render] [-find[_N] text_to_replace] [-zoom value] [-shadow on|off] [-reflection on|off] [-background value] [-imagesizeincludemargin] [-imagekeepprop on|off] [-imagewidth value] [-imageheight value] [-imagemargin value] [-imagemarginx value] [-imagemarginy value] [-imagemarginx1 value] [-imagemarginx2 value] [-imagemarginy1 value] [-imagemarginy2 value] [-imagedpi value] [-imageformat value]

where:

Parameter Alt. name Description
project_file project file name or mask for multiple files (*.cpj, for example);
-r recursive folder scanning - when used with project or image file mask;
-result image_file -res image_file output image file name;
-front[_N] image_file -s0[_N] image_file front-side image file name (for Nth object, if it is required) or mask for multiple files (*.png, for example);
-top[_N] image_file -s1[_N] image_file top-image file name or mask for multiple files;
-left[_N] image_file -s2[_N] image_file left-side image file name or mask for multiple files;
-right[_N] image_file -s3[_N] image_file right-side image file name or mask for multiple files;
-back[_N] image_file -s4[_N] image_file rear-side image file name or mask for multiple files;
-bottom[_N] image_file -s5[_N] image_file bottom-side image file name or mask for multiple files;
-screen[_N] image_file -s6[_N] image_file screen image file name or mask for multiple files;
-disc[_N] image_file -s7[_N] image_file disc image file name or mask for multiple files;
-color[_N] value -c[_N] value set object color, value - hex format RRGGBB or auto;
-text[_N] text_to_render -t[_N] text_to_render text to render (for 3D text object);
-find[_N] text_to_find -f[_N] text_to_find text to be found and replaced by -text value (if it is required). For multiple replacements, use the || delimiter (see examples);
-zoom value -z value set zoom value;
-shadow on|off -sh on|off enable/disable shadow;
-reflection on|off -rf on|off enable/disable reflection;
-background value -bg value set background color, value - hex format RRGGBB;
-imagesizeincludemargin
-imagekeepprop on|off
-imagewidth value
-imageheight value
-imagemargin value
-imagemarginx value
-imagemarginy value
-imagemarginx1 value
-imagemarginx2 value
-imagemarginy1 value
-imagemarginy2 value
-imagedpi value
-imageformat value
-is
-ikp on|off
-iw value
-ih value
-im value
-imx value
-imy value
-imx1 value
-imx2 value
-imy1 value
-imy2 value
-id value
-if value
set properties for output image.

You can use mask only in one place; i.e., you cannot use it in both project name and image name.

The following substitutions can be used in file names:

  • {PROJECT_PATH} - path to the project file.
  • {PROJECT_FILE} - project file base name (without extension);
  • {PROJECT_PATH_FILE} - path/name of the project file;
  • {PROJECT_WILDCARD} - wildcard part of the file name (the part under the asterisk if a mask is used in the file name to process multiple projects);
  • {PROJECT_PATH_WILDCARD} - path/wildcard part of the project file name.

If you use mask in an image file name, the following substitutions can be used in other image file names:

  • {IMAGE_PATH} - path to image file.
  • {IMAGE_FILE} - image file base name (without extension);
  • {IMAGE_EXT} - image file extension;
  • {IMAGE_PATH_FILE} - path/name of the image file;
  • {IMAGE_WILDCARD} - wildcard part of the file name (the part under the asterisk);
  • {IMAGE_PATH_WILDCARD} - path/wildcard part of the image file name.

Please note: if the file path contains spaces, you must enclose it in quotes. This also applies to the project path and covers. Examples:

  • Sample of the path to CoverCommander.exe:

    "C:\Program Files (x86)\Insofta Cover Commander\CoverCommander.exe"

  • "_Path_\CoverCommander.exe" -b c:\work\screenshot.cpj

  • "_Path_\CoverCommander.exe" -b c:\work\screenshot.cpj -front c:\work\ss\*.png -result {IMAGE_FILE}_res.png

  • "_Path_\CoverCommander.exe" -b c:\work\two_screenshots.cpj -front c:\work\first_ss\*.png -front_2 c:\work\second_ss\{IMAGE_FILE}.png -result c:\work\result_ss\{IMAGE_FILE}.png

  • "_Path_\CoverCommander.exe" -b c:\work\*.cpj

  • In the last example, image file "{PROJECT_PATH}{PROJECT_FILE}_res.png" will be substituted by "c:\work\books\book1_res.png" for project "c:\work\books\book1.cpj":

    "_Path_\CoverCommander.exe" -b c:\work\*.cpj -r -result {PROJECT_PATH}{PROJECT_FILE}_res.png

  • In this example, the strings "Year" for "New Year" and "2017" for "2018" will be replaced:

    "_Path_\CoverCommander.exe" -b c:\work\menu.cpj -find "Year||2017" -text "New year||2018"

Related topics