Cataloger - an Introduction

Documentation Status

The cataloger is an easy to use tool to create a catalog of the contents of a directory tree, and then later use that same catalog to confirm that contents of the directory tree has been correctly copied/deployed. The catalog contains a hex-string signature created for each selected file within the directory tree, and the tools can identify files which been added, removed or are different (different content) within the directory tree.

Selecting Files

The tool has a comprehensive set of tools for selecting which files are selected for inclusion in the catalog :

  • selection by file extension
  • de-selection of top level directories
  • fine grained inclusion and exclusions of files based on glob pattern matching.

Information about the directory tree (directory and file names) are captured relative to a defined root when the catalog is created, which means that the absolute location of the directory tree on the platform is not relevant to the cataloger - what is relevant is the directory structure under the root.

For more details see Command Line Options and Configuration file for more information on how to select files for cataloging.

Reportable Exceptions

The identification of additional files, missing files and files with different contents are termed to be reportable anomalies; and using command options exist to determine what type of reportable anomaly results are actually reported or are classed as failures; it is entirely possible therefore for the tool to be used in an environment where the additional files are acceptable for instance. See Results and Reports for more information.

Defaults, Command lines and Configuration files

The catalog tool has a set of default options which are ideal for cataloging the deployment of a Django project, since Django projects have the same directory structure when deployed as they have on development (i.e. a hierarchical structure of a Project with multiple apps); but the catalog tool can be used in other environments as well by overriding the defaults file types, ignored directories and other options. See Use Case for more information.

If you use non default options to create your catalog, then you will need to ensure that you use the same options when you check your destination directory structure to ensure that the right files are cataloged; this is easily enabled by the use of a configuration file which holds all of the options used to both create and check the catalog; see Configuration File for more information on how to write these configuration files.

APIs

Although primarily the catalog tool is provided as a command line tool, the software also includes APIs so that the cataloging functionality can be accessed from other python application. see Catalog APIs for more information on the two APIs provided.

Note

Every care is taken to try to ensure that this code comes to you bug free. If you do find an error - please report the problem on :