You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can specify as many inputs as needed. Inputs are processed in order of appearance. This means that options must be specified before the files they are supposed to affect.
18
19
19
20
If no input files or directories are specified, the current directory is tried.
20
21
22
+
Path handling details
23
+
---------------------
24
+
25
+
When atree encounters a glob pattern, it expands it first and then handles the resulting paths as if listed manually.
26
+
27
+
If a path is a file, atree tries to parse and analyze it as an AsciiDoc file. If a path is a directory instead, atree checks for existence of files in this order:
28
+
29
+
1. master.adoc
30
+
2. index.adoc
31
+
3. any *.adoc file, but only if there is just a single such file
32
+
21
33
22
34
OPTIONS
23
35
-------
@@ -27,15 +39,21 @@ OPTIONS
27
39
-l Use literal include line output.
28
40
29
41
-c Display commented-out includes in annotated mode.
30
-
-x Analyze commented-out includes in annotated mode.
42
+
-x Analyze commented-out includes.
31
43
-h Hide hints for human user.
32
44
33
45
All options in the second group have their inverse in uppercase, which is also the default state. For example, atree does not show commented out includes by default, but you can get them with -c, and later return to the default with -C.
34
46
47
+
35
48
OUTPUT
36
49
------
37
50
38
-
Included files are printed in order of appearance. Indentation shows the level of nesting. If the inclusion of a file is modified in some way, this is displayed:
51
+
Output differs by mode. Default mode is annotated.
52
+
53
+
Annotated output
54
+
----------------
55
+
56
+
This output mode is intended for consumption by humans. Included files are printed in order of appearance. Indentation shows the level of nesting. If the inclusion of a file is modified in some way, this is displayed:
39
57
40
58
* If a file is included, but the inclusion is commented out, the line with the included path begins with the // characters, to idicate the file is included but does not affect output:
41
59
@@ -48,6 +66,35 @@ Included files are printed in order of appearance. Indentation shows the level o
48
66
49
67
* If a file can not be read, its inclusion will be displayed, but no includes inside that file can be analyzed.
50
68
69
+
* If a file cannot be analyzed, the reason will be shown with flags. The flags are:
70
+
71
+
R! the file includes itself, infinitely recursive inclusion
72
+
N! the file does not exist
73
+
X! the file name is not valid
74
+
75
+
Example of outputs with flags:
76
+
77
+
N! some/nonexistent/file.adoc
78
+
//R! the-same-file.adoc
79
+
X! an|invalid*path/somefile.adoc
80
+
81
+
82
+
Full path output
83
+
----------------
84
+
85
+
This mode is intended for consumption by other tools. The output consists only of absolute paths, one on a line. No indenting to show include level is printed. Commented out files will not be listed. Conditionals and flags are not displayed. Invalid or nonexistent files will still be listed.
86
+
87
+
Note that using the -c option will enable analysis of commented out includes, but they will not be shown.
88
+
89
+
Literal output
90
+
--------------
91
+
92
+
This mode prints include lines as encountered in the files. Handling of flags, conditions, comments etc. is identical to full path output.
93
+
94
+
The top level file has no include statement and therefore has a special line: "<top: the-top-file.adoc>".
95
+
96
+
Note that attributes are expanded before this listing, so the icludeds are not verbatim as shown in the files.
97
+
51
98
52
99
EXAMPLE
53
100
-------
@@ -73,9 +120,12 @@ EXAMPLE
73
120
KNOWN ISSUES
74
121
------------
75
122
76
-
* If an attribute is used in the include macro, the attribute is not uderstood and thus also not expanded. The include is displayed, but the actual file can not be loaded and thus any further inclusions are not shown.
123
+
* AsciiDoctor apparently uses some special handling for absolute paths. This syntax is not understood by atree and the file will be treated as non-existent (N!).
124
+
See also https://github.com/redhat-documentation/tools/issues/21
125
+
126
+
* If an attribute is used in the include macro, the attribute must be defined in the document tree. There is no way to define an attribute manually / externally. Because undefined attributes can not not expanded, includes containing these are displayed, but the actual files can not be loaded and thus any further inclusions are not shown.
77
127
78
-
* All includes in comments are listed, including these that are not intended as part of the document, but only comment.
128
+
* All includes in comments are listed, including these that are not intended as part of the document, but only comment. There is no way to distinguish these automatically.
79
129
80
130
81
131
HINTS
@@ -88,3 +138,4 @@ HINTS
88
138
* You can pipe atree output to egrep to add search and highlighting:
0 commit comments