ParseDecision Documentation

Usage

ParseDecision provides both a command line application and a rake task that is used to parse decision logs generated by the Commerce Velocity AMS application.

Rake Task Usage

The rake task can be included in a rakefile by requiring parse_decision like so:

require 'parse_decision'

and called as:

ParseDecisionTask.new.execute( logSrcPath, destDir )

The parser will parse the decision log out to a destination directory. Each product within the log will be parsed into a separate file. The APP XML is also parsed to a separate file for each product.

Both the product and the APP XML file names will be prefixed with the same number. The number indicates the order that the data was found within the decision log.

A copy of the decision log (pre-parse) is also copied to the destination folder for archiving purposes.

Command Line Application

Usage info can be retrieved from the application by calling it with the -h or --help options:

$ parse_decision --help

Notes

  • The decision log doesn't produce valid XML in many situations.
  • In the interest of preserving any data the log may contain, the resulting XML is not cleaned.
  • As a result of the previous notes, the parsed files are not guaranteed to be valid XML.

Version Control

This repo includes submodules.

To property initialize the repo, after cloning it, run

$ git submodule init
$ git submodule update

After pulling in the submodules, you may want to configure git to ignore changes (dirty) in the submodules. This can be done by adding a ignore = all statement to each submodule section in .gitmodules

# Example:
[submodule "common"]
    path = common
    url = git@cerberus:/home/git/ams/common.git
    ignore = all

Be sure to commit your changes to .gitmodules.

Submodules used in this repo:

  • none currently

Website: http://ktechsystems.com

Copyright (c) 2011, kTech Systems LLC. All rights reserved.