CVS Version Control Checkout Example
The previous example scripts demonstrate some simple capabilities of using scripts in ePublisher AutoMap. This example shows how to check out source files from a version control system at the start of a job.
Version control systems let you store files and retain information concerning different versions of those files. You can store multiple versions of files, revert to previous versions of files, and share files among large groups of people. The advantage of using a version control script to retrieve source files rather than adding them directly to a project ensures that your job is always working with the latest checked in version of each source file.
Each version control system works in a slightly different way. ePublisher AutoMap is not tied to a specific version control solution. ePublisher AutoMap provides an abstract way of retrieving a list of source files to transform. There are a few rules about how this list is named and formatted, but the actual creation of the list is left to the script and scriptwriter.
The scripting capabilities in the Documents panel are not limited to checking files out of a version control system. The only requirement is that the
FileList.txt
file includes a list of files and paths to be transformed. You can access the
FileList.txt
file and the path to it using the ePublisher AutoMap
${FileListName}
and
${FileListPath}
scripting variables. For more information, see
Scripting Variables.
The following script example calls getfilesaction_cvs.vbs
, which is installed with ePublisher AutoMap. By default, this script is located in the following location:
\Program Files\WebWorks\ePublisher AutoMap\Scripts\getfilesaction_cvs.vbs
The getfilesaction_cvs.vbs
script is written using the Visual Basic Scripting (VBS) capabilities built into Microsoft Windows to check out files from a CVS (Concurrent Version System) server and create a file list to be processed by ePublisher AutoMap. This script is not meant to be used in its current form. This script provides a starting point that includes everything you need to set up a working script for your particular environment.
The getfilesaction_cvs.vbs
script includes comments to help someone with scripting experience understand the actions it performs. Since this script provides only a starting point, you need to modify this script for your environment. For example, you need to set the CVS attributes for your user name, server name, and type of authentication. You also need to adjust for how CVS is installed and called in your environment. These areas of the script are highlighted in the following figure:
The following figure shows an example of how to call the getfilesaction_cvs.vbs
script. The parameters passed indicate the module to checkout and to filter on the .doc
extension. When this script runs, it checks out the indicated module from CVS, filters those files based on the .doc
extension, and adds those .doc
files to the FileList.txt
file. That file list is then used by the job as the list of files to process and transform.
This example is only one possible way of creating a list of files to transform. Once you understand the mechanism that ePublisher AutoMap uses to retrieve its list of source documents to transform, you can create that list using the process you prefer. Whether you want to use a script or an application, ePublisher AutoMap can run it from the script editor as long as it is available to ePublisher AutoMap.
Last modified date: 06/11/2024