ipkeyword

ipkeyword

IPKEYWORD filters wire service messages for specific keywords set in its
parameter files.

These selections can be made on any combination of FIP header fields and/or
text strings in the data.

In order to make its selection, whole wire service feeds are sent to the select
input queue where this program receives them.

The selection criteria files are held in tables/select and have the format :

   The format of the selection file is :
    ; comment
    (hdr field) = string [opt (tab) & (hdr) = string ...] (tab) >dest (nl)
    (hdr field) = string [opt (tab) | (hdr) = string ...] (tab) >dest (nl)
   where
    Each selection is on a single line. If necessary, multiple conditions
    can be specified with the '&' to AND them or '|' to OR them.
    The operation equal, '=', can also be NOT equal '!='.
    Source Header fields (in SH) are preceeded by X, ie XC for category.
    A '*' is used a wild card string; a '?' is single wild card chr. To
    search for a string/chr embedded somewhere in a field, uses a '*' before
    and after.
    If embedded spaces are needed in the string-to-be-searched, use an '*'.
    Note that the search string is case_insensitive.
    Dest must be a valid destination in the tables/sys/USERS file.
    Both the selection file and the main file are scanned completely, so
    that one file may be sent to none, one or several destinations
    according to the same or different criteriae.
   ie
    ; Sports copy to Tranmere Rovers FC.
    XC=S*   &   XK=*Football*   >sportsdesk
    EP=TAR.             >financewire
    RD=*Broken_Hill*        >rudolph
    $$=*Cariba* | $$=*Kataga*   >zibble
    SU=AP   & %%=AP_LATAM       >latam

For Free text search - use '$$' as the pseudo header string.  No embedded
spaces are allowed for free text. Note that this version will scan only the
first 64k chrs of the text.

The '%%' pseudo header field allows you to specify a file of keywords to
search. The format of this file is the same as for IPROUTE's keywords which is
a single line per search string (or to put it another way, one keyword per
line).
If any one of these searches prove valid, the incoming message is sent to the
destination. In the above example, if the incoming message is from AP (SU=AP)
and any strings in the text is found in the file tables/keyword/AP_LATAM, a
copy of the file is sent to destination 'latam' in the tables/sys/USERS
parameter file.

When searching through Keyword files using '%%', the Keyword is added to the
'HK' Fip Header field for use by subsequent programs.

For other tests, 'HK' hold the Search String.

Note that Keywords are normally case sensitive. By specifying the '-c' input
parameter these can be Case Sensitive.

Input parameters are (all optional) :
    -t : scan time for directory        default: 5 secs
    -q : queue to scan          default: spool/keyword
    -z : name of selection file     default: tables/keyword/KEYWORD
    -l : log every incoming file        default: do NOT log
    -n : nice number there          default: reduce by 5
    -c : Keywords are case sensitive    default: not case sensitive
    -v : display version number and exit.

(copyright) 2017 and previous years FingerPost Ltd.