Command Line Integration
RetroCapture can be run from the command-line as follows:
Usage: java -jar retrocapture.jar \
[-d <image_directory>] \ (default: current directory)
[-m <mapping_file>] \ (default: stdout)
[-s <style_file>]* \ (default: none)
[-r <server_mode_directory>] \ (default: do not run as server)
[<number>:<image_style>]* (default: 1:lite)
- The default directory for captcha images to be written is the current working directory. Another output directory can be set using the
-d <image_directory> option. Image file names have the structure [a-z0-9]{12}.gif; for example, hi0g4m6p3t3n.gif.
- Mapping information for each generated image is output to
stdout by default. Another mapping file can be selected using the -m <mapping_file> option.
- Custom style files can be loaded using the
-s <style_file> command-line option.
- RetroCapture Pro can be run in server-mode (described in detail
here) using the
-r command-line option.
- Use the
-h command-line option to view basic help information.
- All arguments after the last command-line option are treated as
<number>:<image_style> pairs. RetroCapture
will generate <number> of images of this
<image_style> for each of these arguments.
If no <number>:<image_style> arguments are
specified and we are not in server mode (option -r <server_mode_directory>) the default <number> and
<image_style> will be 1:lite,
which generates one image using style lite.
Command-Line Examples
Generate a single image of style lite in the current
directory, writing the passphrase mapping information to stdout:
java -jar retrocapture.jar
Enter server-mode, using the directory rc_run for all files:
java -jar retrocapture.jar -d rc_run
Read the custom style file mystyles.cap then generate a
range of images to the image output directory rc_images,
and place all mapping information in the file rc.map:
java -jar retrocapture.jar -d rc_images -m rc.map -s mystyles.cap \
2:gridfade 10:sky_gradientfade 20:lite
Map File Format
The output mapping file
contains one line per generated image, in the following format:
<passphrase> <image_filename> <image_style> <image_hex_color>
where fields are tab-separated. An example mapping file would be:
F5U5TL ./g4duh8xjy8vn.gif red_gridfade CC0000
36AQTP ./jlosfrejfdjc.gif gridfade ffffff
94PSRF ./bl1ndlalq44y.gif sky_gradientfade 3366ff
CS4PUN ./39p7g40ucgtn.gif lite ffffff
|