Name

      anm - print HTML anchor crossreferences

Synopsis

      anm [ -HVRrdlp ] [ -Dregex[=value] ] [ -f init ] [ file ] ..

      By default, anm prints the HTML anchors defined in, and the documents and anchors referenced from, each document file in the argument list.  If no file is specified, the text is read from standard input.

Output Format

      Each tag name is preceded by (if the -l option is specified) the name of the document it is defined or used in, a set of flags that describe the reference (if any), and a set of flags that describes defined object and references to it (if any).  If any of the flags is in upper case, something is probably wrong.

      The first flag is only relevant to references.  Its meanings are:

-
The referenced object exists.
x
The referenced object is external or defined with -Dregex and was not verified.
N
The referenced name (tag) does not exist, although the document that contains it was found.
U
The referenced file does not exist.
      Next is a set of four connected flags that describe the format of a reference, in the form [eE-][sS-][aAr-][nN-] They refer to, respectively, the (external) protocol, the server, the absolute or relative pathname, and a name within the document.
-
The reference doesn't contain an external protocol specification / server / pathname / tag.
e
(external) The reference contains a protocol specifica- tion.
E
(external) The reference contains a protocol specifica- tion and an absolute pathname, but no server name.
s
(server) The reference contains a server name.
S
(server) The reference contains a server name, but no protocol.
a
(path) The reference contains an absolute pathname.
r
(path) The reference contains a relative pathname.
A
(path) The reference contains an absolute pathname, but no server.
n
(name) The reference contains a name.
N
(name) The reference contains a name and a server name, but no pathname.
      The remaining flags can be set only for definitions.  First comes a single flag that indicates what kind of object is being defined, and whether it is referenced.
o
A referenced file (object).
O
A file that is not referenced from documents visited in this run.
n
A referenced name (tag).
N
A name that is not referenced from visited documents.
      Next are three flags of the form [a-][r-][n-] that refer to references using absolute path names, relative pathnames, and references without pathnames (from the same document, that is).
-
The object isn't referenced using this particular style.
a
(absolute) The object is referenced using an absolute pathname.
r
(relative) The object is referenced using a relative pathname.
n
(name) The object is referenced, using no path, from within itself.

Options

-d
List only definitions, not external references.
-r
List only references, not local definitions.
-l
Just list the referenced documents, not the anchors inside them.
-p
Prefix each anchor line with the name of its document.
-Dregex
Consider all references whose normalized form matches regex to be defined.  anm does not follow defined references, regardless of whether the corresponding documents exist or not. Thus, the -D option can be used to selectively exclude partsof a document subtree that are still `under construction' from the scan.
-Dregex=value
Substitute value for regex in all normalized URLs.  \(...\) groups in the style of ed(1) are recognized and replaced.
-ffilename
Read alias commands as for -D from the file filename One line contains one alias.  For every URL, only one matching alias (if any) is chosen and replaced; the resulting URL is not replaced again.
-H
Print a short online help.
-V
Print the current version and patchlevel.
-R
Recurse.  Print not only information about references in standard input or the files in the command line, but also about local documents referenced from these files, and so on.  anm always descends into referenced documents that are not defined using -D; the -R option just toggles printing, not processing.

Example

      % anm index.html
prints all the references and all the names in index.html.
      % anm -D:/ -R index.html
is what I use to check all the documents in my C database subtree from within its root directory. Because anm normalizes local URLs relative to the current directory, every normalized URL above the current directory will be an absolute pathname.  Thus, the ``-D:/'' keeps anm from ascending into my homepage, even if a link from the C database points to ``..''.

Bugs

      Please report bugs to jutta@cs.tu-berlin.de .