CONSOLE MODE

December 2006

In response to a user request, a command-line version of ThumbHTML has now been developed. The idea is that the main settings are created in the GUI version of the program, and then the program can be run, unattended, in console mode, applying pre-determined settings to create many albums automatically.

It reads ThumbHTML.ini to determine the profile to use, e.g. Default.thm. This in turn contains most of the other settings required, including the stylesheet and template to use for the colours and layout of the web pages. The sizes of the thumbnails and main pictures are stored in batch_settings.txt, which can be modified using the menu in the GUI program.

Some of the settings can be modified in the console mode program using command line switches. In fact, two of these must be set in this way since the GUI program does not (currently) save them. These are:

/title (the title used in the web pages)
/nss (a slide show is included by default - if you do not want one, add /nss to the command line.)

Here is a list of the command line switches that are currently available:

/h             : this help information
/i=<folder>    : specify input folder *
/o=<folder>    : specify output folder *
/exif          : Create an exifinfo.txt file in the output folder
/list          : List the image files
/pd            : Save the picture data to picturedata.txt
/p=<file>      : details of the settings are output to <file>
/p             : details of the settings are output to 'setting_values.txt'
/nss           : do not include slideshow
/title=<title> : HTML title
/v             : output verbosity = 0 errors only
                                  = 1 main messages only (default)
                                  = 2 all messages
/check         : Just show settings and files - no thumbnails/HTML created

*: these parameters are normally set in the ThumbHTML profile.
   If present in the command line, they will override those in the profile.

So, for example, you can check what the program would do using:

ThumbHTML_console /i=e:\photos\2006\aug08 /o=\\server\web\photos\temp /title=test /check
In the above example the input and output folders are specified, overriding those given in the profile.
Note that you can use Windows UNC file paths to refer to file shares as well as drive letters.
Check the contents of the files output (setting_values.txt, in the ThumbHTML folder, and picturedata.txt, in the specified output folder). If these are OK, you can remove /check from the command line and run it.

You should note that this software is under development. It is likely to contain bugs, and has not been as extensively tested as the ThumbHTML GUI program. Please contact me at software@landscapeimage.com if you have any questions.

Also, let me know of any additional command-line switches that you would find useful!


Back to the main page
    Revision history