botch-graph-descendants1
Find all descendants of a vertex in a graph in graphml or dot format
Usage
botch-graph-descendants[options] --source SOURCE [--source SOURCE ...] [ingraph] [outgraph]
Overview
Extract the subgraph of all descendants of a specific node in the input graph.
The --source option is mandatory and can be specified more than once.
If either (or both) of the positional arguments is/are omitted, then read GraphML or dot from standard input and/or write GraphML or dot to standard output, respectively. Passing a '-' as either argument, explicitly specifies to read the input from standard input and write the output to standard output, respectively.
The input graph type will be determined automatically. If the output graph is given as a filename, then the output type will be GraphML if the filename ends with .xml and dot if the filename ends with .dot. If the output is done on standard output then it will happen in the same format as the input graph.
Options
-
-h, --help -
Display help.
-
--source=SOURCE -
This option picks the source vertex of which the descendants are computed. The SOURCE argument is a key/value pair (separated by a colon) of a graph attribute and its desired value. If more than one vertex matches the given key/value pair, then the smallest (by node comparison) is chosen.
The special key
"__ID__"allows one to select the unique vertex identifier.This option can be specified more than once. The final set of vertices is chosen such that all vertices match all key/value pairs. Multiple
--sourceoptions thus form a logical conjunction (they are AND-ed together).
-
-v, --verbose -
Be verbose.
Examples
Extract the subgraph of all descendants of a binary packages vertex with name "build-essential" and version "11.7".
botch-graph-descendants --source name:build-essential --source version:11.7 --source type:bin < in.xml > out.xml
or giving input and output as positional arguments:
botch-graph-descendants --source name:build-essential --source version:11.7 --source type:bin in.xml out.xml
Releases
5 releases since Debian 9 (Stretch); the text changed 4 times.