Extract - Copyright (c) 1992 Andrew Gaunt - All Rights Reserved Purpose: Extract messages to a particular user and system from a WWIV p?.net (or similar) file. It is written primarily to pull messages routed to a WWIVnet destination and redirect them to some sort of gateway software. The gateway utilities can then pass the messages to another network, such as UUCP. Usage: extract to_user to_system infile outfile work_dir [address] Synopsis: to_user - A positive integer that represents a valid WWIV BBS user number. to_system - A positive integer that represents a valid WWIV BBS system node number. infile - The pathname of the file that is to be read by extract. outfile - The pathname of the file that is to be written by extract. work_dir - Name of the directory where found messages are to be written. address - Optional address to force each found message to. Extract reads the infile and looks for any messages addressed to the user and system specified (to_user@to_system). The infile must be in the same format WWIVnet uses. In order for the message to extracted successfully, two conditions must be met. As stated above, the message must be properly addressed and secondly, Extract must find an "address" to pass to the other network. Since the other network will more than likely not understand WWIVnet addressing and be able to route the messages, an secondary address must be provided. This can be done within the message text or by forcing it on the command line by specifying it as the last argument. Extract will search through the message and look for line beginning with a tilde (~) character. If one is found, it will read up to the end of the that line and use these characters as the secondary address. e.g. ~john_smith@inforail.newton-jct.nh.us If the above line is part of the message, it will be interpreted as the secondary address. If Extract does not find one and none is specified on the command line, the message will not be extracted. If a secondary address is specified on the command line, it will take priority over any that may be embedded in the message text. Extract writes the message text to files named XXXXXXXX.msg where XXXXXXXX represents a number in a sequence beginning with zero. ie. the first message will be stored in a file named 00000000.msg, the second in 00000001.msg, and so forth. The secondary addresses are stored in similarly named files, only instead of a ".msg" suffix, they ".add" is used. With the text of the messages and addresses stored as plain ascii files, the gateway software can easily pass them to another network.