annotate toolboxes/graph_visualisation/share/man/man1/prune.1 @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 .\" Copyright (c) 2002 Marcus Harnisch <marcus.harnisch@gmx.net>
wolffd@0 2 .\"
wolffd@0 3 .\" This is free documenation. It is provided to you without any
wolffd@0 4 .\" warranty that it is useful or that you can understand it.
wolffd@0 5 .\"
wolffd@0 6 .\" You are granted the right to use and redistribute the source code
wolffd@0 7 .\" or parts of it (even single words and letters), provided that the
wolffd@0 8 .\" copyright notice and the license terms will not be removed.
wolffd@0 9 .\"
wolffd@0 10 .TH prune 1
wolffd@0 11
wolffd@0 12 .SH NAME
wolffd@0 13 prune \- Prune directed graphs
wolffd@0 14 .SH SYNOPSIS
wolffd@0 15 .B prune
wolffd@0 16 [
wolffd@0 17 .BI \-n " node"
wolffd@0 18 ]
wolffd@0 19 [
wolffd@0 20 .BI \-N " attrspec"
wolffd@0 21 ]
wolffd@0 22 [
wolffd@0 23 .I files ...
wolffd@0 24 ]
wolffd@0 25 .SH DESCRIPTION
wolffd@0 26 .B prune
wolffd@0 27 reads directed graphs in the same format used by
wolffd@0 28 .B dot(1)
wolffd@0 29 and removes subgraphs rooted at nodes specified on the
wolffd@0 30 command line via options. These nodes themselves will not be removed,
wolffd@0 31 but can be given attributes so that they can be easily located by a
wolffd@0 32 graph stream editor such as
wolffd@0 33 .B gpr(1).
wolffd@0 34 .B prune
wolffd@0 35 correctly handles cycles, loops and multi\(hyedges.
wolffd@0 36
wolffd@0 37 Both options can appear multiple times on the command line. All
wolffd@0 38 subgraphs rooted at the respective nodes given will then be
wolffd@0 39 processed. If a node does not exist,
wolffd@0 40 .B prune
wolffd@0 41 will skip it and print a warning message to stderr.
wolffd@0 42 If multiple attributes are given, they will be applied to
wolffd@0 43 all nodes that have been processed.
wolffd@0 44 .B prune
wolffd@0 45 writes the result to the stdout.
wolffd@0 46 .SH OPTIONS
wolffd@0 47 .TP
wolffd@0 48 .BI \-n " name"
wolffd@0 49 Specifies name of node to prune.
wolffd@0 50 .TP
wolffd@0 51 .BI \-N " attrspec"
wolffd@0 52 Specifies attribute that will be set (or changed if it exists) for any
wolffd@0 53 pruned node.
wolffd@0 54 .I attrspec
wolffd@0 55 is a string of the form
wolffd@0 56 .IR attr "=" value.
wolffd@0 57
wolffd@0 58 .SH EXAMPLES
wolffd@0 59 An input graph
wolffd@0 60 .I test.dot
wolffd@0 61 of the form
wolffd@0 62 .PP
wolffd@0 63 digraph DG {
wolffd@0 64 .br
wolffd@0 65 A \-> B;
wolffd@0 66 .br
wolffd@0 67 A \-> C;
wolffd@0 68 .br
wolffd@0 69
wolffd@0 70 .br
wolffd@0 71 B \-> D;
wolffd@0 72 .br
wolffd@0 73 B \-> E;
wolffd@0 74 .br
wolffd@0 75 }
wolffd@0 76 .br
wolffd@0 77
wolffd@0 78 , processed by the command
wolffd@0 79 .PP
wolffd@0 80 prune \-n B test.dot
wolffd@0 81 .PP
wolffd@0 82 would produce the following output (the actual code might be formatted
wolffd@0 83 in a slightly different way).
wolffd@0 84 .PP
wolffd@0 85 digraph DG {
wolffd@0 86 .br
wolffd@0 87 A \-> B;
wolffd@0 88 .br
wolffd@0 89 A \-> C;
wolffd@0 90 .br
wolffd@0 91 }
wolffd@0 92 .br
wolffd@0 93
wolffd@0 94 Another input graph
wolffd@0 95 .I test.dot
wolffd@0 96 of the form
wolffd@0 97 .PP
wolffd@0 98 digraph DG {
wolffd@0 99 .br
wolffd@0 100 A \-> B;
wolffd@0 101 .br
wolffd@0 102 A \-> C;
wolffd@0 103 .br
wolffd@0 104
wolffd@0 105 .br
wolffd@0 106 B \-> D;
wolffd@0 107 .br
wolffd@0 108 B \-> E;
wolffd@0 109 .br
wolffd@0 110
wolffd@0 111 .br
wolffd@0 112 C \-> E;
wolffd@0 113 .br
wolffd@0 114 }
wolffd@0 115 .br
wolffd@0 116
wolffd@0 117 (note the additional edge from
wolffd@0 118 .I C
wolffd@0 119 to
wolffd@0 120 .I E
wolffd@0 121 ), processed by the command
wolffd@0 122 .PP
wolffd@0 123 prune \-n B \-N color=red test.dot
wolffd@0 124 .PP
wolffd@0 125 results in
wolffd@0 126 .PP
wolffd@0 127 digraph DG {
wolffd@0 128 .br
wolffd@0 129 B [color=red];
wolffd@0 130 .br
wolffd@0 131 A \-> B;
wolffd@0 132 .br
wolffd@0 133 A \-> C;
wolffd@0 134 .br
wolffd@0 135 C \-> E;
wolffd@0 136 .br
wolffd@0 137 }
wolffd@0 138 .br
wolffd@0 139
wolffd@0 140 Node
wolffd@0 141 .I E
wolffd@0 142 has not been removed since its second parent
wolffd@0 143 .I C
wolffd@0 144 is not being pruned.
wolffd@0 145
wolffd@0 146 .SH "EXIT STATUS"
wolffd@0 147 .B prune
wolffd@0 148 returns 0 on successful completion.
wolffd@0 149 It returns 1 if an error occurs.
wolffd@0 150 .SH SEE ALSO
wolffd@0 151 .BR dot (1),
wolffd@0 152 .BR gpr (1)
wolffd@0 153
wolffd@0 154 .SH AUTHOR
wolffd@0 155 Marcus Harnisch <marcus.harnisch@gmx.net>