---
name: "wnpnuts"
section: "1"
platform: "linux"
package: "wn"
version: "2.2.9-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/wnpnuts"
---

# wnpnuts(1)

produce navigation links to a set of HTML files for wn HTTP server

## NAME

wnpnuts - produce navigation links to a set of HTML files for wn HTTP server

## SYNOPSIS

**wnpnuts** \[**-s** *search\_url*\] \[**-i** *index\_url*\] *hierarchy\_file*

## DESCRIPTION

**wnpnuts** is a [**perl**(1)](/perl/1.md) program that is part of the [**wn**(1)](/wn/1.md) HTTP server package.

PNUTS (pronounced "peanuts") is an acronym for previous, next, up, top, search.  The argument *hierarchy\_file* is the name of a file describing the hierarchical structure of a group of HTML files constituting a single virtual document. The **wnpnuts** program then searches these files for lines which begin with optional white space followed by the string:

```
        <!-- pnuts -->
```

which it replaces with this string followed by a sequence of anchors like

```
        [previous] [next] [ up] [ top] [ search] [ index]
```

with links to the relevant files in the virtual document. Actually it replaces this line with a single line starting with \<!-- pnuts --\>, followed by the anchors. That way the next time it is run, say after inserting a new chapter in your document, the "pnuts" line will be replaced by a new one with the appropriate links.

The file *hierarchy\_file* contains the information by which **wnpnuts** knows which files to process and what the order of those files should be. It consists of a list of files relative to the current directory, one per line, in the order which should be reflected in the \[next\] \[previous\] links. If a file is hierarchically one level lower than the previous file this should be indicated by preceding its name with one more \<tab\> character than the preceding file. Here is an example:

```
        top.html
        second.html
        <tab>firstsub.html
        <tab><tab>subsub.html
        <tab>secondsub.html
        third.html
```

If this list is supplied to **wnpnuts** it will insert anchors into all these files wherever \<!-- pnuts --\> occurs.  All those named \[top\] will point to the file top.html. In firstsub.html and secondsub.html the \[up\] link will point to second.html. The \[previous\] and \[next\] links will reflect the order top.html, second.html, firstsub.html, subsub.html, secondsub.html, third.html.

## OPTIONS

- **-s** *search\_url*

  The URL for the "\[search\]" anchor.  Optional with the default being no search item in the list of items in the list of items inserted by **wnpnuts.**

- **-i** *index\_url*

  The URL for the "\[index\]" anchor.  Optional with the default being no search item in the list of items in the list of items inserted by **wnpnuts.** This URL typically points to an an HTML document created with [**wnindexmaker**(1)](/wnindexmaker/1.md).

## FILES

- *hierarchy\_file*

  Text file showing hiearchy of HTML files that make up a "virtual" document.

## SEE ALSO

[**sort**(1)](/sort/1.md), [**wn**(1)](/wn/1.md), [**wn\_mkdigest**(1)](/wn_mkdigest/1.md), [**wn\_uncache**(1)](/wn_uncache/1.md), [**wndex**(1)](/wndex/1.md), [**wnindexmaker**(1)](/wnindexmaker/1.md), [**wnauth**(3)](/wnauth/3.md), [**wncat**(3)](/wncat/3.md), [**wnhtmlify**(3)](/wnhtmlify/3.md), [**wnredir**(3)](/wnredir/3.md), [**wnsectsearch**(3)](/wnsectsearch/3.md), [**wnseven\_m**(3)](/wnseven_m/3.md), [**wn\_md5passwd**(8)](/wn_md5passwd/8.md), [**wn\_mkpasswd**(8)](/wn_mkpasswd/8.md), [**wnconfig**(8)](/wnconfig/8.md), [**wnd**(8)](/wnd/8.md), [**wnsd**(8)](/wnsd/8.md), [**wnupdatewww**(8)](/wnupdatewww/8.md), [**wnv2c**(8)](/wnv2c/8.md)\
 **http:/doc/wn/utility.html**\
 **http:/doc/wn/manual.html**\
 **http://hopf.math.nwu.edu/**

## AUTHOR

**wn** is written by John Franks \<john@math.nwu.edu\>.  Modified by Jean Pierre LeJacq \<jplejacq@quoininc.com\> as part of packaging for the Debian GNU/Linux distribution. Manual page also added by Jean Pierre LeJacq.
