Batch operations

Besides interactive facilities, TEAPOT has a batch mode. Using this batch mode, shell scripts can generate output from TEAPOT sheets. This is handy if you use make(1) to generate a bigger document containing tables, because you don't have to generate a tbl or LATEX file each time you modify a sheet: make will do so. In batch mode, TEAPOT reads batch commands from standard input. The following commands are available:

goto location
Go to the specified location.
from location
Start marking a block.
to location
End marking a block.
sort-x d|a y z [ d|a y z ... ]
sort-y d|a x z [ d|a x z ... ]
sort-z d|a x y [ d|a x y ... ]
Sorts the marked block as described in section subsec:Sort, column-wise, row-wise or depth-wise, respectivly. d or a specify the sort order to be descending or ascending. x, y and z specify the position of the sort key relative to the first cell of the marked block. Up to eight sort keys can be specified. This example reproduces the result from section 5.3.7:

from &(1,1,0) 
to &(2,4,0) 
sort-y d 0 0 
save-csv result_num.txt 
| teapot -b doc/unsorted
save-tbl file
save-csv file
save-latex file
save-context file
save-html file
Save the marked block in the specified format as file.
load-csv file
Load file in the specified format to the last goto location. This has the same functionality as the interactive load described in subsection 5.12.4.