Filter Pack

Top  Previous  Next

The filter pack is a series scripts that allow you to modify any input from any API based on nearly any selection criteria of your choosing. These scripts also allows you to read any plaintext content generated by another application; whether that's another program's log files, XML or HTML content, delimited text or anything that can be read as plaintext.

 

The following files are required for this filter to function:

pgfilter.exe

pgfilter.xml

preproc.bat

pstproc.bat

 

This filter works in conjunction with PageGate's GetAscii module and these files must reside within a directory that GetAscii is monitoring. When the GetAscii module goes through its normal polling routines and finds data that needs to be processed, it first checks for the existence of preproc.bat. If the batch file is found, it is executed, thereby pre-processing the data being read with the filter.

 

If preproc.bat doesn't exist in the folder, GetAscii will process the file normally based on the settings in the PageGate Admin, then check for the existence of pstproc.bat. If the batch file is found, it is executed, thereby post-processing the data with the filter.

 

Effectively, this filter allows you to modify any input fed in to PageGate based on nearly any selection criteria of your choosing so long as the raw data can be read as plaintext; whether that's another program's log files, XML or HTML content, delimited text or anything that can be read as plaintext.

 

Over the course of this documentation, we'll be going over how to configure each of the different XML flags that the filter uses and how each segment of the filter is implemented.

 

Before we begin, though, it's important to understand the technical environment in which the script functions.

 

First, you must own the GetAscii module for your PageGate license as the script directly relies on the module.

 

Second, you'll need to place certain files in specific locations to implement the script, as mentioned above.

 

Third, it's important to understand the chain of events that triggers the script to run.

 

For more detailed information, please see the How to Implement the Script section.

 

As an important note, due to the way this script is programmed, certain characters are treated as command characters instead of literal text characters. The following characters represent certain command functions in the script:

Character

Function

~

~ as first character means start of section/file, ~ as last character means end of section/file. For example, ~123~ would only find 123 and not 01234 or 1237, etc. ~123 would find 12340 but would not find 01234. 123~ would find 0123 but would not find 01234.

?

Single character wildcard.

*

Multiple character wildcard.

\

IMPORTANT

ASCII value prefix (Ex: \013 for a carriage return, \010 for a line feed). The \ must be followed by a three digit code to indicate the character to be output.

 

This character is used when you want to represent a character as represented by its ASCII Decimal value. For example, since the filter directly references the character ~ in its function, if you want to use the ~ character in your text, you'll need to represent it with its ascii value. The ascii value of ~ is \126.

 

Note: PageGate's filter script supports RegEx expressions, which can allow you to implement an incredibly intricate system.