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