This tool can create specific node in a given tree. The nodes are called
stamps as they are used to mark a father node with a date or
a keyword. Say we want to stamp some solution node with an attribute
giving the quality of the result, time CPU on a specific host, the version
of solver with which it was created, etc...
The date stamp can be automatic, or given as an argument. The keyword
stamp has to be taken from a fixed (user defined) table of keyword/value.
The sub-tree to stamp is specified using a regular expression3.1. The result of the stamp process can be seen using
the parse tree tool.
The first command line stamps all the flow solution nodes with the
date of the creation.
The second one adds a keyword to coordinates nodes X and Z.
stampnode.py -c '.date' -d '2001.08.30.15.21.43' -n '.*/FlowSolution'grid.cgns
stampnode.py -c 'archived' -k 'cdrom' -n '.*/Coordinate[X,Z]' grid.cgns
The stamp tool is an example on how the selectively parse a tree subset, based
on the criteria of the path string. This tool does not follow links.
- ... expression3.1
a use could be argued, as we could use the path specification of an XML tree.
However, the simple tool can be efficient and usable without the XML machinery,
and this is a plus.