SAMPLE RULE FILES |
Top Previous Next |
UnForm is supplied with several sample report text files and associated rule sets. A description of each report and rule set follows. Each of the sample reports is in the UnForm directory, named "samplen.txt." All example rule sets can be found in the files simple.rul and advanced.rul in the UnForm directory.
The simple.rul file contains a series of examples that use the sample invoice text file, sample1.txt. Beginning with the rule set simple1, and incrementally advancing in capabilities through simple4, this rule file is designed to help a new user learn fundamental UnForm concepts. To try these out, use this command, varying the rule set name (-r argument) simple1 with one of the four samples, simple1, simple2, simple3, or simple4:
uf101c –i sample1.txt –f simple.rul –r simple1 –o output-device
The advanced.rul file contains rule sets that show a variety of topics, and is designed to show advanced concepts. To produce these samples on your own laser printer or to a PDF file, you can use the following command, substituting the proper sample text file:
uf101c –i sample-file –f advanced.rul –o output-device
For the output device, you can use a device name, like LPT1 or /dev/lp0, a file name, or a quoted pipe command to a spooler. For example, to print the first sample to a spooler, use something like this:
uf101c –i sample1.txt –f advanced.rul –o "|lp –dhp –oraw"
To produce PDF versions of these files, change the output device to a PDF file name, and add "-p pdf" to the command line:
uf101c –i sample1.txt –f advanced.rul –p pdf –o invoice_sample.pdf.
Change "-o invoice_sample.pdf" to "-o client:invoice_sample.pdf" to store the output on the client's system.
A few of the samples don't support detection capabilities, and they must be specified on the command line with a "-r ruleset" option. If necessary, the documentation will state this requirement.
|